+optional argument $1 to override detected IP address
authorshort <>
Thu, 18 Apr 2002 15:21:57 +0000 (15:21 +0000)
committershort <>
Thu, 18 Apr 2002 15:21:57 +0000 (15:21 +0000)
/home/short/secure/ndc-reload-short += argument "kratochvil.vellum.cz"

bin/kratochvil.vellum.cz-update

index 99b5c01..bbf3113 100755 (executable)
@@ -2,6 +2,7 @@
 
 lockfile="/home/short/bin/kratochvil.vellum.cz-update.lock"
 kratochvil_IP="`echo "${SSH_CLIENT:-$SSH2_CLIENT}"|cut -d ' ' -f 1`"
+kratochvil_IP="${1:-$kratochvil_IP}"
 kratochvil_IP_back="`echo "$kratochvil_IP"|sed 's/\./\\\\./g'`"
 named_dir="/etc/named"
 cf_file="$named_dir/cf/kratochvil.vellum.cz"
@@ -20,6 +21,6 @@ if grep -q '^  `'"$kratochvil_IP_back'"'$' "$cf_file";then
 echo "$0: Updating new IP $kratochvil_IP..."
 echo -e '%s#\(^  `\)[0-9.]*\('"'"'\)$#\\1'"$kratochvil_IP"'\\2#\nw'|ed -s "$cf_file"
 make -C "$named_dir" --assume-new="ver/.version"
-/home/short/secure/ndc-reload-short
+/home/short/secure/ndc-reload-short kratochvil.vellum.cz
 echo "$0: Update done."
 exit 0