summaryrefslogtreecommitdiffstats
path: root/sbin/reboot
diff options
context:
space:
mode:
authorgordon <gordon@FreeBSD.org>2002-05-28 21:15:49 +0000
committergordon <gordon@FreeBSD.org>2002-05-28 21:15:49 +0000
commite13f727e6ba268ec6cde31dfcc44f0677a178a86 (patch)
treeec89d2ba89a0e800aaf0b08e05ee38dbc6f1229f /sbin/reboot
parent4b5c89df315b4317ec558fe10e1a9c661dc65515 (diff)
downloadFreeBSD-src-e13f727e6ba268ec6cde31dfcc44f0677a178a86.zip
FreeBSD-src-e13f727e6ba268ec6cde31dfcc44f0677a178a86.tar.gz
Correct the file that reboot -k creates so that it works with the new
nextboot functionality. Reviewed by: jake (mentor)
Diffstat (limited to 'sbin/reboot')
-rw-r--r--sbin/reboot/reboot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 7f42e56..0c85c15 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -125,6 +125,7 @@ main(int argc, char *argv[])
if (kflag) {
fd = open("/boot/nextboot.conf", O_WRONLY | O_CREAT, 0444);
if (fd > -1) {
+ (void)write(fd, "nextboot_enable=\"YES\"\n", 22);
(void)write(fd, "kernel=\"", 8L);
(void)write(fd, kernel, strlen(kernel));
(void)write(fd, "\"\n", 2);
OpenPOWER on IntegriCloud