|
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 reconectedso that i can then launch this simple script:
killall -q dhcpcd
dhcpcd eth0
meaning, to reset it and get the ip address.
i know it's more of a programming issue but i thought i would give it a shot here. 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 similar.
thanks
indy
|