From 20336bcb00a60bcbb8ed644ed740f3c6b42bcbab Mon Sep 17 00:00:00 2001 From: ceri Date: Wed, 31 May 2006 19:15:20 +0000 Subject: Update the location of the kernel for upgrades. I considered leaving /boot/kernel out of the chflags noschg line, but I seem to remember that there was a period where /boot/kernel was schg, so have left it in for safety's sake. Approved by: jhb MFC after: 1 month --- usr.sbin/sysinstall/installUpgrade.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c index fef7a89..9327b03 100644 --- a/usr.sbin/sysinstall/installUpgrade.c +++ b/usr.sbin/sysinstall/installUpgrade.c @@ -290,11 +290,11 @@ installUpgrade(dialogMenuItem *self) } msgNotify("chflags'ing old binaries - please wait."); - (void)vsystem("chflags -R noschg /bin /sbin /usr/sbin /usr/bin /usr/lib /usr/libexec /var/empty /kernel*"); + (void)vsystem("chflags -R noschg /bin /sbin /usr/sbin /usr/bin /usr/lib /usr/libexec /var/empty /boot/kernel*"); - if (file_readable("/kernel")) { - msgNotify("Moving old kernel to /kernel.prev"); - if (system("mv /kernel /kernel.prev")) { + if (directory_exists("/boot/kernel")) { + msgNotify("Moving old kernel to /boot/kernel.prev"); + if (system("mv /boot/kernel /boot/kernel.prev")) { if (!msgYesNo("Hmmm! I couldn't move the old kernel over! Do you want to\n" "treat this as a big problem and abort the upgrade? Due to the\n" "way that this upgrade process works, you will have to reboot\n" @@ -302,8 +302,9 @@ installUpgrade(dialogMenuItem *self) systemShutdown(1); } else - msgConfirm("NOTICE: Your old kernel is in /kernel.prev should this upgrade\n" - "fail for any reason and you need to boot your old kernel"); + msgConfirm("NOTICE: Your old kernel is in /boot/kernel.prev should this\n" + "upgrade fail for any reason and you need to boot your old\n" + "kernel."); } } -- cgit v1.1