mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
Make upgrade allow reselection of failed media.
This commit is contained in:
parent
a37ecb64c2
commit
4b5985f238
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21713
@ -221,14 +221,17 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!mediaVerify()) {
|
if (!mediaVerify()) {
|
||||||
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
||||||
|
media:
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice->init(mediaDevice)) {
|
if (!mediaDevice->init(mediaDevice)) {
|
||||||
msgConfirm("Couldn't initialize the media; upgrade aborted. Please\n"
|
if (!msgYesNo("Couldn't initialize the media. Would you like\n"
|
||||||
"fix whatever the problem is and try again.");
|
"to adjust your media selection and try again?"))
|
||||||
return DITEM_FAILURE | DITEM_REDRAW;
|
goto media;
|
||||||
|
else
|
||||||
|
return DITEM_FAILURE | DITEM_REDRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RunningAsInit) {
|
if (RunningAsInit) {
|
||||||
@ -274,18 +277,17 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
variable_unset(DISK_PARTITIONED);
|
variable_unset(DISK_PARTITIONED);
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (DITEM_STATUS(chroot("/mnt")) == DITEM_FAILURE) {
|
if (DITEM_STATUS(chroot("/mnt")) == DITEM_FAILURE) {
|
||||||
msgConfirm("Unable to chroot to /mnt - something is wrong with the\n"
|
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.");
|
"root partition or the way it's mounted if this doesn't work.");
|
||||||
variable_unset(DISK_PARTITIONED);
|
variable_unset(DISK_PARTITIONED);
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RECREATE;
|
||||||
|
}
|
||||||
|
chdir("/");
|
||||||
|
systemCreateHoloshell();
|
||||||
}
|
}
|
||||||
|
|
||||||
chdir("/");
|
|
||||||
systemCreateHoloshell();
|
|
||||||
|
|
||||||
saved_etc = NULL;
|
saved_etc = NULL;
|
||||||
if (extractingBin) {
|
if (extractingBin) {
|
||||||
while (!saved_etc) {
|
while (!saved_etc) {
|
||||||
|
@ -221,14 +221,17 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!mediaVerify()) {
|
if (!mediaVerify()) {
|
||||||
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
||||||
|
media:
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice->init(mediaDevice)) {
|
if (!mediaDevice->init(mediaDevice)) {
|
||||||
msgConfirm("Couldn't initialize the media; upgrade aborted. Please\n"
|
if (!msgYesNo("Couldn't initialize the media. Would you like\n"
|
||||||
"fix whatever the problem is and try again.");
|
"to adjust your media selection and try again?"))
|
||||||
return DITEM_FAILURE | DITEM_REDRAW;
|
goto media;
|
||||||
|
else
|
||||||
|
return DITEM_FAILURE | DITEM_REDRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RunningAsInit) {
|
if (RunningAsInit) {
|
||||||
@ -274,18 +277,17 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
variable_unset(DISK_PARTITIONED);
|
variable_unset(DISK_PARTITIONED);
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (DITEM_STATUS(chroot("/mnt")) == DITEM_FAILURE) {
|
if (DITEM_STATUS(chroot("/mnt")) == DITEM_FAILURE) {
|
||||||
msgConfirm("Unable to chroot to /mnt - something is wrong with the\n"
|
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.");
|
"root partition or the way it's mounted if this doesn't work.");
|
||||||
variable_unset(DISK_PARTITIONED);
|
variable_unset(DISK_PARTITIONED);
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RECREATE;
|
||||||
|
}
|
||||||
|
chdir("/");
|
||||||
|
systemCreateHoloshell();
|
||||||
}
|
}
|
||||||
|
|
||||||
chdir("/");
|
|
||||||
systemCreateHoloshell();
|
|
||||||
|
|
||||||
saved_etc = NULL;
|
saved_etc = NULL;
|
||||||
if (extractingBin) {
|
if (extractingBin) {
|
||||||
while (!saved_etc) {
|
while (!saved_etc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user