diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-07-06 07:20:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-07-06 07:21:20 +0000 |
commit | 51e048b859cd82db42d2ccbae55286eedf864f03 (patch) | |
tree | 0cb2bcb797a1254a8a0f2a48de74e833290054b7 /main/djbdns/dnscache.monthly | |
parent | 5e951ccb95acdc265a906f90b799a1dcd4e87ef0 (diff) | |
download | aports-51e048b859cd82db42d2ccbae55286eedf864f03.tar.bz2 aports-51e048b859cd82db42d2ccbae55286eedf864f03.tar.xz |
main/djbdns: make sure there are valid ip address in @ before overwrite
Diffstat (limited to 'main/djbdns/dnscache.monthly')
-rwxr-xr-x | main/djbdns/dnscache.monthly | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/main/djbdns/dnscache.monthly b/main/djbdns/dnscache.monthly index 4e53fd6fd..574d56f01 100755 --- a/main/djbdns/dnscache.monthly +++ b/main/djbdns/dnscache.monthly @@ -19,7 +19,7 @@ for ZONEFILE in $ZONES; do cp -f "$DST" "$ZONEFILE" fi - if [ "$ZONE" == "@" ]; then + if [ "$ZONE" = "@" ]; then ZONE="." fi @@ -28,9 +28,7 @@ for ZONEFILE in $ZONES; do # Refresh zone info dnsqr ns $ZONE | awk '/^answer: ./ { print $5 }' | sort -u | xargs dnsip > $TMPF - - grep "^$" $TMPF 1> /dev/null - if [ $? != 0 ]; then + if egrep -q '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' $TMPF; then cmp -s $ZONEFILE $TMPF if [ "$?" != 0 ]; then NEEDRESTART=yes |