//usage: "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
//usage:#define halt_full_usage "\n\n"
//usage: "Halt the system\n"
-//usage: "\nOptions:"
//usage: "\n -d SEC Delay interval"
//usage: "\n -n Do not sync"
//usage: "\n -f Force (don't go through init)"
//usage: "[-d DELAY] [-n] [-f]"
//usage:#define poweroff_full_usage "\n\n"
//usage: "Halt and shut off power\n"
-//usage: "\nOptions:"
//usage: "\n -d SEC Delay interval"
//usage: "\n -n Do not sync"
//usage: "\n -f Force (don't go through init)"
//usage: "[-d DELAY] [-n] [-f]"
//usage:#define reboot_full_usage "\n\n"
//usage: "Reboot the system\n"
-//usage: "\nOptions:"
//usage: "\n -d SEC Delay interval"
//usage: "\n -n Do not sync"
//usage: "\n -f Force (don't go through init)"
#if ENABLE_FEATURE_WTMP
#include <sys/utsname.h>
-#include <utmp.h>
static void write_wtmp(void)
{
/* runlevels:
* 0 == shutdown
* 6 == reboot */
- rc = execlp(CONFIG_TELINIT_PATH,
+ execlp(CONFIG_TELINIT_PATH,
CONFIG_TELINIT_PATH,
which == 2 ? "6" : "0",
(char *)NULL
);
+ bb_perror_msg_and_die("can't execute '%s'",
+ CONFIG_TELINIT_PATH);
}
}
} else {