I've read the answers to this and similar questions already, but so far none had worked for me.
On my Ubuntu 11.10 (oneiric) system, all the files in /etc/rc0.d/ and /etc/rc0.d/ are links. I put my script (called *shutdown_script*) in the /etc/init.d/ directory and created two symbolic links to it, one in /etc/rc0.d/ and the other in /etc/rc6.d, both with the name *K99shutdown_script*.
I need a registry entry to a run once script at shutdown or reboot.
I needs cleanup sensitive data after an installation.
So even if the installation failed or got interrupted, i may not leave data behind.
The system cant make use of a group policy.
And also i cant put something in the end in my other software-install script.
So in the software-instal script i cannt put in shutdown command.