summaryrefslogtreecommitdiff
path: root/scripts/ns2ip
diff options
context:
space:
mode:
authorpragmo <pragmo@pragmo.ano>2010-10-28 02:55:59 +0000
committerpragmo <pragmo@pragmo.ano>2010-10-28 02:55:59 +0000
commitf7d78d085a8b0621c888331e4e22108323fdcef2 (patch)
tree95e5b3eea527e64e1a9f9d8015747b0e0a10aebc /scripts/ns2ip
parente2ac0501bc244627ec3f1ee4eb0773e31667e5e8 (diff)
parente40a8a950fa1b493c244905d61e49e55e71d84d0 (diff)
downloadresdb-f7d78d085a8b0621c888331e4e22108323fdcef2.tar.gz
resdb-f7d78d085a8b0621c888331e4e22108323fdcef2.zip
Merge branch 'master' of git://git1.somerandomnick.ano
Diffstat (limited to 'scripts/ns2ip')
-rwxr-xr-xscripts/ns2ip15
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"