From 33dd2634029f993cc967dd2c850365cfa202d82e Mon Sep 17 00:00:00 2001 From: jkh Date: Sat, 23 Mar 1996 07:21:31 +0000 Subject: [PATCH] Make the editor a selectable option. Some people don't care for `ee'! --- release/sysinstall/anonFTP.c | 4 ++-- release/sysinstall/install.c | 3 ++- release/sysinstall/installFinal.c | 11 ++++++----- release/sysinstall/options.c | 5 ++++- release/sysinstall/sysinstall.h | 3 ++- usr.sbin/sade/install.c | 3 ++- usr.sbin/sade/sade.h | 3 ++- usr.sbin/sysinstall/anonFTP.c | 4 ++-- usr.sbin/sysinstall/install.c | 3 ++- usr.sbin/sysinstall/options.c | 5 ++++- usr.sbin/sysinstall/sysinstall.h | 3 ++- 11 files changed, 30 insertions(+), 17 deletions(-) diff --git a/release/sysinstall/anonFTP.c b/release/sysinstall/anonFTP.c index beb54e681baa..0af53be9e6bb 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.7 1996/03/02 07:31:48 jkh Exp $ + * $Id: anonFTP.c,v 1.8 1996/03/18 15:27:39 jkh Exp $ * * Copyright (c) 1995 * Coranth Gryphon. All rights reserved. @@ -472,7 +472,7 @@ configAnonFTP(char *unused) dialog_clear(); msgNotify("Uncompressing the editor - please wait.."); vsystem("echo Your welcome message here. > %s/etc/%s", tconf.homedir, MOTD_FILE); - sprintf(cmd, "/stand/ee %s/etc/%s", tconf.homedir, MOTD_FILE); + sprintf(cmd, "%s %s/etc/%s", variable_get(VAR_EDITOR), tconf.homedir, MOTD_FILE); systemExecute(cmd); } } diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 9c9e60a15e12..9a1fd7f8f40f 100644 --- a/release/sysinstall/install.c +++ b/release/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.76 1996/03/02 07:31:54 jkh Exp $ + * $Id: install.c,v 1.77 1996/03/18 15:27:54 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -786,6 +786,7 @@ installVarDefaults(char *unused) variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); + variable_set2(VAR_EDITOR, "/stand/ee"); variable_set2(VAR_FTP_USER, "ftp"); variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.4.2"); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); diff --git a/release/sysinstall/installFinal.c b/release/sysinstall/installFinal.c index f2124c053070..241b52288ae1 100644 --- a/release/sysinstall/installFinal.c +++ b/release/sysinstall/installFinal.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: installFinal.c,v 1.22 1996/03/18 15:27:56 jkh Exp $ + * $Id: installFinal.c,v 1.23 1996/03/23 07:11:58 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard & Coranth Gryphon. All rights reserved. @@ -197,15 +197,15 @@ configSamba(char *unused) int configNFSServer(char *unused) { + char cmd[256]; + /* If we're an NFS server, we need an exports file */ if (!file_readable("/etc/exports")) { dialog_clear(); msgConfirm("Operating as an NFS server means that you must first configure\n" "an /etc/exports file to indicate which hosts are allowed certain\n" "kinds of access to your local file systems.\n" - "Press [ENTER] now to invoke an editor on /etc/exports (the editor\n" - "may take a little while to uncompress the first time - please be\n" - "patient!)"); + "Press [ENTER] now to invoke an editor on /etc/exports\n"); vsystem("echo '#The following examples export /usr to 3 machines named after ducks,' > /etc/exports"); vsystem("echo '#/home and all directories under it to machines named after dead rock stars' >> /etc/exports"); vsystem("echo '#and, finally, /a to 2 privileged machines allowed to write on it as root.' >> /etc/exports"); @@ -216,7 +216,8 @@ configNFSServer(char *unused) vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports"); vsystem("echo >> /etc/exports"); dialog_clear(); - systemExecute("/stand/ee /etc/exports"); + sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR)); + systemExecute(cmd); } variable_set2("nfs_server", "YES"); return RET_SUCCESS; diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c index 9ea597d75e68..c4e9a8426c78 100644 --- a/release/sysinstall/options.c +++ b/release/sysinstall/options.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: options.c,v 1.28 1996/03/19 12:08:00 jkh Exp $ + * $Id: options.c,v 1.29 1996/03/21 09:30:12 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -104,6 +104,7 @@ mediaCheck(Option opt) #define RELNAME_PROMPT "Please specify the release you wish to load:" #define BPKG_PROMPT "Please specify the name of the HTML browser package:" #define BBIN_PROMPT "Please specify a full pathname to the HTML browser binary:" +#define EDITOR_PROMPT "Please specify the name of the text editor you wish to use:" #define RETRY_PROMPT "Please specify the number of times to retry an FTP request:" #define PKG_PROMPT "Please specify a temporary directory with lots of free space:" @@ -122,6 +123,8 @@ static Option Options[] = { OPT_IS_VAR, RETRY_PROMPT, VAR_FTP_RETRIES, varCheck }, { "FTP username", "Username and password to use instead of anonymous", OPT_IS_FUNC, mediaSetFtpUserPass, VAR_FTP_USER, varCheck }, +{ "Editor", "Which text editor to use during installation", + OPT_IS_VAR, EDITOR_PROMPT, VAR_EDITOR, varCheck }, { "Tape Blocksize", "Tape media block size in 512 byte blocks", OPT_IS_VAR, TAPE_PROMPT, VAR_TAPE_BLOCKSIZE, varCheck }, { "Extract Detail", "How verbosely to display file name information during extractions", diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 01eb68b29b26..9a91d873311e 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -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: sysinstall.h,v 1.46 1996/03/18 15:28:06 jkh Exp $ + * $Id: sysinstall.h,v 1.47 1996/03/21 09:30:15 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -108,6 +108,7 @@ #define VAR_DISK "disk" #define VAR_DISKSPACE "diskSpace" #define VAR_DOMAINNAME "domainname" +#define VAR_EDITOR "editor" #define VAR_EXTRAS "ifconfig_" #define VAR_FTP_ONERROR "ftpOnError" #define VAR_FTP_PASS "ftpPass" diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 9c9e60a15e12..9a1fd7f8f40f 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.76 1996/03/02 07:31:54 jkh Exp $ + * $Id: install.c,v 1.77 1996/03/18 15:27:54 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -786,6 +786,7 @@ installVarDefaults(char *unused) variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); + variable_set2(VAR_EDITOR, "/stand/ee"); variable_set2(VAR_FTP_USER, "ftp"); variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.4.2"); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 01eb68b29b26..9a91d873311e 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -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: sysinstall.h,v 1.46 1996/03/18 15:28:06 jkh Exp $ + * $Id: sysinstall.h,v 1.47 1996/03/21 09:30:15 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -108,6 +108,7 @@ #define VAR_DISK "disk" #define VAR_DISKSPACE "diskSpace" #define VAR_DOMAINNAME "domainname" +#define VAR_EDITOR "editor" #define VAR_EXTRAS "ifconfig_" #define VAR_FTP_ONERROR "ftpOnError" #define VAR_FTP_PASS "ftpPass" diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c index beb54e681baa..0af53be9e6bb 100644 --- a/usr.sbin/sysinstall/anonFTP.c +++ b/usr.sbin/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.7 1996/03/02 07:31:48 jkh Exp $ + * $Id: anonFTP.c,v 1.8 1996/03/18 15:27:39 jkh Exp $ * * Copyright (c) 1995 * Coranth Gryphon. All rights reserved. @@ -472,7 +472,7 @@ configAnonFTP(char *unused) dialog_clear(); msgNotify("Uncompressing the editor - please wait.."); vsystem("echo Your welcome message here. > %s/etc/%s", tconf.homedir, MOTD_FILE); - sprintf(cmd, "/stand/ee %s/etc/%s", tconf.homedir, MOTD_FILE); + sprintf(cmd, "%s %s/etc/%s", variable_get(VAR_EDITOR), tconf.homedir, MOTD_FILE); systemExecute(cmd); } } diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 9c9e60a15e12..9a1fd7f8f40f 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.76 1996/03/02 07:31:54 jkh Exp $ + * $Id: install.c,v 1.77 1996/03/18 15:27:54 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -786,6 +786,7 @@ installVarDefaults(char *unused) variable_set2(VAR_RELNAME, RELEASE_NAME); variable_set2(VAR_CPIO_VERBOSITY, "high"); variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE); + variable_set2(VAR_EDITOR, "/stand/ee"); variable_set2(VAR_FTP_USER, "ftp"); variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.4.2"); variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx"); diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c index 9ea597d75e68..c4e9a8426c78 100644 --- a/usr.sbin/sysinstall/options.c +++ b/usr.sbin/sysinstall/options.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: options.c,v 1.28 1996/03/19 12:08:00 jkh Exp $ + * $Id: options.c,v 1.29 1996/03/21 09:30:12 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -104,6 +104,7 @@ mediaCheck(Option opt) #define RELNAME_PROMPT "Please specify the release you wish to load:" #define BPKG_PROMPT "Please specify the name of the HTML browser package:" #define BBIN_PROMPT "Please specify a full pathname to the HTML browser binary:" +#define EDITOR_PROMPT "Please specify the name of the text editor you wish to use:" #define RETRY_PROMPT "Please specify the number of times to retry an FTP request:" #define PKG_PROMPT "Please specify a temporary directory with lots of free space:" @@ -122,6 +123,8 @@ static Option Options[] = { OPT_IS_VAR, RETRY_PROMPT, VAR_FTP_RETRIES, varCheck }, { "FTP username", "Username and password to use instead of anonymous", OPT_IS_FUNC, mediaSetFtpUserPass, VAR_FTP_USER, varCheck }, +{ "Editor", "Which text editor to use during installation", + OPT_IS_VAR, EDITOR_PROMPT, VAR_EDITOR, varCheck }, { "Tape Blocksize", "Tape media block size in 512 byte blocks", OPT_IS_VAR, TAPE_PROMPT, VAR_TAPE_BLOCKSIZE, varCheck }, { "Extract Detail", "How verbosely to display file name information during extractions", diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 01eb68b29b26..9a91d873311e 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -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: sysinstall.h,v 1.46 1996/03/18 15:28:06 jkh Exp $ + * $Id: sysinstall.h,v 1.47 1996/03/21 09:30:15 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -108,6 +108,7 @@ #define VAR_DISK "disk" #define VAR_DISKSPACE "diskSpace" #define VAR_DOMAINNAME "domainname" +#define VAR_EDITOR "editor" #define VAR_EXTRAS "ifconfig_" #define VAR_FTP_ONERROR "ftpOnError" #define VAR_FTP_PASS "ftpPass"