Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Dec 2008 08:29:39 +0000
From:      Frank Shute <frank@shute.org.uk>
To:        Gilles <gilles.ganault@free.fr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: [6.3] Assigning "shutdown" to eg. Syst?
Message-ID:  <20081223082939.GA24805@melon.esperance-linux.co.uk>
In-Reply-To: <du8vk4h09llfrhovtps9rifdngm12bs9gj@4ax.com>
References:  <du8vk4h09llfrhovtps9rifdngm12bs9gj@4ax.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 22, 2008 at 03:31:27PM +0100, Gilles wrote:
>
> Hello
> 
> I'd like to make it easier for my dad to shutdown a server. Instead of
> having him plug a keyboard, log on as root (with a complicated
> password) and finally type "shutdown -h now", is it possible to assign
> this command to some unused key like eg. Syst? Even better, send this
> command only if the key is hit eg. three times within 2 seconds?
> 
> Thank you.
> 

What I'd do is use sudo to enable him to shutdown. Then I'd add this
to /etc/rc.local:

kbdcontrol -f 10 "sudo shutdown -h now"

So, pressing F10 & hitting return will shut the machine down.

Regards,

-- 

 Frank 


 Contact info: http://www.shute.org.uk/misc/contact.html 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081223082939.GA24805>