diff options
author | jkh <jkh@FreeBSD.org> | 1997-09-09 09:19:30 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-09-09 09:19:30 +0000 |
commit | a3ece59a09526ed8851648fd61c53267728c6ac0 (patch) | |
tree | eb11eafbe11041b2392b2dee44cd7e88d0493b8f /release/sysinstall | |
parent | 93f4eda9750f53b86effdc68bb2e6945fe0c18bd (diff) | |
download | FreeBSD-src-a3ece59a09526ed8851648fd61c53267728c6ac0.zip FreeBSD-src-a3ece59a09526ed8851648fd61c53267728c6ac0.tar.gz |
Be more cautious about leaving user with a workable kernel during the
upgrade process.
Submitted by: Mikael Karpberg <karpen@ocean.campus.luth.se>
Diffstat (limited to 'release/sysinstall')
-rw-r--r-- | release/sysinstall/installUpgrade.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c index d997533..8a755821 100644 --- a/release/sysinstall/installUpgrade.c +++ b/release/sysinstall/installUpgrade.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: installUpgrade.c,v 1.49 1997/05/09 07:44:19 jkh Exp $ + * $Id: installUpgrade.c,v 1.50 1997/09/08 11:09:09 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -295,6 +295,8 @@ media: "and start over from the beginning. Select Yes to reboot now")) systemShutdown(1); } + else /* Give us a working kernel in case we crash and reboot */ + system("cp /kernel.prev /kernel"); } } @@ -444,7 +446,10 @@ installUpgradeNonInteractive(dialogMenuItem *self) if (file_readable("/kernel")) { msgNotify("Moving old kernel to /kernel.prev"); - system("chflags noschg /kernel && mv /kernel /kernel.prev"); + if (!system("chflags noschg /kernel && mv /kernel /kernel.prev")) { + /* Give us a working kernel in case we crash and reboot */ + system("cp /kernel.prev /kernel"); + } } msgNotify("Beginning extraction of distributions.."); |