From e95b2e10f3a1b1be5ae098441359465bdf187ef8 Mon Sep 17 00:00:00 2001 From: Thomas Lotterer Date: Sun, 7 Sep 2003 14:32:49 +0000 Subject: [PATCH] avoid ending up with an empty db.root --- bind/bind.spec | 2 +- bind/db.root.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bind/bind.spec b/bind/bind.spec index 89a899877f..8e55a8f358 100644 --- a/bind/bind.spec +++ b/bind/bind.spec @@ -37,7 +37,7 @@ Distribution: OpenPKG [BASE] Group: DNS License: ISC Version: %{V_bind} -Release: 20030819 +Release: 20030907 # package options %option with_dlz_mysql no diff --git a/bind/db.root.sh b/bind/db.root.sh index b4d5677b0c..09493c7589 100644 --- a/bind/db.root.sh +++ b/bind/db.root.sh @@ -10,11 +10,15 @@ cat >$ROOTFILE <$ROOTFILE.raw && break +done +[ -f $ROOTFILE.raw ] || exit 1 +awk <$ROOTFILE.raw ' + /IN NS/ { printf("%-20s 99999999 IN NS %s\n", $1, $NF); } + /IN A/ { printf("%-20s 99999999 IN A %s\n", $1, $NF); } ' |\ sort >>$ROOTFILE echo "" >>$ROOTFILE +rm $ROOTFILE.raw