DragonFly BSD
DragonFly kernel List (threaded) for 2004-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Why doesn't this script work? (NOT DFly specific)


From: Rahul Siddharthan <rsidd@xxxxxxxxx>
Date: Fri, 20 Feb 2004 01:44:14 -0500

Jonathon McKitrick said on Feb 19, 2004 at 23:19:54:
> 
> rc=2
> netstat -rn | grep -q tun
> retval=$?
> 
> # if not, dial in
> if [ $retval -eq 0 ]; then
                  ^^
I think you have that wrong... grep -q returns 0 if there's a match
(as indeed it does without -q too: 1 if no match, 2 if error), so
you'll be trying to dialup only when you find a tun interface, not
when you don't.

> echo Connecting...
> ppp -ddial nerc
> sleep 60
> fi
> 
> echo Updating ports collection
> /usr/local/bin/cvsup -g -L0 /home/jcm/.admin/ports-supfile


Rahul



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]