summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-07-02 23:46:02 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2011-07-02 23:46:02 (GMT)
commit104e01409de48057f34fa8abe3fcae11820a651c (patch)
treede6d47723f8e9f528c2023e357104d1d17551c44
parent75214cfe00c72c51c67c9ac2541f06b0540136f1 (diff)
downloadbusybox-104e01409de48057f34fa8abe3fcae11820a651c.tar.gz
busybox-104e01409de48057f34fa8abe3fcae11820a651c.tar.bz2
halt/reboot: better message if /sbin/telinit is not found
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--init/halt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/halt.c b/init/halt.c
index 433326d..1aac0fa 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -154,11 +154,13 @@ int halt_main(int argc UNUSED_PARAM, char **argv)
/* runlevels:
* 0 == shutdown
* 6 == reboot */
- rc = execlp(CONFIG_TELINIT_PATH,
+ execlp(CONFIG_TELINIT_PATH,
CONFIG_TELINIT_PATH,
which == 2 ? "6" : "0",
(char *)NULL
);
+ perror_msg_and_die("can't execute '%s'",
+ CONFIG_TELINIT_PATH);
}
}
} else {