summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/anonFTP.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-23 01:29:35 +0000
committerjkh <jkh@FreeBSD.org>1996-04-23 01:29:35 +0000
commite665fee23a1e8faaacaceda94ce45295956dee10 (patch)
tree61dd517d68f78c02b32b70a1ec457f1509801e87 /release/sysinstall/anonFTP.c
parent70a317a618a87b0eac973736356fadfa45b35959 (diff)
downloadFreeBSD-src-e665fee23a1e8faaacaceda94ce45295956dee10.zip
FreeBSD-src-e665fee23a1e8faaacaceda94ce45295956dee10.tar.gz
Bring this into sync.
I still have a _very very annoying_ display bug which occurs when a menu item causes a submenu to be displayed - the screen repaints for the original menu (which is restored upon return from the submenu) are off by about 4 characters. I've tried restoring the screen, the cursor position, you name it - same deal. Grrrr! This commit is my first step in trying to get someone else to help me look into this one since I'm just tearing my hair out at this point!
Diffstat (limited to 'release/sysinstall/anonFTP.c')
-rw-r--r--release/sysinstall/anonFTP.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/release/sysinstall/anonFTP.c b/release/sysinstall/anonFTP.c
index 427e3f4..f4f152c 100644
--- a/release/sysinstall/anonFTP.c
+++ b/release/sysinstall/anonFTP.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: anonFTP.c,v 1.10 1996/04/07 03:52:16 jkh Exp $
+ * $Id: anonFTP.c,v 1.11 1996/04/13 13:31:19 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -211,7 +211,7 @@ createFtpUser(void)
}
/* This is it - how to get the setup values */
-int
+static int
anonftpOpenDialog(void)
{
WINDOW *ds_win;
@@ -405,9 +405,8 @@ configAnonFTP(dialogMenuItem *self)
dialog_clear();
i = anonftpOpenDialog();
if (i != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("Configuration of Anonymous FTP cancelled per user request.");
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
/*** Use defaults for any invalid values ***/
@@ -431,7 +430,7 @@ configAnonFTP(dialogMenuItem *self)
/*** If HomeDir does not exist, create it ***/
if (!directory_exists(tconf.homedir)) {
- vsystem("mkdir -p %s" ,tconf.homedir);
+ vsystem("mkdir -p %s", tconf.homedir);
}
if (directory_exists(tconf.homedir)) {
@@ -453,33 +452,25 @@ configAnonFTP(dialogMenuItem *self)
vsystem("chown -R %s.%s %s/pub", FTP_NAME, tconf.group, tconf.homedir);
}
else {
- dialog_clear();
msgConfirm("Unable to create FTP user! Anonymous FTP setup failed.");
i = DITEM_FAILURE;
}
- dialog_clear();
if (!msgYesNo("Create a welcome message file for anonymous FTP users?")) {
char cmd[256];
- WINDOW *w;
-
- w = savescr();
dialog_clear();
- msgNotify("Uncompressing the editor - please wait..");
vsystem("echo Your welcome message here. > %s/etc/%s", tconf.homedir, MOTD_FILE);
sprintf(cmd, "%s %s/etc/%s", variable_get(VAR_EDITOR), tconf.homedir, MOTD_FILE);
if (!systemExecute(cmd))
i = DITEM_SUCCESS;
else
i = DITEM_FAILURE;
- restorescr(w);
}
}
else {
- dialog_clear();
msgConfirm("Invalid Directory: %s\n"
"Anonymous FTP will not be set up.", tconf.homedir);
i = DITEM_FAILURE;
}
- return i;
+ return i | DITEM_RESTORE;
}
OpenPOWER on IntegriCloud