diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-27 22:16:37 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-27 22:16:37 +0000 |
commit | 3fb63eb461b3058edcba4d0df0eeb96fd8fcf836 (patch) | |
tree | 2ba2628e267078b2c9a8a0b94b157ec4119596b2 /etc | |
parent | dce360e2b4890fe5e44e64abb80a9cf77287aa42 (diff) | |
download | pfsense-3fb63eb461b3058edcba4d0df0eeb96fd8fcf836.zip pfsense-3fb63eb461b3058edcba4d0df0eeb96fd8fcf836.tar.gz |
Throw an error when we cannot download bogons file instead of blindly assuming it succeedded.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.update_bogons.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh index 26b0c30..7a733ef 100755 --- a/etc/rc.update_bogons.sh +++ b/etc/rc.update_bogons.sh @@ -12,7 +12,12 @@ 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 |