Run some commands on system shutdown
Hi, does anyone know how can I configure my Fedora Core 2 distribution to run some commands when it is shutting down?
More specifically, I need to run "/sbin/dhclient -r" for it to release the IP from the DHCP server, before it turns my eth0 interface down. I actually can't remember if this has to be as root user, but I think it does... so I'd need to run it as root.
It would be great if it was possible on shutdown, but I think that on logout it would solve my problem too.