repo: resdb
action: commit
revision: 
path_from: 
revision_from: 7e5469a0dee1fbaf661720fc330d47d992f1d8fe:
path_to: 
revision_to: 
git.thebackupbox.net
resdb
git clone git://git.thebackupbox.net/resdb
commit 7e5469a0dee1fbaf661720fc330d47d992f1d8fe
Author: cathugger 
Date:   Fri Mar 10 03:30:16 2017 +0000

    add muh nameserver, some script tweaks

diff --git a/db/as/6370/owner b/db/as/6370/owner
new file mode 100644
index 0000000000000000000000000000000000000000..9b9498544bae431104453eac9025742f1eaac582
--- /dev/null
+++ b/db/as/6370/owner
@@ -0,0 +1 @@
+cathugger
diff --git a/db/dom/ano/cathugger/ns/uz56x91zhcjmtvt5r6gj8fg5rxybgqw9wvu5vpy55gp4vjhllbtwl5.ns.cathugger.ano b/db/dom/ano/cathugger/ns/uz56x91zhcjmtvt5r6gj8fg5rxybgqw9wvu5vpy55gp4vjhllbtwl5.ns.cathugger.ano
new file mode 100644
index 0000000000000000000000000000000000000000..1921233b3e10b450bd3d5f367bb342f1b864fea2
--- /dev/null
+++ b/db/dom/ano/cathugger/ns/uz56x91zhcjmtvt5r6gj8fg5rxybgqw9wvu5vpy55gp4vjhllbtwl5.ns.cathugger.ano
@@ -0,0 +1 @@
+1.0.0.0
diff --git a/db/dom/ano/cathugger/owner b/db/dom/ano/cathugger/owner
new file mode 100644
index 0000000000000000000000000000000000000000..9b9498544bae431104453eac9025742f1eaac582
--- /dev/null
+++ b/db/dom/ano/cathugger/owner
@@ -0,0 +1 @@
+cathugger
diff --git a/db/ip/15/00/00/cidr b/db/ip/15/00/00/cidr
new file mode 100644
index 0000000000000000000000000000000000000000..c5d43a49688409426913b8fbc2c0b2f5d71b87bd
--- /dev/null
+++ b/db/ip/15/00/00/cidr
@@ -0,0 +1 @@
+21.0.0.0/24
diff --git a/db/ip/15/00/00/owner b/db/ip/15/00/00/owner
new file mode 100644
index 0000000000000000000000000000000000000000..9b9498544bae431104453eac9025742f1eaac582
--- /dev/null
+++ b/db/ip/15/00/00/owner
@@ -0,0 +1 @@
+cathugger
diff --git a/scripts/add_ip b/scripts/add_ip
index 0d7d87c4c93a2f695fa10e9044d96c5463976884..
index ..e582a49d91774ef73c7152477fa1a47fdeb44b4d 100755
--- a/scripts/add_ip
+++ b/scripts/add_ip
@@ -5,7 +5,7 @@ if [ x"$2" = x ]; then
 fi

 cidr="$1"
-hex="$(./scripts/cidr2hex "$cidr")"
+hex=$($(dirname "$0")/cidr2hex "$cidr") || exit 1
 dir=db/ip/"$hex"
 if [ -e "$dir" ]; then
  echo "Refusing to clobber existing record" >&2; exit 1
diff --git a/scripts/cidr2hex b/scripts/cidr2hex
index 36974e007620d7a10ee838db2c20ae14eb49a709..
index ..7a845224f7b7f55313eea900ce6ac2078745762c 100755
--- a/scripts/cidr2hex
+++ b/scripts/cidr2hex
@@ -4,4 +4,6 @@ if [ x"$1" = x ]; then
  echo "Usage: $0 " >&2; exit 255
 fi

-./scripts/ip2hex "$(./scripts/cidr2ip "$1")"
+dn=$(dirname "$0")
+ip=$("$dn"/cidr2ip "$1") || exit 1
+"$dn"/ip2hex "$ip"
diff --git a/scripts/dec2hex b/scripts/dec2hex
index 9194d0125f445d810e803776b1ea93f142e39b22..
index ..53ccf10542ad610a17d703c3a83beed4a18bf490 100755
--- a/scripts/dec2hex
+++ b/scripts/dec2hex
@@ -17,6 +17,6 @@
    bc -q
   ) | tail -c3
  else
