[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Here's an easy question, how shutdown debian?



On Sun, 18 Jul 1999, [iso-8859-1] André Bell wrote:

> If so, what is the command to shutdown?  Or is it simply cntrl/alt/del to
> cause debian to stop everything from running and then turn it off at memory
> checking?  That's the only way I know how to avoid error messages that say
> the system was not properly unmounted.

If you want, you can make ctrl-alt-del halt the system instead of
rebooting. Just edit this line in /etc/inittab:
  ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

If you replace the -r with -h, it will halt instead of rebooting. The -a
option is a security measure: with the -a option, reboot will fail unless
root or one of the users mentioned in /etc/shutdown.allow is logged in on
the console. Read the shutdown manpage for more info.


You can also define a second key combination to halt the system, leaving
ctrl-alt-del as reboot. IIRC, you have to do two things to make this work.

1. Edit /etc/kbd/default.map.gz (or whichever keyboard map you use),
   adding KeyboardSignal entries for the key combination you want. For
   example, to have ctrl-alt-end halt, you'd add these two lines:
        altgr   control keycode 107 = KeyboardSignal
        control alt     keycode 107 = KeyboardSignal
   "showkey" can help you find the keycode number for the key you want to
   use.

2. Edit the 'kb' line in /etc/inittab to this:
     kb:12345:kbrequest:/sbin/shutdown -t1 -a -h now


Reply to: