Subject: Re: reboot via control-alt-delete?
To: Aaron J. Grier <agrier@poofygoof.com>
From: Frederick Bruckman <fb@enteract.com>
List: port-i386
Date: 01/18/2000 02:56:27
On Mon, 17 Jan 2000, Aaron J. Grier wrote:
> this is kind of a stupid question, but is there any way to invoke
> shutdown via a keypress (like control-alt-delete) from a login screen on
> an i386 running 1.4 and wscons? running "reboot" from ddb doesn't
> unmount filesystems.
>
> Other than giving my boss the root password or leaving an open root
> login, the only other option seems to be a "shutdown" account...
The last option is probably the best. As long as you add the account
to the operator group, you can make the account's shell a script
(_not_ suid) that calls /sbin/shutdown with the appropriate arguments.
The rest of your shutdown goo belongs in /etc/rc.shutdown.local.
There is a way to shut down cleanly from the debugger, but I don't
know if I'd trust that to a supervisor. ;-)
db> kill 1
db> c
....
# sync
# sync
# sync
# shutdown -r now
This assumes that the console is marked secure in /etc/ttys. In fact,
having the debugger available is practically equivalent to having the
root password, trivially so if the console is marked secure (as you
can see).