mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 12:53:33 +00:00
Now that I know which parts of the installation really need it (since
there's no menu display bug to work around now), be far more selective in my use of DITEM_RECREATE (which is slow and involves much screen I/O).
This commit is contained in:
parent
a59ff6e254
commit
3b9b7e6177
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21792
@ -575,7 +575,7 @@ configPackages(dialogMenuItem *self)
|
|||||||
tmp = tmp2;
|
tmp = tmp2;
|
||||||
}
|
}
|
||||||
index_init(NULL, &plist);
|
index_init(NULL, &plist);
|
||||||
return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE;
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NETCON_EXTENTIONS
|
#ifdef NETCON_EXTENTIONS
|
||||||
|
@ -514,7 +514,7 @@ diskPartitionEditor(dialogMenuItem *self)
|
|||||||
i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
free(menu);
|
free(menu);
|
||||||
}
|
}
|
||||||
i = i | DITEM_RECREATE;
|
i = i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ distSetDES(dialogMenuItem *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -300,7 +300,7 @@ distMaybeSetDES(dialogMenuItem *self)
|
|||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
}
|
}
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -316,7 +316,7 @@ distSetSrc(dialogMenuItem *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -336,7 +336,7 @@ distSetXF86(dialogMenuItem *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Boolean
|
static Boolean
|
||||||
|
@ -76,9 +76,9 @@ docBrowser(dialogMenuItem *self)
|
|||||||
|
|
||||||
/* Run browser on the appropriate doc */
|
/* Run browser on the appropriate doc */
|
||||||
if (dmenuOpenSimple(&MenuHTMLDoc, FALSE))
|
if (dmenuOpenSimple(&MenuHTMLDoc, FALSE))
|
||||||
return DITEM_SUCCESS | DITEM_RECREATE;
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to show one of the documents requested from the HTML doc menu */
|
/* Try to show one of the documents requested from the HTML doc menu */
|
||||||
|
@ -60,8 +60,7 @@ mediaInitDOS(Device *dev)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
DOSMounted = TRUE;
|
DOSMounted = TRUE;
|
||||||
if (isDebug())
|
msgDebug("DOS partition %s mounted\n", dev->devname);
|
||||||
msgDebug("DOS partition %s mounted\n", dev->devname);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,8 @@ mediaGetFloppy(Device *dev, char *file, Boolean probe)
|
|||||||
|
|
||||||
snprintf(buf, PATH_MAX, "/dist/%s", file);
|
snprintf(buf, PATH_MAX, "/dist/%s", file);
|
||||||
|
|
||||||
msgDebug("Request for %s from floppy on /dist, probe is %d.\n", buf, probe);
|
if (isDebug())
|
||||||
|
msgDebug("Request for %s from floppy on /dist, probe is %d.\n", buf, probe);
|
||||||
if (!file_readable(buf)) {
|
if (!file_readable(buf)) {
|
||||||
if (probe)
|
if (probe)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -73,15 +73,20 @@ mediaInitFTP(Device *dev)
|
|||||||
try:
|
try:
|
||||||
cp = variable_get(VAR_FTP_PATH);
|
cp = variable_get(VAR_FTP_PATH);
|
||||||
if (!cp) {
|
if (!cp) {
|
||||||
if (DITEM_STATUS(mediaSetFTP(NULL)) == DITEM_FAILURE || (cp = variable_get(VAR_FTP_PATH)) == NULL)
|
if (DITEM_STATUS(mediaSetFTP(NULL)) == DITEM_FAILURE || (cp = variable_get(VAR_FTP_PATH)) == NULL) {
|
||||||
return FALSE;
|
msgConfirm("Unable to get proper FTP path. FTP media not initialized.");
|
||||||
|
netdev->shutdown(netdev);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hostname = variable_get(VAR_FTP_HOST);
|
hostname = variable_get(VAR_FTP_HOST);
|
||||||
dir = variable_get(VAR_FTP_DIR);
|
dir = variable_get(VAR_FTP_DIR);
|
||||||
if (!hostname || !dir)
|
if (!hostname || !dir) {
|
||||||
msgFatal("Missing FTP host or directory specification - something's wrong!");
|
msgConfirm("Missing FTP host or directory specification. FTP media not initialized,");
|
||||||
|
netdev->shutdown(netdev);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
user = variable_get(VAR_FTP_USER);
|
user = variable_get(VAR_FTP_USER);
|
||||||
login_name = (!user || !*user) ? "anonymous" : user;
|
login_name = (!user || !*user) ? "anonymous" : user;
|
||||||
|
|
||||||
@ -91,10 +96,7 @@ try:
|
|||||||
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
|
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
|
||||||
msgNotify("Logging in to %s@%s..", login_name, hostname);
|
msgNotify("Logging in to %s@%s..", login_name, hostname);
|
||||||
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
|
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
|
||||||
if (variable_get(VAR_NO_CONFIRM))
|
msgConfirm("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
|
||||||
msgNotify("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
|
|
||||||
else
|
|
||||||
msgConfirm("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
|
|
||||||
goto punt;
|
goto punt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,6 +147,7 @@ punt:
|
|||||||
fclose(OpenConn);
|
fclose(OpenConn);
|
||||||
OpenConn = NULL;
|
OpenConn = NULL;
|
||||||
}
|
}
|
||||||
|
netdev->shutdown(netdev);
|
||||||
variable_unset(VAR_FTP_PATH);
|
variable_unset(VAR_FTP_PATH);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -215,8 +218,7 @@ mediaShutdownFTP(Device *dev)
|
|||||||
if (!ftpInitted)
|
if (!ftpInitted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isDebug())
|
msgDebug("FTP shutdown called. OpenConn = %x\n", OpenConn);
|
||||||
msgDebug("FTP shutdown called. OpenConn = %x\n", OpenConn);
|
|
||||||
if (OpenConn != NULL) {
|
if (OpenConn != NULL) {
|
||||||
fclose(OpenConn);
|
fclose(OpenConn);
|
||||||
OpenConn = NULL;
|
OpenConn = NULL;
|
||||||
|
@ -443,25 +443,27 @@ installExpress(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!Dists) {
|
if (!Dists) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice) {
|
if (!mediaDevice) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mediaDevice->init(mediaDevice))
|
||||||
|
return DITEM_FAILURE | DITEM_REDRAW;
|
||||||
|
|
||||||
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
|
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
|
||||||
i |= DITEM_LEAVE_MENU;
|
i |= DITEM_LEAVE_MENU;
|
||||||
/* Give user the option of one last configuration spree */
|
/* Give user the option of one last configuration spree */
|
||||||
installConfigure();
|
installConfigure();
|
||||||
|
|
||||||
/* Now write out any changes .. */
|
|
||||||
configSysconfig("/etc/sysconfig");
|
|
||||||
}
|
}
|
||||||
return i | DITEM_RECREATE;
|
/* Now write out any changes .. */
|
||||||
|
configSysconfig("/etc/sysconfig");
|
||||||
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Novice mode installation */
|
/* Novice mode installation */
|
||||||
@ -495,15 +497,18 @@ installNovice(dialogMenuItem *self)
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
|
if (!Dists && msgYesNo("No distributions selected. Revisit the distributions menu?"))
|
||||||
break;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
|
if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
|
if (!mediaDevice->init(mediaDevice))
|
||||||
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
|
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
@ -512,7 +517,7 @@ installNovice(dialogMenuItem *self)
|
|||||||
"scroll-lock feature. You can also chose \"No\" at the next\n"
|
"scroll-lock feature. You can also chose \"No\" at the next\n"
|
||||||
"prompt and go back into the installation menus to try and retry\n"
|
"prompt and go back into the installation menus to try and retry\n"
|
||||||
"whichever operations have failed.");
|
"whichever operations have failed.");
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -624,7 +629,7 @@ installNovice(dialogMenuItem *self)
|
|||||||
/* Now write out any changes .. */
|
/* Now write out any changes .. */
|
||||||
configSysconfig("/etc/sysconfig");
|
configSysconfig("/etc/sysconfig");
|
||||||
|
|
||||||
return DITEM_LEAVE_MENU | DITEM_RECREATE;
|
return DITEM_LEAVE_MENU | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The version of commit we call from the Install Custom menu */
|
/* The version of commit we call from the Install Custom menu */
|
||||||
@ -668,7 +673,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
if (!msgYesNo("No distributions are selected for installation! Do you\n"
|
if (!msgYesNo("No distributions are selected for installation! Do you\n"
|
||||||
"want to do this now?")) {
|
"want to do this now?")) {
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RESTORE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
@ -678,7 +683,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
if (!msgYesNo("You need to select a media type first. Do you want\n"
|
if (!msgYesNo("You need to select a media type first. Do you want\n"
|
||||||
"to do this now?")) {
|
"to do this now?")) {
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RESTORE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
@ -713,7 +718,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
|
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -167,7 +167,7 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
"to select those portions of the new system you wish to install on top of\n"
|
"to select those portions of the new system you wish to install on top of\n"
|
||||||
"the old.");
|
"the old.");
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
}
|
}
|
||||||
else if (!(Dists & DIST_BIN)) { /* No bin selected? Not much of an upgrade.. */
|
else if (!(Dists & DIST_BIN)) { /* No bin selected? Not much of an upgrade.. */
|
||||||
@ -176,7 +176,7 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
"want to select the bin distribution? Chose No to bring up the Distributions\n"
|
"want to select the bin distribution? Chose No to bring up the Distributions\n"
|
||||||
"menu.") != 0) {
|
"menu.") != 0) {
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
||||||
media:
|
media:
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice->init(mediaDevice)) {
|
if (!mediaDevice->init(mediaDevice)) {
|
||||||
@ -232,7 +232,7 @@ media:
|
|||||||
if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) {
|
if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) {
|
||||||
msgConfirm("The disk label editor returned an error status. Upgrade operation\n"
|
msgConfirm("The disk label editor returned an error status. Upgrade operation\n"
|
||||||
"aborted.");
|
"aborted.");
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't write out MBR info */
|
/* Don't write out MBR info */
|
||||||
@ -241,14 +241,14 @@ media:
|
|||||||
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
|
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
|
||||||
"aborted.");
|
"aborted.");
|
||||||
variable_unset(DISK_PARTITIONED);
|
variable_unset(DISK_PARTITIONED);
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
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_RESTORE;
|
||||||
}
|
}
|
||||||
chdir("/");
|
chdir("/");
|
||||||
systemCreateHoloshell();
|
systemCreateHoloshell();
|
||||||
@ -272,7 +272,7 @@ media:
|
|||||||
if (vsystem("tar -cf - -C /etc . | tar -xpf - -C %s", saved_etc))
|
if (vsystem("tar -cf - -C /etc . | tar -xpf - -C %s", saved_etc))
|
||||||
if (msgYesNo("Unable to backup your /etc into %s.\n"
|
if (msgYesNo("Unable to backup your /etc into %s.\n"
|
||||||
"Do you want to continue anyway?", saved_etc) != 0)
|
"Do you want to continue anyway?", saved_etc) != 0)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
if (file_readable("/kernel")) {
|
if (file_readable("/kernel")) {
|
||||||
msgNotify("Moving old kernel to /kernel.prev");
|
msgNotify("Moving old kernel to /kernel.prev");
|
||||||
|
@ -105,11 +105,11 @@ mediaSetCDROM(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
return (mediaDevice ? DITEM_SUCCESS | DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_SUCCESS | DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -146,11 +146,11 @@ mediaSetFloppy(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -185,11 +185,11 @@ mediaSetDOS(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -226,7 +226,7 @@ mediaSetTape(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
@ -243,7 +243,7 @@ mediaSetTape(dialogMenuItem *self)
|
|||||||
else
|
else
|
||||||
mediaDevice->private = strdup(val);
|
mediaDevice->private = strdup(val);
|
||||||
}
|
}
|
||||||
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -267,10 +267,10 @@ mediaSetFTP(dialogMenuItem *self)
|
|||||||
if (!cp) {
|
if (!cp) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
else
|
else
|
||||||
cp = variable_get(VAR_FTP_PATH);
|
cp = variable_get(VAR_FTP_PATH);
|
||||||
what = DITEM_RECREATE;
|
what = DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
if (!cp)
|
if (!cp)
|
||||||
return DITEM_FAILURE | what;
|
return DITEM_FAILURE | what;
|
||||||
@ -625,7 +625,7 @@ mediaGetType(dialogMenuItem *self)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = dmenuOpenSimple(&MenuMedia, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
i = dmenuOpenSimple(&MenuMedia, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE if all the media variables are set up correctly */
|
/* Return TRUE if all the media variables are set up correctly */
|
||||||
|
@ -64,6 +64,7 @@ mediaInitNetwork(Device *dev)
|
|||||||
|
|
||||||
/* Old PPP process lying around? */
|
/* Old PPP process lying around? */
|
||||||
if (pppPID) {
|
if (pppPID) {
|
||||||
|
msgNotify("Killing previous PPP process %d.", pppPID);
|
||||||
kill(pppPID, SIGTERM);
|
kill(pppPID, SIGTERM);
|
||||||
pppPID = 0;
|
pppPID = 0;
|
||||||
}
|
}
|
||||||
@ -91,8 +92,10 @@ mediaInitNetwork(Device *dev)
|
|||||||
"correctness (default here is: VJ compression, Hardware flow-\n"
|
"correctness (default here is: VJ compression, Hardware flow-\n"
|
||||||
"control, ignore carrier and 9600 baud data rate). When you're\n"
|
"control, ignore carrier and 9600 baud data rate). When you're\n"
|
||||||
"ready, press [ENTER] to execute it.");
|
"ready, press [ENTER] to execute it.");
|
||||||
if (!val)
|
if (!val) {
|
||||||
|
msgConfirm("slattach command was empty. Try again!");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
SAFE_STRCPY(attach, val);
|
SAFE_STRCPY(attach, val);
|
||||||
/*
|
/*
|
||||||
@ -102,7 +105,7 @@ mediaInitNetwork(Device *dev)
|
|||||||
*/
|
*/
|
||||||
if (vsystem(attach)) {
|
if (vsystem(attach)) {
|
||||||
msgConfirm("slattach returned a bad status! Please verify that\n"
|
msgConfirm("slattach returned a bad status! Please verify that\n"
|
||||||
"the command is correct and try again.");
|
"the command is correct and try this operation again.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,8 +148,7 @@ mediaShutdownNetwork(Device *dev)
|
|||||||
if (!RunningAsInit || !networkInitialized)
|
if (!RunningAsInit || !networkInitialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isDebug())
|
msgDebug("Shutdown called for network device %s\n", dev->name);
|
||||||
msgDebug("Shutdown called for network device %s\n", dev->name);
|
|
||||||
/* Not a serial device? */
|
/* Not a serial device? */
|
||||||
if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
|
if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -155,6 +155,5 @@ configSamba(dialogMenuItem *self)
|
|||||||
if (DITEM_STATUS(i) == DITEM_SUCCESS)
|
if (DITEM_STATUS(i) == DITEM_SUCCESS)
|
||||||
variable_set2("samba", "YES");
|
variable_set2("samba", "YES");
|
||||||
restorescr(w);
|
restorescr(w);
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,8 +59,11 @@ mediaInitTape(Device *dev)
|
|||||||
|
|
||||||
msgDebug("Tape init routine called for %s (private dir is %s)\n", dev->name, dev->private);
|
msgDebug("Tape init routine called for %s (private dir is %s)\n", dev->name, dev->private);
|
||||||
Mkdir(dev->private);
|
Mkdir(dev->private);
|
||||||
if (chdir(dev->private))
|
if (chdir(dev->private)) {
|
||||||
|
msgConfirm("Unable to CD to %s before extracting tape!\n"
|
||||||
|
"Tape media not selected.", dev->private);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
/* We know the tape is already in the drive, so go for it */
|
/* We know the tape is already in the drive, so go for it */
|
||||||
msgNotify("Attempting to extract from %s...", dev->description);
|
msgNotify("Attempting to extract from %s...", dev->description);
|
||||||
if (!strcmp(dev->name, "rft0"))
|
if (!strcmp(dev->name, "rft0"))
|
||||||
@ -73,7 +76,8 @@ mediaInitTape(Device *dev)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
msgConfirm("Tape extract command failed with status %d!", i);
|
msgConfirm("Tape extract command failed with status %d!\n"
|
||||||
|
"Unable to use tape media.", i);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,5 +361,5 @@ int
|
|||||||
tcpMenuSelect(dialogMenuItem *self)
|
tcpMenuSelect(dialogMenuItem *self)
|
||||||
{
|
{
|
||||||
(void)tcpDeviceSelect();
|
(void)tcpDeviceSelect();
|
||||||
return DITEM_SUCCESS | DITEM_RECREATE | DITEM_RESTORE;
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
@ -575,7 +575,7 @@ configPackages(dialogMenuItem *self)
|
|||||||
tmp = tmp2;
|
tmp = tmp2;
|
||||||
}
|
}
|
||||||
index_init(NULL, &plist);
|
index_init(NULL, &plist);
|
||||||
return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE;
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NETCON_EXTENTIONS
|
#ifdef NETCON_EXTENTIONS
|
||||||
|
@ -514,7 +514,7 @@ diskPartitionEditor(dialogMenuItem *self)
|
|||||||
i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
free(menu);
|
free(menu);
|
||||||
}
|
}
|
||||||
i = i | DITEM_RECREATE;
|
i = i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
@ -443,25 +443,27 @@ installExpress(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!Dists) {
|
if (!Dists) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice) {
|
if (!mediaDevice) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mediaDevice->init(mediaDevice))
|
||||||
|
return DITEM_FAILURE | DITEM_REDRAW;
|
||||||
|
|
||||||
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
|
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
|
||||||
i |= DITEM_LEAVE_MENU;
|
i |= DITEM_LEAVE_MENU;
|
||||||
/* Give user the option of one last configuration spree */
|
/* Give user the option of one last configuration spree */
|
||||||
installConfigure();
|
installConfigure();
|
||||||
|
|
||||||
/* Now write out any changes .. */
|
|
||||||
configSysconfig("/etc/sysconfig");
|
|
||||||
}
|
}
|
||||||
return i | DITEM_RECREATE;
|
/* Now write out any changes .. */
|
||||||
|
configSysconfig("/etc/sysconfig");
|
||||||
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Novice mode installation */
|
/* Novice mode installation */
|
||||||
@ -495,15 +497,18 @@ installNovice(dialogMenuItem *self)
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
|
if (!Dists && msgYesNo("No distributions selected. Revisit the distributions menu?"))
|
||||||
break;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
|
if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
|
if (!mediaDevice->init(mediaDevice))
|
||||||
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
|
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
@ -512,7 +517,7 @@ installNovice(dialogMenuItem *self)
|
|||||||
"scroll-lock feature. You can also chose \"No\" at the next\n"
|
"scroll-lock feature. You can also chose \"No\" at the next\n"
|
||||||
"prompt and go back into the installation menus to try and retry\n"
|
"prompt and go back into the installation menus to try and retry\n"
|
||||||
"whichever operations have failed.");
|
"whichever operations have failed.");
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -624,7 +629,7 @@ installNovice(dialogMenuItem *self)
|
|||||||
/* Now write out any changes .. */
|
/* Now write out any changes .. */
|
||||||
configSysconfig("/etc/sysconfig");
|
configSysconfig("/etc/sysconfig");
|
||||||
|
|
||||||
return DITEM_LEAVE_MENU | DITEM_RECREATE;
|
return DITEM_LEAVE_MENU | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The version of commit we call from the Install Custom menu */
|
/* The version of commit we call from the Install Custom menu */
|
||||||
@ -668,7 +673,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
if (!msgYesNo("No distributions are selected for installation! Do you\n"
|
if (!msgYesNo("No distributions are selected for installation! Do you\n"
|
||||||
"want to do this now?")) {
|
"want to do this now?")) {
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RESTORE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
@ -678,7 +683,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
if (!msgYesNo("You need to select a media type first. Do you want\n"
|
if (!msgYesNo("You need to select a media type first. Do you want\n"
|
||||||
"to do this now?")) {
|
"to do this now?")) {
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RESTORE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
@ -713,7 +718,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
|
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -575,7 +575,7 @@ configPackages(dialogMenuItem *self)
|
|||||||
tmp = tmp2;
|
tmp = tmp2;
|
||||||
}
|
}
|
||||||
index_init(NULL, &plist);
|
index_init(NULL, &plist);
|
||||||
return DITEM_SUCCESS | DITEM_RESTORE | DITEM_RECREATE;
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NETCON_EXTENTIONS
|
#ifdef NETCON_EXTENTIONS
|
||||||
|
@ -514,7 +514,7 @@ diskPartitionEditor(dialogMenuItem *self)
|
|||||||
i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
free(menu);
|
free(menu);
|
||||||
}
|
}
|
||||||
i = i | DITEM_RECREATE;
|
i = i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ distSetDES(dialogMenuItem *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -300,7 +300,7 @@ distMaybeSetDES(dialogMenuItem *self)
|
|||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
}
|
}
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -316,7 +316,7 @@ distSetSrc(dialogMenuItem *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -336,7 +336,7 @@ distSetXF86(dialogMenuItem *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE | DITEM_RESTORE;
|
return i | DITEM_RECREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Boolean
|
static Boolean
|
||||||
|
@ -76,9 +76,9 @@ docBrowser(dialogMenuItem *self)
|
|||||||
|
|
||||||
/* Run browser on the appropriate doc */
|
/* Run browser on the appropriate doc */
|
||||||
if (dmenuOpenSimple(&MenuHTMLDoc, FALSE))
|
if (dmenuOpenSimple(&MenuHTMLDoc, FALSE))
|
||||||
return DITEM_SUCCESS | DITEM_RECREATE;
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to show one of the documents requested from the HTML doc menu */
|
/* Try to show one of the documents requested from the HTML doc menu */
|
||||||
|
@ -60,8 +60,7 @@ mediaInitDOS(Device *dev)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
DOSMounted = TRUE;
|
DOSMounted = TRUE;
|
||||||
if (isDebug())
|
msgDebug("DOS partition %s mounted\n", dev->devname);
|
||||||
msgDebug("DOS partition %s mounted\n", dev->devname);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,8 @@ mediaGetFloppy(Device *dev, char *file, Boolean probe)
|
|||||||
|
|
||||||
snprintf(buf, PATH_MAX, "/dist/%s", file);
|
snprintf(buf, PATH_MAX, "/dist/%s", file);
|
||||||
|
|
||||||
msgDebug("Request for %s from floppy on /dist, probe is %d.\n", buf, probe);
|
if (isDebug())
|
||||||
|
msgDebug("Request for %s from floppy on /dist, probe is %d.\n", buf, probe);
|
||||||
if (!file_readable(buf)) {
|
if (!file_readable(buf)) {
|
||||||
if (probe)
|
if (probe)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -73,15 +73,20 @@ mediaInitFTP(Device *dev)
|
|||||||
try:
|
try:
|
||||||
cp = variable_get(VAR_FTP_PATH);
|
cp = variable_get(VAR_FTP_PATH);
|
||||||
if (!cp) {
|
if (!cp) {
|
||||||
if (DITEM_STATUS(mediaSetFTP(NULL)) == DITEM_FAILURE || (cp = variable_get(VAR_FTP_PATH)) == NULL)
|
if (DITEM_STATUS(mediaSetFTP(NULL)) == DITEM_FAILURE || (cp = variable_get(VAR_FTP_PATH)) == NULL) {
|
||||||
return FALSE;
|
msgConfirm("Unable to get proper FTP path. FTP media not initialized.");
|
||||||
|
netdev->shutdown(netdev);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hostname = variable_get(VAR_FTP_HOST);
|
hostname = variable_get(VAR_FTP_HOST);
|
||||||
dir = variable_get(VAR_FTP_DIR);
|
dir = variable_get(VAR_FTP_DIR);
|
||||||
if (!hostname || !dir)
|
if (!hostname || !dir) {
|
||||||
msgFatal("Missing FTP host or directory specification - something's wrong!");
|
msgConfirm("Missing FTP host or directory specification. FTP media not initialized,");
|
||||||
|
netdev->shutdown(netdev);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
user = variable_get(VAR_FTP_USER);
|
user = variable_get(VAR_FTP_USER);
|
||||||
login_name = (!user || !*user) ? "anonymous" : user;
|
login_name = (!user || !*user) ? "anonymous" : user;
|
||||||
|
|
||||||
@ -91,10 +96,7 @@ try:
|
|||||||
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
|
sprintf(password, "installer@%s", variable_get(VAR_HOSTNAME));
|
||||||
msgNotify("Logging in to %s@%s..", login_name, hostname);
|
msgNotify("Logging in to %s@%s..", login_name, hostname);
|
||||||
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
|
if ((OpenConn = ftpLogin(hostname, login_name, password, FtpPort, isDebug(), &code)) == NULL) {
|
||||||
if (variable_get(VAR_NO_CONFIRM))
|
msgConfirm("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
|
||||||
msgNotify("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
|
|
||||||
else
|
|
||||||
msgConfirm("Couldn't open FTP connection to %s, errcode = %d", hostname, code);
|
|
||||||
goto punt;
|
goto punt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,6 +147,7 @@ punt:
|
|||||||
fclose(OpenConn);
|
fclose(OpenConn);
|
||||||
OpenConn = NULL;
|
OpenConn = NULL;
|
||||||
}
|
}
|
||||||
|
netdev->shutdown(netdev);
|
||||||
variable_unset(VAR_FTP_PATH);
|
variable_unset(VAR_FTP_PATH);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -215,8 +218,7 @@ mediaShutdownFTP(Device *dev)
|
|||||||
if (!ftpInitted)
|
if (!ftpInitted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isDebug())
|
msgDebug("FTP shutdown called. OpenConn = %x\n", OpenConn);
|
||||||
msgDebug("FTP shutdown called. OpenConn = %x\n", OpenConn);
|
|
||||||
if (OpenConn != NULL) {
|
if (OpenConn != NULL) {
|
||||||
fclose(OpenConn);
|
fclose(OpenConn);
|
||||||
OpenConn = NULL;
|
OpenConn = NULL;
|
||||||
|
@ -443,25 +443,27 @@ installExpress(dialogMenuItem *self)
|
|||||||
|
|
||||||
if (!Dists) {
|
if (!Dists) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice) {
|
if (!mediaDevice) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mediaDevice->init(mediaDevice))
|
||||||
|
return DITEM_FAILURE | DITEM_REDRAW;
|
||||||
|
|
||||||
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
|
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
|
||||||
i |= DITEM_LEAVE_MENU;
|
i |= DITEM_LEAVE_MENU;
|
||||||
/* Give user the option of one last configuration spree */
|
/* Give user the option of one last configuration spree */
|
||||||
installConfigure();
|
installConfigure();
|
||||||
|
|
||||||
/* Now write out any changes .. */
|
|
||||||
configSysconfig("/etc/sysconfig");
|
|
||||||
}
|
}
|
||||||
return i | DITEM_RECREATE;
|
/* Now write out any changes .. */
|
||||||
|
configSysconfig("/etc/sysconfig");
|
||||||
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Novice mode installation */
|
/* Novice mode installation */
|
||||||
@ -495,15 +497,18 @@ installNovice(dialogMenuItem *self)
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
|
if (!Dists && msgYesNo("No distributions selected. Revisit the distributions menu?"))
|
||||||
break;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
|
if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
|
if (!mediaDevice->init(mediaDevice))
|
||||||
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
|
|
||||||
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
|
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
@ -512,7 +517,7 @@ installNovice(dialogMenuItem *self)
|
|||||||
"scroll-lock feature. You can also chose \"No\" at the next\n"
|
"scroll-lock feature. You can also chose \"No\" at the next\n"
|
||||||
"prompt and go back into the installation menus to try and retry\n"
|
"prompt and go back into the installation menus to try and retry\n"
|
||||||
"whichever operations have failed.");
|
"whichever operations have failed.");
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -624,7 +629,7 @@ installNovice(dialogMenuItem *self)
|
|||||||
/* Now write out any changes .. */
|
/* Now write out any changes .. */
|
||||||
configSysconfig("/etc/sysconfig");
|
configSysconfig("/etc/sysconfig");
|
||||||
|
|
||||||
return DITEM_LEAVE_MENU | DITEM_RECREATE;
|
return DITEM_LEAVE_MENU | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The version of commit we call from the Install Custom menu */
|
/* The version of commit we call from the Install Custom menu */
|
||||||
@ -668,7 +673,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
if (!msgYesNo("No distributions are selected for installation! Do you\n"
|
if (!msgYesNo("No distributions are selected for installation! Do you\n"
|
||||||
"want to do this now?")) {
|
"want to do this now?")) {
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RESTORE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
@ -678,7 +683,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
if (!msgYesNo("You need to select a media type first. Do you want\n"
|
if (!msgYesNo("You need to select a media type first. Do you want\n"
|
||||||
"to do this now?")) {
|
"to do this now?")) {
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return DITEM_FAILURE | DITEM_RESTORE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
@ -713,7 +718,7 @@ installCommit(dialogMenuItem *self)
|
|||||||
else
|
else
|
||||||
i = DITEM_FAILURE;
|
i = DITEM_FAILURE;
|
||||||
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
|
variable_set2(SYSTEM_STATE, DITEM_STATUS(i) == DITEM_FAILURE ? "error-install" : "full-install");
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -167,7 +167,7 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
"to select those portions of the new system you wish to install on top of\n"
|
"to select those portions of the new system you wish to install on top of\n"
|
||||||
"the old.");
|
"the old.");
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
}
|
}
|
||||||
else if (!(Dists & DIST_BIN)) { /* No bin selected? Not much of an upgrade.. */
|
else if (!(Dists & DIST_BIN)) { /* No bin selected? Not much of an upgrade.. */
|
||||||
@ -176,7 +176,7 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
"want to select the bin distribution? Chose No to bring up the Distributions\n"
|
"want to select the bin distribution? Chose No to bring up the Distributions\n"
|
||||||
"menu.") != 0) {
|
"menu.") != 0) {
|
||||||
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
|
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@ installUpgrade(dialogMenuItem *self)
|
|||||||
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
msgConfirm("Now you must specify an installation medium for the upgrade.");
|
||||||
media:
|
media:
|
||||||
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaDevice->init(mediaDevice)) {
|
if (!mediaDevice->init(mediaDevice)) {
|
||||||
@ -232,7 +232,7 @@ media:
|
|||||||
if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) {
|
if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) {
|
||||||
msgConfirm("The disk label editor returned an error status. Upgrade operation\n"
|
msgConfirm("The disk label editor returned an error status. Upgrade operation\n"
|
||||||
"aborted.");
|
"aborted.");
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't write out MBR info */
|
/* Don't write out MBR info */
|
||||||
@ -241,14 +241,14 @@ media:
|
|||||||
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
|
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
|
||||||
"aborted.");
|
"aborted.");
|
||||||
variable_unset(DISK_PARTITIONED);
|
variable_unset(DISK_PARTITIONED);
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
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_RESTORE;
|
||||||
}
|
}
|
||||||
chdir("/");
|
chdir("/");
|
||||||
systemCreateHoloshell();
|
systemCreateHoloshell();
|
||||||
@ -272,7 +272,7 @@ media:
|
|||||||
if (vsystem("tar -cf - -C /etc . | tar -xpf - -C %s", saved_etc))
|
if (vsystem("tar -cf - -C /etc . | tar -xpf - -C %s", saved_etc))
|
||||||
if (msgYesNo("Unable to backup your /etc into %s.\n"
|
if (msgYesNo("Unable to backup your /etc into %s.\n"
|
||||||
"Do you want to continue anyway?", saved_etc) != 0)
|
"Do you want to continue anyway?", saved_etc) != 0)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
if (file_readable("/kernel")) {
|
if (file_readable("/kernel")) {
|
||||||
msgNotify("Moving old kernel to /kernel.prev");
|
msgNotify("Moving old kernel to /kernel.prev");
|
||||||
|
@ -105,11 +105,11 @@ mediaSetCDROM(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
return (mediaDevice ? DITEM_SUCCESS | DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_SUCCESS | DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -146,11 +146,11 @@ mediaSetFloppy(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -185,11 +185,11 @@ mediaSetDOS(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -226,7 +226,7 @@ mediaSetTape(dialogMenuItem *self)
|
|||||||
status = dmenuOpenSimple(menu, FALSE);
|
status = dmenuOpenSimple(menu, FALSE);
|
||||||
free(menu);
|
free(menu);
|
||||||
if (!status)
|
if (!status)
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mediaDevice = devs[0];
|
mediaDevice = devs[0];
|
||||||
@ -243,7 +243,7 @@ mediaSetTape(dialogMenuItem *self)
|
|||||||
else
|
else
|
||||||
mediaDevice->private = strdup(val);
|
mediaDevice->private = strdup(val);
|
||||||
}
|
}
|
||||||
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RECREATE;
|
return (mediaDevice ? DITEM_LEAVE_MENU : DITEM_FAILURE) | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -267,10 +267,10 @@ mediaSetFTP(dialogMenuItem *self)
|
|||||||
if (!cp) {
|
if (!cp) {
|
||||||
dialog_clear_norefresh();
|
dialog_clear_norefresh();
|
||||||
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
||||||
return DITEM_FAILURE | DITEM_RECREATE;
|
return DITEM_FAILURE | DITEM_RESTORE;
|
||||||
else
|
else
|
||||||
cp = variable_get(VAR_FTP_PATH);
|
cp = variable_get(VAR_FTP_PATH);
|
||||||
what = DITEM_RECREATE;
|
what = DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
if (!cp)
|
if (!cp)
|
||||||
return DITEM_FAILURE | what;
|
return DITEM_FAILURE | what;
|
||||||
@ -625,7 +625,7 @@ mediaGetType(dialogMenuItem *self)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = dmenuOpenSimple(&MenuMedia, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
i = dmenuOpenSimple(&MenuMedia, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE;
|
||||||
return i | DITEM_RECREATE;
|
return i | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE if all the media variables are set up correctly */
|
/* Return TRUE if all the media variables are set up correctly */
|
||||||
|
@ -64,6 +64,7 @@ mediaInitNetwork(Device *dev)
|
|||||||
|
|
||||||
/* Old PPP process lying around? */
|
/* Old PPP process lying around? */
|
||||||
if (pppPID) {
|
if (pppPID) {
|
||||||
|
msgNotify("Killing previous PPP process %d.", pppPID);
|
||||||
kill(pppPID, SIGTERM);
|
kill(pppPID, SIGTERM);
|
||||||
pppPID = 0;
|
pppPID = 0;
|
||||||
}
|
}
|
||||||
@ -91,8 +92,10 @@ mediaInitNetwork(Device *dev)
|
|||||||
"correctness (default here is: VJ compression, Hardware flow-\n"
|
"correctness (default here is: VJ compression, Hardware flow-\n"
|
||||||
"control, ignore carrier and 9600 baud data rate). When you're\n"
|
"control, ignore carrier and 9600 baud data rate). When you're\n"
|
||||||
"ready, press [ENTER] to execute it.");
|
"ready, press [ENTER] to execute it.");
|
||||||
if (!val)
|
if (!val) {
|
||||||
|
msgConfirm("slattach command was empty. Try again!");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
SAFE_STRCPY(attach, val);
|
SAFE_STRCPY(attach, val);
|
||||||
/*
|
/*
|
||||||
@ -102,7 +105,7 @@ mediaInitNetwork(Device *dev)
|
|||||||
*/
|
*/
|
||||||
if (vsystem(attach)) {
|
if (vsystem(attach)) {
|
||||||
msgConfirm("slattach returned a bad status! Please verify that\n"
|
msgConfirm("slattach returned a bad status! Please verify that\n"
|
||||||
"the command is correct and try again.");
|
"the command is correct and try this operation again.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,8 +148,7 @@ mediaShutdownNetwork(Device *dev)
|
|||||||
if (!RunningAsInit || !networkInitialized)
|
if (!RunningAsInit || !networkInitialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isDebug())
|
msgDebug("Shutdown called for network device %s\n", dev->name);
|
||||||
msgDebug("Shutdown called for network device %s\n", dev->name);
|
|
||||||
/* Not a serial device? */
|
/* Not a serial device? */
|
||||||
if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
|
if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -59,8 +59,11 @@ mediaInitTape(Device *dev)
|
|||||||
|
|
||||||
msgDebug("Tape init routine called for %s (private dir is %s)\n", dev->name, dev->private);
|
msgDebug("Tape init routine called for %s (private dir is %s)\n", dev->name, dev->private);
|
||||||
Mkdir(dev->private);
|
Mkdir(dev->private);
|
||||||
if (chdir(dev->private))
|
if (chdir(dev->private)) {
|
||||||
|
msgConfirm("Unable to CD to %s before extracting tape!\n"
|
||||||
|
"Tape media not selected.", dev->private);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
/* We know the tape is already in the drive, so go for it */
|
/* We know the tape is already in the drive, so go for it */
|
||||||
msgNotify("Attempting to extract from %s...", dev->description);
|
msgNotify("Attempting to extract from %s...", dev->description);
|
||||||
if (!strcmp(dev->name, "rft0"))
|
if (!strcmp(dev->name, "rft0"))
|
||||||
@ -73,7 +76,8 @@ mediaInitTape(Device *dev)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
msgConfirm("Tape extract command failed with status %d!", i);
|
msgConfirm("Tape extract command failed with status %d!\n"
|
||||||
|
"Unable to use tape media.", i);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,5 +361,5 @@ int
|
|||||||
tcpMenuSelect(dialogMenuItem *self)
|
tcpMenuSelect(dialogMenuItem *self)
|
||||||
{
|
{
|
||||||
(void)tcpDeviceSelect();
|
(void)tcpDeviceSelect();
|
||||||
return DITEM_SUCCESS | DITEM_RECREATE | DITEM_RESTORE;
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user