Prevent EC2 machine from halt, poweroff, shutdown
- by Adam Matan
Hi,
EC2 Ubuntu servers erase all disk contents when being shut down. Following an unfortunate accident, I have decided to prevent the command-live halt, poweroff and shutdown.
What's the best way to do it? I thought about renaming these commands (at /sbin) to something like HALT_RENAMED___ERASES_ALL_DISK_CONTENTS.
Are there any files, other than the three listed above, that needs to be handled?
I've noticed that halt and poweroff are merely links to reboot. Should reboot be renamed, too?
Adam