Mercurial > hg > anonet-resdb
annotate scripts/ns2ip @ 1202:306a7562f05e draft
????????: abs <post@abslimit.info>
?? ????? master
???? ????? ????????? ? ???????????? ? ?origin/master?.
?????????, ??????? ????? ???????? ? ??????:
????? ????: db/as/49608/owner
????? ????: db/dom/ano/abslimit/owner
????? ????: db/dom/ano/netstalking/owner
????? ????: db/ip/15/0A/0B/00/cidr
????? ????: db/ip/15/0A/0B/00/owner
????? ????: db/usr/abslimit/git
author | abs <abs@abslimit.info> |
---|---|
date | Sun, 13 May 2018 14:57:04 +0300 |
parents | 2f57d4d36759 |
children |
rev | line source |
---|---|
230
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
1 #!/bin/sh |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
2 |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
3 opt="$1" |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
4 if [ "x$opt" = "x-f" ]; then |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
5 shift |
1193
2f57d4d36759
add muh nameserver, some script tweaks
cathugger <cathugger@cock.li>
parents:
230
diff
changeset
|
6 elif ! `dirname "$0"`/check_db_safety; then |
230
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
7 exit 1 |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
8 fi |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
9 ns="$1" |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
10 |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
11 path="`find db/dom/ -ipath '*/ns/'\"$ns\" -size +1c | head -n 1`" |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
12 if [ "x$path" = "x" ]; then |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
13 exit 1 |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
14 fi |
13b137e470cb
added ns2ip script (to make it easy to fix the dnsmasq autogen script)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
15 cat "$path" |