diff --git a/sbin/init/init.c b/sbin/init/init.c index 24785fe827a..25ac2bd6390 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -885,8 +885,13 @@ single_user(void) if (Reboot) { /* Instead of going single user, let's reboot the machine */ sync(); - reboot(howto); - _exit(0); + if (reboot(howto) == -1) { + emergency("reboot(%#x) failed, %s", howto, + strerror(errno)); + _exit(1); /* panic and reboot */ + } + warning("reboot(%#x) returned", howto); + _exit(0); /* panic as well */ } shell = get_shell();