Preserve /root's dotfiles across upgrades too.

PR:		6559
This commit is contained in:
Jordan K. Hubbard 1999-05-11 08:00:06 +00:00
parent 49e5f1b929
commit e73c4fe5eb
2 changed files with 10 additions and 2 deletions

View File

@ -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"

View File

@ -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"