Specify machine name on reboot/halt/shutdown
Dr. David Alan Gilbert
ubuntu at treblig.org
Sun May 27 21:44:20 BST 2007
Hi,
After having rebooted the wrong box in my time and having seen other
people done it as well I thought it was about time that reboot, halt,
and shutdown had a little protection added; the patch I include here
adds an option to let you specify the hostname of the machine you
believe you are shutting down; e.g.
# halt -m davros
halt: The hostname you gave 'davros', does not match the system hostname: 'gallifrey'
I also add the (more controversial) requirement that you specify
the -m/--host if you are calling the command from a terminal
but I let you override this with --nohostcheck ; this needs adding to
the /etc/init.d/halt script and a few others in the same directory.
The patch is attached to the following bug in launchpad:
https://bugs.launchpad.net/upstart/+bug/117215
Thoughts?
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
More information about the upstart-devel
mailing list