]> git.wh0rd.org Git - home.git/commitdiff
donsupdate: punt
authorMike Frysinger <vapier@gentoo.org>
Sun, 21 Feb 2016 03:21:45 +0000 (22:21 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 21 Feb 2016 03:21:45 +0000 (22:21 -0500)
.bin/donsupdate [deleted file]

diff --git a/.bin/donsupdate b/.bin/donsupdate
deleted file mode 100755 (executable)
index ae7c176..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-[ "$1" = "-u" ] && UPDATE=true || UPDATE=false
-
-IP=`ip a s dev eth0 | sed -n '/inet 10\./s:.*inet \([^/ ]*\).*:\1:p'`
-
-doit() {
-       HOST=$1
-       DOMAIN="ad.analog.com"
-       FQDN="$HOST.$DOMAIN"
-
-       if ${UPDATE} ; then
-               currip=$(dig +short $FQDN)
-               [ "${currip}" = "${IP}" ] && return 0
-       fi
-
-       cat <<-EOF | nsupdate
-       server 10.64.53.110
-       update delete $FQDN A
-       update add $FQDN 86400 A $IP
-       send
-       EOF
-}
-
-doit vapier-adi
-doit vapier