Linux Online Advertisement
[ Register ]

[ Applications ]
[ Documentation ]
[ Distributions ]
[ Download Info ]
[ General Info ]
[ Book Store ]

Advertisement

[ Courses ]
[ News ]
[ People ]
[ Hardware ]
[ Vendors ]
[ Projects ]
[ Events ]
[ User Groups ]
[ User Area ]

Building Embedded Linux Systems

[ About Us ]
[ Home Page ]
[ Advertise ]

Adjust behaviour of CtrlAltDelete

9.10. Adjust behaviour of Ctrl-Alt-Delete

The IBM PC used Ctrl-Alt-Delete to launch a reboot of the computer. Linux traps this key chord and makes it available to the init system. This is done by sending the init process a SIGINT signal (although ctrlaltdel hard can undo this trap and make the key chord reboot the comptuer immediately). The init system uses /etc/inittab to determine how to handle the signal generated by the Ctrl-Alt-Delete key chord.

Most distributions cleanly reboot the system, mimicing the behaviour that most users expect. Figure 9-14 shows how this is done.

Figure 9-14. Default handling of Ctrl-Alt-Delete in /etc/inittab

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

Depending upon each individual site you may wish to disable Ctrl-Alt-Delete. This is shown in Figure 9-15.

Figure 9-15. Ignoring Ctrl-Alt-Delete in /etc/inittab

# Trap CTRL-ALT-DELETE and do nothing
ca::ctrlaltdel:

Alternatively, you may wish to cleanly shut down the computer. This is very easy to explain to operators and instructions can be displayed on the monitor using /etc/issue or a Post-it Note. If the computer uses Advanced Power Management (or APM) then shutting down the computer will also remove the power.

Figure 9-16. Shut down cleanly upon Ctrl-Alt-Delete in /etc/inittab

# Trap CTRL-ALT-DELETE and shut down
ca::ctrlaltdel:/sbin/shutdown -t3 -h now


Comments: feedback (at) linux.org
Advertising: banners (at) linux.org
Copyright Linux Documentation Project.
Compilation ©1994-2008 Linux Online, Inc.
All rights reserved.