Guy Neale wrote: > Hi Darrick > > I've just had a quick look at the pppoe-start script, and I'm not > totally sure (only know enough to be dangerous, but learning), doesn't > the script already check for a valid pid and exit the script if found.
Yes it does. I wasn't saying that what was suggested wouldn't work. It just doesn't seem like the cleanest solution. > if [ -r "$PIDFILE" ] ; then > PID=`cat "$PIDFILE"` > # Check if still running > kill -0 $PID > /dev/null 2>&1 > if [ $? = 0 ] ; then > $ECHO "$ME: There already seems to be a PPPoE connection up (PID > $PID)"$ > exit 1 > fi > # Delete bogus PIDFILE > rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start" > fi > > Regards Guy > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Darrick Hartman (lists) > Sent: Wednesday, 28 November 2007 12:04 AM > To: AstLinux Users Mailing List > Subject: Re: [Astlinux-users] PPPoE > > Guy Neale wrote: >> Hi Dominko >> >> Thanks a million, works a treat. Great idea with crontab >> >> Regards Guy >> / / >> >> /Dominko Vrljic wrote:/ >> >> Guy, >> I have several astlinux box in production with pppoe. This is changes > I >> made in version 0.4.8: >> In file /usr/sbin/pppoe-status replace line 64 with >> for i in /var/run/ppp*.pid ; do >> >> In file file /usr/sbin/pppoe-start include >> CONFIG1=$CONFIG >> before line "export CONFIG" (line 120) >> and replace line 167 + 1 with >> /usr/sbin/pppoe-status $CONFIG1 > /dev/null 2>&1 >> >> Also, in crontab I add line >> */7 * * * * /usr/sbin/pppoe-start >> If adsl modem was turn off when astlinux boot, pppoe never goes up > when >> adsl modem turn on. This is reason for line in crontab. > > It would make a whole lot more sense to write a script that checks if > the pppoe connection is up, then issue a start (or restart) if it's > down. > -- Darrick Hartman DJH Solutions, LLC http://www.djhsolutions.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to [EMAIL PROTECTED]