summaryrefslogtreecommitdiff
path: root/scripts/check_db_safety
diff options
context:
space:
mode:
authorSeekingFor <nobody@nowhere>2013-10-30 02:47:14 +0000
committerSeekingFor <nobody@nowhere>2013-10-30 02:47:14 +0000
commit98c417e0e11819b4250bf9852adbc49f52f3c8b5 (patch)
treeaba520f93e4d91de3c20bc01639ecb7c04179285 /scripts/check_db_safety
parente4734d7592a11fbb206b4da851f7b1cd8d10b7c8 (diff)
downloadresdb-98c417e0e11819b4250bf9852adbc49f52f3c8b5.tar.gz
resdb-98c417e0e11819b4250bf9852adbc49f52f3c8b5.zip
allow ipv6 addresses as nameserver
Diffstat (limited to 'scripts/check_db_safety')
-rwxr-xr-xscripts/check_db_safety4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/check_db_safety b/scripts/check_db_safety
index db69015..9b2e98c 100755
--- a/scripts/check_db_safety
+++ b/scripts/check_db_safety
@@ -11,14 +11,14 @@ for tld in db/dom/* ; do
exit 1
fi
for dom in $tld/* ; do
- if [ "$(ls $dom/ns/ | tr -d 'a-z0-9\n.-' | wc -c | tr -d ' \t')" != 0 ]; then
+ if [ "$(ls $dom/ns/ | tr -d 'A-Fa-z0-9\n.-:' | wc -c | tr -d ' \t')" != 0 ]; then
domain="$(basename $dom).$(basename $tld)"
echo "There's a bad nameserver under $domain." >&2
echo "You probably don't want to run any shell scripts." >&2
exit 1
fi
for ns in $dom/ns/* ; do
- if [ "$(cat $ns | tr -d '0-9.\r\n' | wc -c | tr -d ' \t')" != 0 ]; then
+ if [ "$(cat $ns | tr -d 'A-Fa-f0-9.:\r\n' | wc -c | tr -d ' \t')" != 0 ]; then
domain="$(basename $dom).$(basename $tld)"
nsname="$(basename $ns)"
echo "There's a bad nameserver IP under $domain, for" >&2