1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Do media initialization at correct time for upgrade too.

Update /stand.
This commit is contained in:
Jordan K. Hubbard 1997-01-29 01:23:05 +00:00
parent 18a4cf7400
commit ad26f87d59
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22072
2 changed files with 36 additions and 30 deletions

View File

@ -185,21 +185,6 @@ installUpgrade(dialogMenuItem *self)
if (!(Dists & DIST_BIN))
extractingBin = FALSE;
if (!mediaVerify()) {
msgConfirm("Now you must specify an installation medium for the upgrade.");
media:
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Couldn't initialize the media. Would you like\n"
"to adjust your media selection and try again?"))
goto media;
else
return DITEM_FAILURE | DITEM_REDRAW;
}
if (RunningAsInit) {
Device **devs;
int i, cnt;
@ -244,6 +229,9 @@ installUpgrade(dialogMenuItem *self)
return DITEM_FAILURE | DITEM_RESTORE;
}
msgNotify("Updating /stand on root filesystem");
(void)vsystem("find -x /stand | cpio %s -pdum /mnt", cpioVerbosity());
if (DITEM_STATUS(chroot("/mnt")) == DITEM_FAILURE) {
msgConfirm("Unable to chroot to /mnt - something is wrong with the\n"
"root partition or the way it's mounted if this doesn't work.");
@ -254,6 +242,21 @@ installUpgrade(dialogMenuItem *self)
systemCreateHoloshell();
}
if (!mediaVerify()) {
msgConfirm("Now you must specify an installation medium for the upgrade.");
media:
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Couldn't initialize the media. Would you like\n"
"to adjust your media selection and try again?"))
goto media;
else
return DITEM_FAILURE | DITEM_REDRAW;
}
saved_etc = NULL;
if (extractingBin) {
while (!saved_etc) {

View File

@ -185,21 +185,6 @@ installUpgrade(dialogMenuItem *self)
if (!(Dists & DIST_BIN))
extractingBin = FALSE;
if (!mediaVerify()) {
msgConfirm("Now you must specify an installation medium for the upgrade.");
media:
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Couldn't initialize the media. Would you like\n"
"to adjust your media selection and try again?"))
goto media;
else
return DITEM_FAILURE | DITEM_REDRAW;
}
if (RunningAsInit) {
Device **devs;
int i, cnt;
@ -244,6 +229,9 @@ installUpgrade(dialogMenuItem *self)
return DITEM_FAILURE | DITEM_RESTORE;
}
msgNotify("Updating /stand on root filesystem");
(void)vsystem("find -x /stand | cpio %s -pdum /mnt", cpioVerbosity());
if (DITEM_STATUS(chroot("/mnt")) == DITEM_FAILURE) {
msgConfirm("Unable to chroot to /mnt - something is wrong with the\n"
"root partition or the way it's mounted if this doesn't work.");
@ -254,6 +242,21 @@ installUpgrade(dialogMenuItem *self)
systemCreateHoloshell();
}
if (!mediaVerify()) {
msgConfirm("Now you must specify an installation medium for the upgrade.");
media:
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Couldn't initialize the media. Would you like\n"
"to adjust your media selection and try again?"))
goto media;
else
return DITEM_FAILURE | DITEM_REDRAW;
}
saved_etc = NULL;
if (extractingBin) {
while (!saved_etc) {