summaryrefslogtreecommitdiff
path: root/sbin/reboot
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-05-11 01:53:08 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-05-11 01:53:08 +0000
commit9ead1b63dfa7820702f3f5d3539747993ec1a86c (patch)
treecb394650ecc3be7e1130c3d507d640817ad11490 /sbin/reboot
parent6d27a7ecb506e06b25b5a52b13613373056df2ed (diff)
it's silly for reboot to poweroff. adapted from diff by diana eichert
Diffstat (limited to 'sbin/reboot')
-rw-r--r--sbin/reboot/reboot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 26e7d937a69..7af23edd443 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: reboot.c,v 1.28 2006/06/01 17:22:14 dhill Exp $ */
+/* $OpenBSD: reboot.c,v 1.29 2007/05/11 01:53:07 tedu Exp $ */
/* $NetBSD: reboot.c,v 1.8 1995/10/05 05:36:22 mycroft Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)reboot.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: reboot.c,v 1.28 2006/06/01 17:22:14 dhill Exp $";
+static char rcsid[] = "$OpenBSD: reboot.c,v 1.29 2007/05/11 01:53:07 tedu Exp $";
#endif
#endif /* not lint */
@@ -201,7 +201,7 @@ main(int argc, char *argv[])
default:
/* rc exits 2 if powerdown=YES in rc.shutdown */
waitpid(pid, &status, 0);
- if (WIFEXITED(status) && WEXITSTATUS(status) == 2)
+ if (dohalt && WIFEXITED(status) && WEXITSTATUS(status) == 2)
howto |= RB_POWERDOWN;
}
}