> Here's what I'd use:
> ping -c 1 a.b.c.d; TESTV=$?; if [ $TESTV != 0 ]; then `ifconfig em0 down`;

I'd suggest something more like:

ping -c 1 $host
[ $? -eq 0 ] && ifconfig em0 down && ifconfig em0 up

or

ping -c 1 $host
if [ $? -eq 0 ]; then
        ifconfig em0 down && ifconfig em0 up
fi


--
Matthew Anthony Kolybabi (Mak)

() ASCII Ribbon Campaign | Against HTML e-mail
/\  www.asciiribbon.org  | Against proprietary extensions

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to