diff options
author | Nick <nick@somerandomnick.ano> | 2010-10-28 02:24:52 +0000 |
---|---|---|
committer | Nick <nick@somerandomnick.ano> | 2010-10-28 02:24:52 +0000 |
commit | e40a8a950fa1b493c244905d61e49e55e71d84d0 (patch) | |
tree | 56ccf5fd5c6d66f9ac86160333ce772e3226d6de /scripts/ns2ip | |
parent | 2b6edd7c9b25a1707b345e1c5dac0526e54a627c (diff) | |
download | resdb-e40a8a950fa1b493c244905d61e49e55e71d84d0.tar.gz resdb-e40a8a950fa1b493c244905d61e49e55e71d84d0.zip |
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Diffstat (limited to 'scripts/ns2ip')
-rwxr-xr-x | scripts/ns2ip | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/ns2ip b/scripts/ns2ip new file mode 100755 index 0000000..ff5bf2b --- /dev/null +++ b/scripts/ns2ip @@ -0,0 +1,15 @@ +#!/bin/sh + +opt="$1" +if [ "x$opt" = "x-f" ]; then + shift +elif ! ./scripts/check_db_safety; then + exit 1 +fi +ns="$1" + +path="`find db/dom/ -ipath '*/ns/'\"$ns\" -size +1c | head -n 1`" +if [ "x$path" = "x" ]; then + exit 1 +fi +cat "$path" |