Preventing Accidental Reboots with Molly-Guard
Until a few weeks, I hadn’t heard of a Molly Guard. But after my coworker accidentally rebooted our production NAS, I was tasked with creating a script that kept you from rebooting the wrong server. I wanted it to be much like the Dell Equal Logic PS Series’ [
Until a few weeks, I hadn’t heard of a Molly Guard. But after my coworker accidentally rebooted our production NAS, I was tasked with creating a script that kept you from rebooting the wrong server. I wanted it to be much like the Dell Equal Logic PS Series’]3 command that requires you to type “DeleteAllMyDataNow” (which is the best “are you sure?” message ever).
Legend has it that a mainframe programmer’s daughter Molly kept hitting the Big Red Button to power down the mainframe, so he created a Plexiglas cover as a “Molly-Guard” to keep little Molly from hitting the button again.
Well, the good folks over at Debian createda package called “molly-guard” for Debian systems… which is great, unless you don’t run Debian or a derivative thereof. So for Red Hat Enterprise Linux (RHEL) and its derivatives like CentOS or Scientific Linux, a very generous person modified it and released it for RHEL.
http://lazarus-corner-of-the-world.blogspot.com/2012/11/rpm-builds-for-molly-guard.html
Note: Molly-Guard only works via ssh, not on the console. It assumes you know what you’re doing on the console.
I created a github repo for it so that the code doesn’t disappear someday: https://github.com/tmhorne/molly-guard