Subject: Re: ip-up Script Not Running
To: Randy Beaudreault <maccult@pacbell.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 04/07/2002 16:37:52
On Sat, Apr 06, 2002 at 10:16:13AM -0800, Randy Beaudreault wrote:
> Hello all,
>
> I'm trying to figure out why my ip-up script is not running. I'm
> using PPPoE for my ADSL connection protocol and I'm trying to run a
Are you using in-kernel PPPoE, or one of the pppoe userland package ?
> dyndns.org site via this. I'm using ddclient as my update agent and
> using the prepackage ip-up script with modifications for my local
> environment. The troubleI'm having is that I can run the script
> manually using Here's the script:
> #!/bin/sh
> ######################################################################
> ## $Header: /home/paul/src/ddclient/RCS/sample-etc_ppp_ip-up.local,v
> 3.5 2001/08/25 14:22:00 root Exp root $
> ######################################################################
> ##
> ## On my host, pppd invokes this script with args:
> ## /etc/ppp/ip-up.local ppp0 /dev/pts/1 115200 192.168.2.1 192.168.2.3
> ##
> ## From the manual page for my pppd, these aguments are:
> ## scriptname interface-name tty-device speed local-IP-address
> remote-IP-address ipparam
> ##
> ## Some people have reported that their pppd returns their
> ## local-IP-address as $3. If that's also the case for you,
> ## you may need to change the $4 below to $3. This may not
> ## be necessary if you pppd also passes the local-ip-address
> ## in the environment as either PPP_LOCAL or IPLOCAL.
> ##
> ######################################################################
> PATH=/usr/sbin:/root/bin:${PATH}
> IP=
> IP=${IP:-$PPP_LOCAL}
> IP=${IP:-$IPLOCAL}
> IP=${IP:-$3}
>
> ## update the DNS server unless the IP address is a private address
> ## that may be used as a internal LAN address (or PPtP tunnel).
>
> logger -t ddclient $0 $*
> case "$IP" in
> 10.*) ;;
> 172.1[6-9].* | 172.2[0-9].* | 172.31.*) ;;
> 192.168.*) ;;
> "") logger -t ddclient No local IP given so cannot update
> ;;
> *) (
> sleep 5
> ddclient -daemon=0 -syslog -use=if
> -if=$1 >/dev/null 2>&1
> ) &
> ;;
> esac
> As I understand this script, it just calls ddclient with the
> arguments listed. Why isn't this script running after being called
> by the ppp process? I can run the console echoed ip-up line manually
> with no problems.
>
> One thing I do notice is this line from my dmesg:
> starting local daemons:/usr/pkg/etc/rc.d/ddclient: WARNING: $ddclient
> is not set properly.
> I would guess that a problem with this rc script is the
> ${ddclient_flags} and ${command_args} variables since they don't seem
> to get set anywhere in this script. How can I fix those and the
> above $ddclient not set properly?
Yes, in /etc/rc.conf add:
ddclient=NO
As ddclient should be called from ip-up don't start it at boot time.
--
Manuel Bouyer <bouyer@antioche.eu.org>
--