From e59010af1f76489c94305ac736aff2216e983ffb Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 27 Nov 2007 22:16:00 +0000 Subject: Throw an error when we cannot download bogons file instead of blindly assuming it succeedded. --- etc/rc.update_bogons.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc') diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh index 31ead60..33c3f4e 100755 --- a/etc/rc.update_bogons.sh +++ b/etc/rc.update_bogons.sh @@ -12,6 +12,11 @@ sleep $value /etc/rc.conf_mount_rw /usr/bin/fetch -q -o /tmp/bogons "http://www.pfsense.com/mirrors/bogon-bn-nonagg.txt" +if [ ! -f /tmp/bogons ]; then + echo "Could not download http://www.pfsense.com/mirrors/bogon-bn-nonagg.txt" | logger + exit +fi egrep -v "^192.168.0.0/16|^172.16.0.0/12|^10.0.0.0/8" /tmp/bogons > /etc/bogons /etc/rc.conf_mount_ro /sbin/pfctl -t bogons -T replace -f /etc/bogons +rm /tmp/bogons -- cgit v1.1