I need to have a script run at shutdown that saves some log files from ramdisk to Compact Flash, so they will be there on next bootup.(I keep them in ramdisk so as not to abuse the CF)
I thought I could just do this by having a script in /etc/rc.d/init.d, and the having it get called when i went into runlevel 0, like so...
K09save_logs -> ../init.d/save_logs
But when it would not work, I, (O.K. my boss), finally figured out that whatever program excutes the Kill, first checks to see if there is a process called "save_logs" running. Since there is no process, it does not bother calling the script.
Is there some simple way to override this behavior,(i.e force the runlevel change to execute the script) or must I write a little process called "save"logs",that just sits there so it can be found at shutdown time?