Correct the file that reboot -k creates so that it works with the new

nextboot functionality.

Reviewed by:	jake (mentor)
This commit is contained in:
gordon 2002-05-28 21:15:49 +00:00
parent 9a224c4d1d
commit 6c177c58a0

View File

@ -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);