1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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
This commit is contained in:
Ceri Davies 2006-05-31 19:15:20 +00:00
parent e680b88a3d
commit 04e273bfb1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159112

View File

@ -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.");
}
}