-  cat ./scripts/dec2hex.d/"$(cat)"
+  cat `dirname "$0"`/dec2hex.d/"$(cat)"
  fi
 )
diff --git a/scripts/git-config b/scripts/git-config
index bad9a0beb5bb50fb6f97c180a575425f504f0c2f..
index ..d55954a530211f836dbbe59bd66463cd139404e7 100755
--- a/scripts/git-config
+++ b/scripts/git-config
@@ -1,5 +1,5 @@
 #!/bin/sh
-[ -z $2 ] && echo 'Usage: ./scripts/git-config  '
+[ -z $2 ] && echo "Usage: $0  " >&2
 [ -z $2 ] && exit 1

 git config user.name $1
diff --git a/scripts/git-pull b/scripts/git-pull
index 260c33bb4bb9adf237a2c3596043e521ccb94370..
index ..449d6a89cfd1f3d43f5956d4efc4f9edf3d8e908 100755
--- a/scripts/git-pull
+++ b/scripts/git-pull
@@ -1,7 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 if [ -z "$1" ]; then
-    echo './scripts/git-pull $PEER_NAME'
+    echo "Usage: $0 \$PEER_NAME" >&2
     exit 1
 fi
-[ -e db/usr/"$1"/git ] && git pull `cat db/usr/"$1"/git` master
-[ -e db/usr/"$1"/git ] || echo "./git-pull: record does not exist for $1"
+[ -e db/usr/"$1"/git ] && git pull `cat db/usr/"$1"/git` master || echo "$0: record does not exist for $1" >&2
diff --git a/scripts/hex2dec b/scripts/hex2dec
index bf5d82d0be6923de71b42f9358d0eafec5ef0222..
index ..1a59f5ad8d2959b085e21e422467edc481a89ad1 100755
--- a/scripts/hex2dec
+++ b/scripts/hex2dec
@@ -12,6 +12,6 @@
  if [ x"$USE_BC" = x1 ]; then
   bc -q
  else
-  cat ./scripts/hex2dec.d/"$(cat)"
+  cat `dirname "$0"`/hex2dec.d/"$(cat)"
  fi
 )
diff --git a/scripts/ip2hex b/scripts/ip2hex
index 2c8ce367020d903bf185d58f03db6ea05bf3e3fb..
index ..9cd2a997da858dd91db956f2ce87a57a174a85ff 100755
--- a/scripts/ip2hex
+++ b/scripts/ip2hex
@@ -5,5 +5,5 @@ if [ x"$1" = x ]; then
 fi

 for x in $(echo -n "$1" | tr . ' ') ; do
- ./scripts/dec2hex "$x"
+`dirname "$0"`/dec2hex "$x"
 done | tr '\n' / | head -c -1 ; echo
diff --git a/scripts/ns2ip b/scripts/ns2ip
index ff5bf2b75d97d766a555f2546bc527e0c03b8187..
index ..f5e965b789494790f0937c19bcb0d8ddfd19b474 100755
--- a/scripts/ns2ip
+++ b/scripts/ns2ip
@@ -3,7 +3,7 @@
 opt="$1"
 if [ "x$opt" = "x-f" ]; then
  shift
-elif ! ./scripts/check_db_safety; then
+elif ! `dirname "$0"`/check_db_safety; then
  exit 1
 fi
 ns="$1"
diff --git a/scripts/update-git-remotes b/scripts/update-git-remotes
old mode 100644
new mode 100755
index 8048d54da2419a3b261a2ec19dd4ca2d208c37ae..04300cca3e54cbcef2003c403a3b83fbdcc1eb71
--- a/scripts/update-git-remotes
+++ b/scripts/update-git-remotes
@@ -4,7 +4,7 @@
 # TODO: detect users' git address changes
 #

-if ! ./scripts/check_db_safety; then
+if ! `dirname "$0"`/check_db_safety; then
  exit 1
 fi

-----END OF PAGE-----