mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
If we're running through the FTP setup dialog the *first* time, skip
the FTP path if we've already configured one (this allows preconfigured ftp servers).
This commit is contained in:
parent
09bef27f97
commit
41b018dd0b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18503
2 changed files with 22 additions and 10 deletions
|
@ -4,7 +4,7 @@
|
|||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: media.c,v 1.51 1996/08/01 12:59:54 jkh Exp $
|
||||
* $Id: media.c,v 1.52 1996/08/03 10:11:16 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
|
@ -259,12 +259,18 @@ mediaSetFTP(dialogMenuItem *self)
|
|||
static Device ftpDevice;
|
||||
char *cp, *hostname, *dir;
|
||||
extern int FtpPort;
|
||||
static int first_time = 1;
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
else
|
||||
cp = variable_get(VAR_FTP_PATH);
|
||||
cp = variable_get(VAR_FTP_PATH);
|
||||
if (!(cp && first_time)) {
|
||||
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
else
|
||||
cp = variable_get(VAR_FTP_PATH);
|
||||
}
|
||||
if (first_time)
|
||||
first_time = 0;
|
||||
if (!cp) {
|
||||
msgConfirm("%s not set! Not setting an FTP installation path, OK?", VAR_FTP_PATH);
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: media.c,v 1.51 1996/08/01 12:59:54 jkh Exp $
|
||||
* $Id: media.c,v 1.52 1996/08/03 10:11:16 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
|
@ -259,12 +259,18 @@ mediaSetFTP(dialogMenuItem *self)
|
|||
static Device ftpDevice;
|
||||
char *cp, *hostname, *dir;
|
||||
extern int FtpPort;
|
||||
static int first_time = 1;
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
else
|
||||
cp = variable_get(VAR_FTP_PATH);
|
||||
cp = variable_get(VAR_FTP_PATH);
|
||||
if (!(cp && first_time)) {
|
||||
if (!dmenuOpenSimple(&MenuMediaFTP, FALSE))
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
else
|
||||
cp = variable_get(VAR_FTP_PATH);
|
||||
}
|
||||
if (first_time)
|
||||
first_time = 0;
|
||||
if (!cp) {
|
||||
msgConfirm("%s not set! Not setting an FTP installation path, OK?", VAR_FTP_PATH);
|
||||
return DITEM_FAILURE | DITEM_RECREATE;
|
||||
|
|
Loading…
Reference in a new issue