Re: Accidental shutdown

2009-05-21 Thread Scott Gifford
Bhasker C V writes: > Is there a method to prevent accidental powerdown of a linux box ? >or atleast alert ? If you get in the habit of running "shutdown -r +1" instead of "reboot", it will warn users for 1 minute before shutting down the server. That should give you enough time to run "s

Re: Accidental shutdown

2009-05-21 Thread Todd A. Jacobs
On Thu, May 21, 2009 at 12:31:47AM +0100, Bhasker C V wrote: > I can rename and shell wrap the binaries poweroff/shutdown/reboot but > that would not be a clean method and I am sure there should be much > better way than that. Nope. You could disable the reboot command in your sudoers file, bu

Re: Accidental shutdown

2009-05-21 Thread Bhasker C V
Thanks all I was looking for an utility exactly like molly-guard. Got it ! thanks again. On Thu, 21 May 2009, Daniel Husand wrote: On 21.05.2009 01:31, Bhasker C V wrote: Is there a method to prevent accidental powerdown of a linux box ? or atleast alert ? leda:~# reboot W: molly-guard: SS

Re: Accidental shutdown

2009-05-21 Thread Neal Hogan
On Wed, May 20, 2009 at 6:52 PM, Daniel Husand wrote: > On 21.05.2009 01:31, Bhasker C V wrote: >> >> Is there a method to prevent accidental powerdown of a linux box ? >> or atleast alert ? A shellscript that pauses, outputs machine/system info of the box that your "rebooting," and asks if this

Re: Accidental shutdown

2009-05-20 Thread Daniel Husand
On 21.05.2009 01:31, Bhasker C V wrote: Is there a method to prevent accidental powerdown of a linux box ? or atleast alert ? leda:~# reboot W: molly-guard: SSH session detected! Please type in hostname of the machine to reboot: fnutt Good thing I asked; I won't reboot leda ... W: aborting rebo

Re: Accidental shutdown

2009-05-20 Thread Chris Jones
On Wed, May 20, 2009 at 07:31:47PM EDT, Bhasker C V wrote: > Hi all, > > Is there a method to prevent accidental powerdown of a linux box ? > or atleast alert ? You could always issue a: # shutdown 1 which leaves you one minute to cancel your shutdown request. ?? CJ -- To UNSUBSCRIBE, e

Accidental shutdown

2009-05-20 Thread Bhasker C V
Hi all, Is there a method to prevent accidental powerdown of a linux box ? or atleast alert ? This usually happens when there are too many machines being managed and I accidentally run 'sudo reboot' on some other system rather than the one intented. I can rename and shell wrap the b