From 66a0e8d6b0be9bddd17a134bb709154357040eb4 Mon Sep 17 00:00:00 2001 From: jkh Date: Tue, 14 Oct 1997 18:17:35 +0000 Subject: Add a new startup variables menu for tweaking rc.conf variables in more detail (also added more of them to the networking services menu). Add new dmenuISetVariable() function for interactive setting of non-boolean flags. --- release/sysinstall/dmenu.c | 24 +++++++++++++++- release/sysinstall/menus.c | 61 +++++++++++++++++++++++++++++++++++++---- release/sysinstall/sysinstall.h | 4 ++- 3 files changed, 82 insertions(+), 7 deletions(-) (limited to 'release') diff --git a/release/sysinstall/dmenu.c b/release/sysinstall/dmenu.c index c806ab9..45c861e 100644 --- a/release/sysinstall/dmenu.c +++ b/release/sysinstall/dmenu.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: dmenu.c,v 1.33 1997/06/13 14:21:19 jkh Exp $ + * $Id: dmenu.c,v 1.34 1997/09/17 16:18:14 pst Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -138,6 +138,28 @@ dmenuToggleVariable(dialogMenuItem *tmp) } int +dmenuISetVariable(dialogMenuItem *tmp) +{ + char *ans, *var; + WINDOW *w = NULL; /* Keep lint happy */ + + if (!(var = (char *)tmp->data)) { + msgConfirm("Incorrect data field for `%s'!", tmp->title); + return DITEM_FAILURE; + } + w = savescr(); + ans = msgGetInput(variable_get(var), tmp->title); + restorescr(w); + if (!ans) + return DITEM_FAILURE; + else if (!*ans) + variable_unset(var); + else + variable_set2(var, ans); + return DITEM_SUCCESS; +} + +int dmenuSetFlag(dialogMenuItem *tmp) { if (*((unsigned int *)tmp->data) & tmp->aux) diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c index d3e325f..53ecaab 100644 --- a/release/sysinstall/menus.c +++ b/release/sysinstall/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.145 1997/10/04 15:50:09 jkh Exp $ + * $Id: menus.c,v 1.146 1997/10/13 11:45:36 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -1101,13 +1101,15 @@ DMenu MenuConfigure = { NULL, dmenuSubmenu, NULL, &MenuMouse, NULL }, { "6 Networking", "Configure additional network services", NULL, dmenuSubmenu, NULL, &MenuNetworking }, - { "7 Options", "View/Set various installation options", + { "6 Startup", "Configure system startup services", + NULL, dmenuSubmenu, NULL, &MenuStartup }, + { "8 Options", "View/Set various installation options", NULL, optionsEditor }, - { "8 Packages", "Install pre-packaged software for FreeBSD", + { "9 Packages", "Install pre-packaged software for FreeBSD", NULL, configPackages }, - { "9 Root Password", "Set the system manager's password", + { "A Root Password", "Set the system manager's password", NULL, dmenuSystemCommand, NULL, "passwd root" }, - { "A HTML Docs", "Go to the HTML documentation menu (post-install)", + { "B HTML Docs", "Go to the HTML documentation menu (post-install)", NULL, docBrowser }, #ifdef USE_XIG_ENVIRONMENT { "X X + CDE", "Configure X Window system & CDE environment", @@ -1127,6 +1129,49 @@ DMenu MenuConfigure = { { NULL } }, }; +DMenu MenuStartup = { + DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, + "Startup Services Menu", + "This menu allows you to configure various aspects of your system's\n" + "startup configuration. Remember to use SPACE to select items! The\n" + "RETURN key will leave this menu (as with all checkbox menus).", + NULL, + NULL, + { { "APM", "Auto-power management services (typically laptops)", + dmenuVarCheck, dmenuToggleVariable, NULL, "apm_enable=YES" }, + { "pccard", "Enable PCCARD (AKA PCMCIA) services (also laptops)", + dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" }, + { "pccard mem", "Set PCCARD memory address (if enabled)", + dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" }, + { "pccard ifconfig", "List of PCCARD ethernet devices to configure", + dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" }, + { " ", " -- ", NULL, NULL, NULL, NULL, ' ', ' ', ' ' }, + { "startup dirs", "Set the list of dirs to look for startup scripts", + dmenuVarCheck, dmenuISetVariable, NULL, "local_startup" }, + { "named", "Run a local name server on this host", + dmenuVarCheck, dmenuToggleVariable, NULL, "named_enable=YES" }, + { "named flags", "Set default flags to named (if enabled)", + dmenuVarCheck, dmenuISetVariable, NULL, "named_flags" }, + { "nis client", "This host wishes to be an NIS client.", + dmenuVarCheck, dmenuToggleVariable, NULL, "nis_client_enable=YES" }, + { "nis server", "This host wishes to be an NIS server.", + dmenuVarCheck, dmenuToggleVariable, NULL, "nis_server_enable=YES" }, + { " ", " -- ", NULL, NULL, NULL, NULL, ' ', ' ', ' ' }, + { "accounting", "This host wishes to run process accounting.", + dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" }, + { "lpd", "This host has a printer and wants to run lpd.", + dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" }, + { "linux", "This host wants to be able to run linux binaries.", + dmenuVarCheck, dmenuToggleVariable, NULL, "linux_enable=YES" }, + { "quotas", "This host wishes to check quotas on startup.", + dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" }, + { "SCO", "This host wants to be able to run IBCS2 binaries.", + dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" }, + { "Exit", "Exit this menu (returning to previous)", + checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, + { NULL } }, +}; + DMenu MenuNetworking = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Network Services Menu", @@ -1142,6 +1187,12 @@ DMenu MenuNetworking = { dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" }, { "NFS server", "This machine will be an NFS server", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable" }, + { "AMD", "This machine wants to run the auto-mounter service", + dmenuVarCheck, dmenuToggleVariable, NULL, "amd_enable=YES" }, + { "AMD Flags", "Set flags to AMD service (if enabled)", + dmenuVarCheck, dmenuISetVariable, NULL, "amd_flags" }, + { "TCP Extentions", "Allow RFC1323 and RFC1544 TCP extentions?", + dmenuVarCheck, dmenuToggleVariable, NULL, "tcp_extentions=YES" }, { "Gateway", "This machine will route packets between interfaces", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway_enable=YES" }, #ifdef NETCON_EXTENTIONS diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 026e642..01d30d5 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.141 1997/09/17 16:18:21 pst Exp $ + * $Id: sysinstall.h,v 1.142 1997/10/12 16:21:19 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -366,6 +366,7 @@ extern DMenu MenuMediaFTP; /* FTP media menu */ extern DMenu MenuMediaTape; /* Tape media menu */ extern DMenu MenuNetworkDevice; /* Network device menu */ extern DMenu MenuNTP; /* NTP time server menu */ +extern DMenu MenuStartup; /* Startup services menu */ extern DMenu MenuSyscons; /* System console configuration menu */ extern DMenu MenuSysconsFont; /* System console font configuration menu */ extern DMenu MenuSysconsKeymap; /* System console keymap configuration menu */ @@ -493,6 +494,7 @@ extern int dmenuSubmenu(dialogMenuItem *tmp); extern int dmenuSystemCommand(dialogMenuItem *tmp); extern int dmenuSystemCommandBox(dialogMenuItem *tmp); extern int dmenuExit(dialogMenuItem *tmp); +extern int dmenuISetVariable(dialogMenuItem *tmp); extern int dmenuSetVariable(dialogMenuItem *tmp); extern int dmenuSetKmapVariable(dialogMenuItem *tmp); extern int dmenuSetVariables(dialogMenuItem *tmp); -- cgit v1.1