]>
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/
5 * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
6 * - added Native Language Support
14 #include "linux_reboot.h"
18 main(int argc
, char *argv
[]) {
20 setlocale(LC_ALL
, "");
21 bindtextdomain(PACKAGE
, LOCALEDIR
);
27 _("You must be root to set the Ctrl-Alt-Del behaviour.\n"));
31 if(argc
== 2 && !strcmp("hard", argv
[1])) {
32 if(my_reboot(LINUX_REBOOT_CMD_CAD_ON
) < 0) {
33 perror("ctrlaltdel: reboot");
36 } else if(argc
== 2 && !strcmp("soft", argv
[1])) {
37 if(my_reboot(LINUX_REBOOT_CMD_CAD_OFF
) < 0) {
38 perror("ctrlaltdel: reboot");
42 fprintf(stderr
, _("Usage: ctrlaltdel hard|soft\n"));