FYI, this is insufficient to stop root FS corruption.
I tested this on lucid, and occasionally it still fails the remount of /
This is because the SIGTERM signal is sent by telinit u, but then we don't wait for upstart to re-exec itself before moving on to the umount. This fails about 50% of the time on lucid.
The simple, but incomplete, solution is to add a sleep 1 after telinit u. The more appropriate solution is to have telinit ptrace 1 with PTRACE_O_TRACEEXEC.
FYI, this is insufficient to stop root FS corruption.
I tested this on lucid, and occasionally it still fails the remount of /
This is because the SIGTERM signal is sent by telinit u, but then we don't wait for upstart to re-exec itself before moving on to the umount. This fails about 50% of the time on lucid.
The simple, but incomplete, solution is to add a sleep 1 after telinit u. The more appropriate solution is to have telinit ptrace 1 with PTRACE_O_TRACEEXEC.