aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/sysinstall/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/sysinstall/exec.c')
-rw-r--r--sbin/sysinstall/exec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/sysinstall/exec.c b/sbin/sysinstall/exec.c
index 40b5eb0c52a1..00f6cd76281f 100644
--- a/sbin/sysinstall/exec.c
+++ b/sbin/sysinstall/exec.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: exec.c,v 1.5 1994/10/29 10:01:32 phk Exp $
+ * $Id: exec.c,v 1.6 1994/11/08 14:04:16 jkh Exp $
*
*/
@@ -24,6 +24,7 @@
#include <sys/wait.h>
#include <sys/param.h>
#include <sys/mount.h>
+#include <sys/reboot.h>
#include "sysinstall.h"
@@ -73,8 +74,8 @@ exec(int magic, char *cmd, char *args, ...)
while ((w = wait(&status)) != pid && w != -1)
;
- if (w == 20 && magic == 3) /* special case for bininst */
- execl("/sbin/init", "/sbin/init", 0);
+ if ((status >> 8) == 20 && magic == 3) /* special case for bininst */
+ reboot(RB_AUTOBOOT);
if (w == -1)
Fatal("Child process %s terminated abnormally\n", cmd);
return(status);