On Fri, 30 Mar 2007 14:38:34 -0700, Daevid Vincent wrote:

> > preup() {
> >     if [ ${IFACE} == "ath0" ] && /etc/init.d/net.eth0 --quiet
> > status then
> >             return 1
> >     fi
> > }
> > 
> > This will prevent ath0 starting if eth0 is connected.  
> 
> Thanks Neil for the help, unfortunately it didn't seem to work for me...
> 
> locutus conf.d # /etc/init.d/net.ath0 start
>  * Starting ath0
>  *   Running preup function
> /etc/conf.d/net: line 10:         if: command not found
> /etc/conf.d/net: line 11:         then: command not found
> /etc/conf.d/net: line 12:                 return: command not found
> /etc/conf.d/net: line 13:         fi: command not found
>  *     preup ath0 failed

That's got me. I use a variation of this all the time, and a postdown 
entry for eth0 to switch to wireless when I pull the cable.  There is an
error on that there should be a return 0 after the fi line, but you're
not even getting that far.


-- 
Neil Bothwick

Gravity isn't easy, but it's the law.

Attachment: signature.asc
Description: PGP signature

Reply via email to