puppy have an unusual interface management , so the internet is not helping
any idea?
How to execute a script once an interface is up or down?
So long as DHCP's running, it's "ifconfig eth0 up" for me. Down drops it. If you meant wireless, look @ these examples.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
EDIT: i meant after i bring an interface up , like : ifconfig eth0 up, i would like for a script(specific to that NIC) to be automatically executed ;
like this question here:
http://www.cyberciti.biz/tips/how-do-i- ... gs-up.html
like this question here:
http://www.cyberciti.biz/tips/how-do-i- ... gs-up.html
I use this loop at the beginning of a keep alive/NFS scan script...it basically polls the network until the internet appears... it might be adaptable for your use..you could probably drop the SUBNET bit and just check for ANY output
mike
Code: Select all
while [ "$SUBNET" = "" ]; do
SUBNET=$(ifconfig | grep inet | grep -v 127.0.0.1 | awk '{print $2}' | cut -d ':' -f 2)
sleep 20
done