summaryrefslogtreecommitdiffstats
path: root/etc/rc.update_bogons.sh
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-04-04 15:53:37 +0200
committersmos <seth.mos@dds.nl>2012-04-04 15:53:37 +0200
commit4a41dff7afe60a6bd228019f2bccd1e5577cdf6e (patch)
tree31ee66b29282ac0248909fef34ce4e17ae8304d5 /etc/rc.update_bogons.sh
parent479f0fda05952bc8bdbe8118db562121217ff465 (diff)
downloadpfsense-4a41dff7afe60a6bd228019f2bccd1e5577cdf6e.zip
pfsense-4a41dff7afe60a6bd228019f2bccd1e5577cdf6e.tar.gz
Bail out without a valid IPv6 address so we don't generate a invalid dhcpv6 server config
Diffstat (limited to 'etc/rc.update_bogons.sh')
-rwxr-xr-xetc/rc.update_bogons.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh
index aec80a1..37d2c6d 100755
--- a/etc/rc.update_bogons.sh
+++ b/etc/rc.update_bogons.sh
@@ -21,22 +21,22 @@ echo "rc.update_bogons.sh is beginning the update cycle." | logger
/etc/rc.conf_mount_rw
/usr/bin/fetch -q -o /tmp/bogons "http://files.pfsense.org/mirrors/bogon-bn-nonagg.txt"
-if [ ! -f /tmp/bogons ]; then
+/usr/bin/fetch -q -o /tmp/bogonsv6 "http://files.pfsense.org/mirrors/fullbogons-ipv6.txt"
+if [ ! -f /tmp/bogons ];
echo "Could not download http://files.pfsense.org/mirrors/bogon-bn-nonagg.txt" | logger
- # Relaunch and sleep
- sh /etc/rc.update_bogons.sh &
- exit
+ dl_error="true"
fi
-
-/usr/bin/fetch -q -o /tmp/bogonsv6 "http://files.pfsense.org/mirrors/fullbogons-ipv6.txt"
if [ ! -f /tmp/bogonsv6 ]; then
echo "Could not download http://files.pfsense.org/mirrors/fullbogons-ipv6.txt" | logger
+ dl_error="true"
+fi
+
+if [ "$dl_error" != "" ];then
# Relaunch and sleep
sh /etc/rc.update_bogons.sh &
exit
fi
-
BOGON_MD5=`/usr/bin/fetch -q -o - "http://files.pfsense.org/mirrors/bogon-bn-nonagg.txt.md5" | awk '{ print $4 }'`
ON_DISK_MD5=`md5 /tmp/bogons | awk '{ print $4 }'`
if [ "$BOGON_MD5" = "$ON_DISK_MD5" ]; then
OpenPOWER on IntegriCloud