diff options
author | jkh <jkh@FreeBSD.org> | 1999-05-11 08:00:06 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-05-11 08:00:06 +0000 |
commit | 1045ba7680cfa72d3ae8fe337567d277ead3a6ca (patch) | |
tree | a6e14e6d842b2f612ca341514e8ffad601067b53 | |
parent | 6fafcff85c06075b97950c1b4e2b78cbebb8b1c7 (diff) | |
download | FreeBSD-src-1045ba7680cfa72d3ae8fe337567d277ead3a6ca.zip FreeBSD-src-1045ba7680cfa72d3ae8fe337567d277ead3a6ca.tar.gz |
Preserve /root's dotfiles across upgrades too.
PR: 6559
-rw-r--r-- | release/sysinstall/installUpgrade.c | 6 | ||||
-rw-r--r-- | usr.sbin/sysinstall/installUpgrade.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c index b153e02..49caf3d 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.65 1999/03/19 08:22:31 jkh Exp $ + * $Id: installUpgrade.c,v 1.66 1999/04/07 03:06:44 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -280,6 +280,8 @@ installUpgrade(dialogMenuItem *self) if (msgYesNo("Unable to backup your /etc into %s.\n" "Do you want to continue anyway?", saved_etc) != 0) return DITEM_FAILURE | DITEM_RESTORE; + msgNotify("Preserving /root directory.."); + vsystem("tar -cBpf - -C / root | tar --unlink -xBpf - -C %s", saved_etc); } msgNotify("chflags'ing old binaries - please wait."); @@ -353,6 +355,8 @@ media: else { /* Now try to resurrect the /etc files */ traverseHitlist(etc_files); + /* Resurrect the root dotfiles */ + vsystem("tar -cBpf - root | tar -xBpf - -C / && rm -rf root"); } msgConfirm("Upgrade completed! All of your old /etc files have been restored.\n" diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c index b153e02..49caf3d 100644 --- a/usr.sbin/sysinstall/installUpgrade.c +++ b/usr.sbin/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.65 1999/03/19 08:22:31 jkh Exp $ + * $Id: installUpgrade.c,v 1.66 1999/04/07 03:06:44 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -280,6 +280,8 @@ installUpgrade(dialogMenuItem *self) if (msgYesNo("Unable to backup your /etc into %s.\n" "Do you want to continue anyway?", saved_etc) != 0) return DITEM_FAILURE | DITEM_RESTORE; + msgNotify("Preserving /root directory.."); + vsystem("tar -cBpf - -C / root | tar --unlink -xBpf - -C %s", saved_etc); } msgNotify("chflags'ing old binaries - please wait."); @@ -353,6 +355,8 @@ media: else { /* Now try to resurrect the /etc files */ traverseHitlist(etc_files); + /* Resurrect the root dotfiles */ + vsystem("tar -cBpf - root | tar -xBpf - -C / && rm -rf root"); } msgConfirm("Upgrade completed! All of your old /etc files have been restored.\n" |