#!/bin/sh #------------------------------------------------------------------------------ # /etc/ppp/ip-up.zdyndns - Update for DynDNS-Providers # part of Package DYNDNS __FLI4LVER__, see documentation for licence # # (c) copyright 2001-2002 Thomas Mueller # (c) copyright 2002-2004 Tobias Gruetzmacher # # Creation: 05.08.2002 tobig # Last Update: $Id$ #------------------------------------------------------------------------------ update_hosts () { wait_time=2 wait_string=`seq 1 $wait_time` dyn_lock=/var/run/dyndns/dyndns_ip-up.$$ while [ "$1" ]; do > ${dyn_lock}.$1 host=$1 circ=$2 shift 2 echo "Starting update for '$host' on circuit '$circ' (dev '$dev')" nice -10 dyndns-update.sh -s -l ${dyn_lock}.${host} $host $circ & for i in $wait_string; do [ -f ${dyn_lock}.${host} ] || break sleep 1 done done # lock-file was removed by dyndns-update.sh #rm -f $dyn_lock } if [ -f /etc/dyndns/dyndns.conf ]; then hosts= while read host provider circ user pass; do for j in `echo $circ | sed 's/,/ /g'`; do file=/var/run/circuit-$j if [ -f $file ]; then read dev < $file if [ "$dev" = "$interface" ]; then hosts="$hosts $host $j" fi fi done done < /etc/dyndns/dyndns.conf update_hosts $hosts 2>&1 | logmsg ip-up410.dyndns & fi