1 --- src/halt.c-dupa 2008-08-20 14:45:39.019976250 +0200
2 +++ src/halt.c 2008-08-20 14:49:35.418750250 +0200
7 - fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i]%s\n",
8 + fprintf(stderr, "usage: %s [-n] [-w] [-d] [-f] [-h] [-i] [-c]%s\n",
9 progname, strcmp(progname, "halt") ? "" : " [-p]");
10 fprintf(stderr, "\t-n: don't sync before halting the system\n");
11 fprintf(stderr, "\t-w: only write a wtmp reboot record and exit.\n");
13 fprintf(stderr, "\t-f: force halt/reboot, don't call shutdown.\n");
14 fprintf(stderr, "\t-h: put harddisks in standby mode.\n");
15 fprintf(stderr, "\t-i: shut down all network interfaces.\n");
16 + fprintf(stderr, "\t-c: ask for confirmation.\n");
17 if (!strcmp(progname, "halt"))
18 fprintf(stderr, "\t-p: power down the system (if possible, otherwise halt).\n");
35 - while((c = getopt(argc, argv, ":ihdfnpwt:")) != EOF) {
36 + while((c = getopt(argc, argv, ":ihdfnpwct:")) != EOF) {
53 if (!do_hard && !do_nothing) {
55 + fprintf(stderr, "Are you sure you want to reboot? N/y.\n");
56 + scanf("%c", &answer);
57 + if (tolower(answer) != 'y') exit(1);
60 * See if we are in runlevel 0 or 6.