]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/ctrlaltdel.c
2 * ctrlaltdel.c - Set the function of the Ctrl-Alt-Del combination
3 * Created 4-Jul-92 by Peter Orbaek <poe@daimi.aau.dk>
4 * ftp://ftp.daimi.aau.dk/pub/linux/poe/
10 #include "linux_reboot.h"
13 main(int argc
, char *argv
[]) {
17 "You must be root to set the Ctrl-Alt-Del behaviour.\n");
21 if(argc
== 2 && !strcmp("hard", argv
[1])) {
22 if(my_reboot(LINUX_REBOOT_CMD_CAD_ON
) < 0) {
23 perror("ctrlaltdel: reboot");
26 } else if(argc
== 2 && !strcmp("soft", argv
[1])) {
27 if(my_reboot(LINUX_REBOOT_CMD_CAD_OFF
) < 0) {
28 perror("ctrlaltdel: reboot");
32 fprintf(stderr
, "Usage: ctrlaltdel hard|soft\n");