Adjust config variables to more closely match rc.conf

This commit is contained in:
Jordan K. Hubbard 1997-05-22 21:26:11 +00:00
parent 911089957e
commit 53f741779c
9 changed files with 105 additions and 90 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.90 1997/04/29 09:14:24 jkh Exp $
* $Id: config.c,v 1.91 1997/05/05 06:32:43 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -794,28 +794,32 @@ configNFSServer(dialogMenuItem *self)
if (!file_readable("/etc/exports")) {
WINDOW *w = savescr();
dialog_clear_norefresh();
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\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");
vsystem("echo '#/usr huey louie dewie' >> /etc/exports");
vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports");
vsystem("echo '#/a -maproot=0 bill albert' >> /etc/exports");
vsystem("echo '#' >> /etc/exports");
vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
vsystem("echo >> /etc/exports");
sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
dialog_clear();
systemExecute(cmd);
restorescr(w);
if (file_readable("/etc/exports.disabled"))
vsystem("mv /etc/exports.disabled /etc/exports");
else {
dialog_clear_norefresh();
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\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");
vsystem("echo '#/usr huey louie dewie' >> /etc/exports");
vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports");
vsystem("echo '#/a -maproot=0 bill albert' >> /etc/exports");
vsystem("echo '#' >> /etc/exports");
vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
vsystem("echo >> /etc/exports");
sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
dialog_clear();
systemExecute(cmd);
restorescr(w);
}
variable_set2(VAR_NFS_SERVER, "YES");
}
else if (variable_get(VAR_NFS_SERVER)) { /* We want to turn it off again? */
unlink("/etc/exports");
vsystem("mv -f /etc/exports /etc/exports.disabled");
variable_unset(VAR_NFS_SERVER);
}
return DITEM_SUCCESS;

View File

