diff options
author | ceri <ceri@FreeBSD.org> | 2006-05-31 19:15:20 +0000 |
---|---|---|
committer | ceri <ceri@FreeBSD.org> | 2006-05-31 19:15:20 +0000 |
commit | 20336bcb00a60bcbb8ed644ed740f3c6b42bcbab (patch) | |
tree | ce2b9fb3b50dc5726160115b05f6bb462d7f4459 | |
parent | dd4344c347b8e5972351c21a5ef9ea9e776bd548 (diff) | |
download | FreeBSD-src-20336bcb00a60bcbb8ed644ed740f3c6b42bcbab.zip FreeBSD-src-20336bcb00a60bcbb8ed644ed740f3c6b42bcbab.tar.gz |
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
-rw-r--r-- | usr.sbin/sysinstall/installUpgrade.c | 13 |
1 files changed, 7 insertions, 6 deletions
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."); } } |