#!/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 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 $circ & for i in $wait_string; do [ -f $dyn_lock ] || break sleep 1 done done 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 if [ -f /var/run/syslogd.pid ]; then update_hosts $hosts 2>&1 | logger -t ip-up410.dyndns > /dev/null 2>&1 & else update_hosts $hosts >/dev/console 2>&1 & fi fi