@ -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.132 1997/05/14 07:12:47 jkh Exp $
* $Id: menus.c,v 1.133 1997/05/22 00:17:10 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -263,8 +263,8 @@ DMenu MenuIndex = {
{ "Media, FTP Passive", "Select passive FTP installation media.", NULL, mediaSetFTPPassive },
{ "Network Interfaces", "Configure network interfaces", NULL, tcpMenuSelect },
{ "Networking Services", "The network services menu.", NULL, dmenuSubmenu, NULL, &MenuNetworking },
{ "NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client=YES" },
{ "NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server" },
{ "NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
{ "NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable" },
{ "NTP Menu", "The NTP configuration menu.", NULL, dmenuSubmenu, NULL, &MenuNTP },
{ "Options", "The options editor.", NULL, optionsEditor },
{ "Packages", "The packages collection", NULL, configPackages },
@ -1132,11 +1132,11 @@ DMenu MenuNetworking = {
{ { "Interfaces", "Configure additional network interfaces",
NULL, tcpMenuSelect },
{ "NFS client", "This machine will be an NFS client",
dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
{ "NFS server", "This machine will be an NFS server",
dmenuVarCheck, configNFSServer, NULL, "nfs_server" },
dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable" },
{ "Gateway", "This machine will route packets between interfaces",
dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "gateway_enable=YES" },
#ifdef NETCON_EXTENTIONS
{ "Netcon", "Install the Novell client/server demo package",
dmenuVarCheck, configNovell, NULL, "novell" },
@ -1146,7 +1146,7 @@ DMenu MenuNetworking = {
{ "router", "Select routing daemon (default: routed)",
dmenuVarCheck, configRouter, NULL, "router" },
{ "Rwhod", "This machine wants to run the rwho daemon",
dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod_enable=YES" },
{ "Anon FTP", "This machine wishes to allow anonymous FTP.",
dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
{ "Samba", "Install Samba for LanManager (NETBUI) access.",
@ -1288,6 +1288,8 @@ DMenu MenuSysconsSaver = {
NULL,
{ { "blank", "Simply blank the screen",
dmenuVarCheck, configSaver, NULL, "saver=blank" },
{ "Daemon", "\"BSD Daemon\" animated screen saver",
dmenuVarCheck, configSaver, NULL, "saver=daemon" },
{ "Green", "\"Green\" power saving mode (if supported by monitor)",
dmenuVarCheck, configSaver, NULL, "saver=green" },
{ "Snake", "Draw a FreeBSD \"snake\" on your screen",
@ -1382,4 +1384,3 @@ DMenu MenuFixit = {
{ NULL } },
};

View File

@ -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.128 1997/05/22 00:13:58 jkh Exp $
* $Id: sysinstall.h,v 1.129 1997/05/22 00:17:11 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -131,7 +131,7 @@
#define VAR_NFS_PATH "nfs"
#define VAR_NFS_HOST "nfsHost"
#define VAR_NFS_SECURE "nfsSecure"
#define VAR_NFS_SERVER "nfs_server"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
#define VAR_NOVELL "novell"
#define VAR_NTPDATE "ntpdate"

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.90 1997/04/29 09:14:24 jkh Exp $
* $Id: config.c,v 1.91 1997/05/05 06:32:43 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -794,28 +794,32 @@ configNFSServer(dialogMenuItem *self)
if (!file_readable("/etc/exports")) {
WINDOW *w = savescr();
dialog_clear_norefresh();
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\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");
vsystem("echo '#/usr huey louie dewie' >> /etc/exports");
vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports");
vsystem("echo '#/a -maproot=0 bill albert' >> /etc/exports");
vsystem("echo '#' >> /etc/exports");
vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
vsystem("echo >> /etc/exports");
sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
dialog_clear();
systemExecute(cmd);
restorescr(w);
if (file_readable("/etc/exports.disabled"))
vsystem("mv /etc/exports.disabled /etc/exports");
else {
dialog_clear_norefresh();
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\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");
vsystem("echo '#/usr huey louie dewie' >> /etc/exports");
vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports");
vsystem("echo '#/a -maproot=0 bill albert' >> /etc/exports");
vsystem("echo '#' >> /etc/exports");
vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
vsystem("echo >> /etc/exports");
sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
dialog_clear();
systemExecute(cmd);
restorescr(w);
}
variable_set2(VAR_NFS_SERVER, "YES");
}
else if (variable_get(VAR_NFS_SERVER)) { /* We want to turn it off again? */
unlink("/etc/exports");
vsystem("mv -f /etc/exports /etc/exports.disabled");
variable_unset(VAR_NFS_SERVER);
}
return DITEM_SUCCESS;

View File

@ -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.132 1997/05/14 07:12:47 jkh Exp $
* $Id: menus.c,v 1.133 1997/05/22 00:17:10 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -263,8 +263,8 @@ DMenu MenuIndex = {
{ "Media, FTP Passive", "Select passive FTP installation media.", NULL, mediaSetFTPPassive },
{ "Network Interfaces", "Configure network interfaces", NULL, tcpMenuSelect },
{ "Networking Services", "The network services menu.", NULL, dmenuSubmenu, NULL, &MenuNetworking },
{ "NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client=YES" },
{ "NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server" },
{ "NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
{ "NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable" },
{ "NTP Menu", "The NTP configuration menu.", NULL, dmenuSubmenu, NULL, &MenuNTP },
{ "Options", "The options editor.", NULL, optionsEditor },
{ "Packages", "The packages collection", NULL, configPackages },
@ -1132,11 +1132,11 @@ DMenu MenuNetworking = {
{ { "Interfaces", "Configure additional network interfaces",
NULL, tcpMenuSelect },
{ "NFS client", "This machine will be an NFS client",
dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
{ "NFS server", "This machine will be an NFS server",
dmenuVarCheck, configNFSServer, NULL, "nfs_server" },
dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable" },
{ "Gateway", "This machine will route packets between interfaces",
dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "gateway_enable=YES" },
#ifdef NETCON_EXTENTIONS
{ "Netcon", "Install the Novell client/server demo package",
dmenuVarCheck, configNovell, NULL, "novell" },
@ -1146,7 +1146,7 @@ DMenu MenuNetworking = {
{ "router", "Select routing daemon (default: routed)",
dmenuVarCheck, configRouter, NULL, "router" },
{ "Rwhod", "This machine wants to run the rwho daemon",
dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod_enable=YES" },
{ "Anon FTP", "This machine wishes to allow anonymous FTP.",
dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
{ "Samba", "Install Samba for LanManager (NETBUI) access.",
@ -1288,6 +1288,8 @@ DMenu MenuSysconsSaver = {
NULL,
{ { "blank", "Simply blank the screen",
dmenuVarCheck, configSaver, NULL, "saver=blank" },
{ "Daemon", "\"BSD Daemon\" animated screen saver",
dmenuVarCheck, configSaver, NULL, "saver=daemon" },
{ "Green", "\"Green\" power saving mode (if supported by monitor)",
dmenuVarCheck, configSaver, NULL, "saver=green" },
{ "Snake", "Draw a FreeBSD \"snake\" on your screen",
@ -1382,4 +1384,3 @@ DMenu MenuFixit = {
{ NULL } },
};

View File

@ -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.128 1997/05/22 00:13:58 jkh Exp $
* $Id: sysinstall.h,v 1.129 1997/05/22 00:17:11 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -131,7 +131,7 @@
#define VAR_NFS_PATH "nfs"
#define VAR_NFS_HOST "nfsHost"
#define VAR_NFS_SECURE "nfsSecure"
#define VAR_NFS_SERVER "nfs_server"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
#define VAR_NOVELL "novell"
#define VAR_NTPDATE "ntpdate"

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.90 1997/04/29 09:14:24 jkh Exp $
* $Id: config.c,v 1.91 1997/05/05 06:32:43 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -794,28 +794,32 @@ configNFSServer(dialogMenuItem *self)
if (!file_readable("/etc/exports")) {
WINDOW *w = savescr();
dialog_clear_norefresh();
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\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");
vsystem("echo '#/usr huey louie dewie' >> /etc/exports");
vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports");
vsystem("echo '#/a -maproot=0 bill albert' >> /etc/exports");
vsystem("echo '#' >> /etc/exports");
vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
vsystem("echo >> /etc/exports");
sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
dialog_clear();
systemExecute(cmd);
restorescr(w);
if (file_readable("/etc/exports.disabled"))
vsystem("mv /etc/exports.disabled /etc/exports");
else {
dialog_clear_norefresh();
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\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");
vsystem("echo '#/usr huey louie dewie' >> /etc/exports");
vsystem("echo '#/home -alldirs janice jimmy frank' >> /etc/exports");
vsystem("echo '#/a -maproot=0 bill albert' >> /etc/exports");
vsystem("echo '#' >> /etc/exports");
vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
vsystem("echo >> /etc/exports");
sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
dialog_clear();
systemExecute(cmd);
restorescr(w);
}
variable_set2(VAR_NFS_SERVER, "YES");
}
else if (variable_get(VAR_NFS_SERVER)) { /* We want to turn it off again? */
unlink("/etc/exports");
vsystem("mv -f /etc/exports /etc/exports.disabled");
variable_unset(VAR_NFS_SERVER);
}
return DITEM_SUCCESS;

View File

@ -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.132 1997/05/14 07:12:47 jkh Exp $
* $Id: menus.c,v 1.133 1997/05/22 00:17:10 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -263,8 +263,8 @@ DMenu MenuIndex = {
{ "Media, FTP Passive", "Select passive FTP installation media.", NULL, mediaSetFTPPassive },
{ "Network Interfaces", "Configure network interfaces", NULL, tcpMenuSelect },
{ "Networking Services", "The network services menu.", NULL, dmenuSubmenu, NULL, &MenuNetworking },
{ "NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client=YES" },
{ "NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server" },
{ "NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
{ "NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable" },
{ "NTP Menu", "The NTP configuration menu.", NULL, dmenuSubmenu, NULL, &MenuNTP },
{ "Options", "The options editor.", NULL, optionsEditor },
{ "Packages", "The packages collection", NULL, configPackages },
@ -1132,11 +1132,11 @@ DMenu MenuNetworking = {
{ { "Interfaces", "Configure additional network interfaces",
NULL, tcpMenuSelect },
{ "NFS client", "This machine will be an NFS client",
dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
{ "NFS server", "This machine will be an NFS server",
dmenuVarCheck, configNFSServer, NULL, "nfs_server" },
dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable" },
{ "Gateway", "This machine will route packets between interfaces",
dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "gateway_enable=YES" },
#ifdef NETCON_EXTENTIONS
{ "Netcon", "Install the Novell client/server demo package",
dmenuVarCheck, configNovell, NULL, "novell" },
@ -1146,7 +1146,7 @@ DMenu MenuNetworking = {
{ "router", "Select routing daemon (default: routed)",
dmenuVarCheck, configRouter, NULL, "router" },
{ "Rwhod", "This machine wants to run the rwho daemon",
dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod=YES" },
dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod_enable=YES" },
{ "Anon FTP", "This machine wishes to allow anonymous FTP.",
dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
{ "Samba", "Install Samba for LanManager (NETBUI) access.",
@ -1288,6 +1288,8 @@ DMenu MenuSysconsSaver = {
NULL,
{ { "blank", "Simply blank the screen",
dmenuVarCheck, configSaver, NULL, "saver=blank" },
{ "Daemon", "\"BSD Daemon\" animated screen saver",
dmenuVarCheck, configSaver, NULL, "saver=daemon" },
{ "Green", "\"Green\" power saving mode (if supported by monitor)",
dmenuVarCheck, configSaver, NULL, "saver=green" },
{ "Snake", "Draw a FreeBSD \"snake\" on your screen",
@ -1382,4 +1384,3 @@ DMenu MenuFixit = {
{ NULL } },
};

View File

@ -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.128 1997/05/22 00:13:58 jkh Exp $
* $Id: sysinstall.h,v 1.129 1997/05/22 00:17:11 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -131,7 +131,7 @@
#define VAR_NFS_PATH "nfs"
#define VAR_NFS_HOST "nfsHost"
#define VAR_NFS_SECURE "nfsSecure"
#define VAR_NFS_SERVER "nfs_server"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
#define VAR_NOVELL "novell"
#define VAR_NTPDATE "ntpdate"