I've got a few commands that I run in rc.localrc.local so they are run last in the startup sequence. I would like to know if there is a similar facility for undoing the results of those commands at shutdown, like an rc.shutdownrc.shutdown. Ideally, it would be run before any of the other /etc/init.d/etc/init.d scripts.