network connection auto reset (dhcp)
hi!
i have a rather strange question.
is it possible to check somehow when the internet cable is disconnected and then reconected so that i can then launch this simple script:
killall -q dhcpcd
dhcpcd eth0
meaning, to reset it and get the ip address again.
anything in C/C++ language would be helpfull. or in script if that's easier.
the thing is i don't want to make a loop. just a interrupt call or something similar.
thanks
indy
|