summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-05-05 06:32:44 +0000
committerjkh <jkh@FreeBSD.org>1997-05-05 06:32:44 +0000
commita66697afa3aacc2850d34cb86212dc858cb18b83 (patch)
tree7458bfd853e4db1fcf64ba8dce24a2cdd8626630 /usr.sbin
parent3f1ea1975a58479fa08ead002d32a9076f273e23 (diff)
downloadFreeBSD-src-a66697afa3aacc2850d34cb86212dc858cb18b83.zip
FreeBSD-src-a66697afa3aacc2850d34cb86212dc858cb18b83.tar.gz
Adapt routing configuration glue to rc.conf format.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/config.c44
-rw-r--r--usr.sbin/sade/install.c4
-rw-r--r--usr.sbin/sade/sade.h5
-rw-r--r--usr.sbin/sysinstall/config.c44
-rw-r--r--usr.sbin/sysinstall/install.c4
-rw-r--r--usr.sbin/sysinstall/sysinstall.h5
6 files changed, 64 insertions, 42 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index 16d2631..0b3c939 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -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.89 1997/04/28 10:31:13 jkh Exp $
+ * $Id: config.c,v 1.90 1997/04/29 09:14:24 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -393,7 +393,7 @@ configRC_conf(char *config)
free(lines[i]);
lines[i] = (char *)malloc(strlen(v->name) + strlen(v->value) + (comment ? strlen(comment) : 0) + 10);
if (comment)
- sprintf(lines[i], "%s=\"%s\"\t\t%s\n", v->name, v->value, comment);
+ sprintf(lines[i], "%s=\"%s\"\t\t%s", v->name, v->value, comment);
else
sprintf(lines[i], "%s=\"%s\"\n", v->name, v->value);
}
@@ -632,29 +632,39 @@ configRouter(dialogMenuItem *self)
"will attempt to load if you select gated. Any other\n"
"choice of routing daemon will be assumed to be something\n"
"the user intends to install themselves before rebooting\n"
- "the system. If you don't want any routing daemon, choose NO") ?
- DITEM_SUCCESS : DITEM_FAILURE;
-
+ "the system. If you don't want any routing daemon, choose NO")
+ ? DITEM_SUCCESS : DITEM_FAILURE;
+
if (ret == DITEM_SUCCESS) {
- char *cp;
-
- cp = variable_get(VAR_ROUTER);
- if (strcmp(cp, "NO")) {
+ char *cp = variable_get(VAR_ROUTER);
+
+ if (cp && strcmp(cp, "NO")) {
+ variable_set2(VAR_ROUTER_ENABLE, "YES");
if (!strcmp(cp, "gated")) {
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
msgConfirm("Unable to load gated package. Falling back to no router.");
- variable_set2(VAR_ROUTER, "NO");
+ variable_unset(VAR_ROUTER);
+ variable_unset(VAR_ROUTERFLAGS);
+ variable_set2(VAR_ROUTER_ENABLE, "NO");
+ cp = NULL;
}
}
- /* Now get the flags, if they chose a router */
- ret = variable_get_value(VAR_ROUTERFLAGS,
- "Please Specify the routing daemon flags; if you're running routed\n"
- "then -q is the right choice for nodes and -s for gateway hosts.\n") ? DITEM_SUCCESS : DITEM_FAILURE;
- if (ret != DITEM_SUCCESS) {
- variable_unset(VAR_ROUTER);
- variable_unset(VAR_ROUTERFLAGS);
+ if (cp) {
+ /* Now get the flags, if they chose a router */
+ ret = variable_get_value(VAR_ROUTERFLAGS,
+ "Please Specify the routing daemon flags; if you're running routed\n"
+ "then -q is the right choice for nodes and -s for gateway hosts.\n")
+ ? DITEM_SUCCESS : DITEM_FAILURE;
+ if (ret != DITEM_SUCCESS)
+ variable_unset(VAR_ROUTERFLAGS);
}
}
+ else {
+ /* No router case */
+ variable_set2(VAR_ROUTER_ENABLE, "NO");
+ variable_unset(VAR_ROUTERFLAGS);
+ variable_unset(VAR_ROUTER);
+ }
}
return ret | DITEM_RESTORE;
}
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index f76436a..52eaf28 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.182 1997/04/28 10:31:13 jkh Exp $
+ * $Id: install.c,v 1.183 1997/05/05 05:16:02 pst Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -965,7 +965,7 @@ installVarDefaults(dialogMenuItem *self)
char *cp;
/* Set default startup options */
- variable_set2(VAR_ROUTER, "NO");
+ variable_set2(VAR_ROUTER_ENABLE, "NO");
variable_set2(VAR_RELNAME, RELEASE_NAME);
variable_set2(VAR_CPIO_VERBOSITY, "high");
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE);
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index a6acfea..b39af2a 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.125 1997/04/28 10:31:14 jkh Exp $
+ * $Id: sysinstall.h,v 1.126 1997/05/05 05:16:03 pst Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -59,7 +59,7 @@
#define PACKAGE_APACHE "apache-1.2b8"
#define PACKAGE_NETCON "commerce/netcon/bsd61"
#define PACKAGE_PCNFSD "pcnfsd-93.02.16"
-#define PACKAGE_SAMBA "samba-1.9.15p8"
+#define PACKAGE_SAMBA "samba-1.9.16p11"
#define PACKAGE_LYNX "lynx-2.7.1"
/* device limits */
@@ -144,6 +144,7 @@
#define VAR_RELNAME "releaseName"
#define VAR_ROOT_SIZE "rootSize"
#define VAR_ROUTER "router"
+#define VAR_ROUTER_ENABLE "router_enable"
#define VAR_ROUTERFLAGS "routerflags"
#define VAR_SAMBA_PKG "samba_pkg"
#define VAR_SERIAL_SPEED "serialSpeed"
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c
index 16d2631..0b3c939 100644
--- a/usr.sbin/sysinstall/config.c
+++ b/usr.sbin/sysinstall/config.c
@@ -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.89 1997/04/28 10:31:13 jkh Exp $
+ * $Id: config.c,v 1.90 1997/04/29 09:14:24 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -393,7 +393,7 @@ configRC_conf(char *config)
free(lines[i]);
lines[i] = (char *)malloc(strlen(v->name) + strlen(v->value) + (comment ? strlen(comment) : 0) + 10);
if (comment)
- sprintf(lines[i], "%s=\"%s\"\t\t%s\n", v->name, v->value, comment);
+ sprintf(lines[i], "%s=\"%s\"\t\t%s", v->name, v->value, comment);
else
sprintf(lines[i], "%s=\"%s\"\n", v->name, v->value);
}
@@ -632,29 +632,39 @@ configRouter(dialogMenuItem *self)
"will attempt to load if you select gated. Any other\n"
"choice of routing daemon will be assumed to be something\n"
"the user intends to install themselves before rebooting\n"
- "the system. If you don't want any routing daemon, choose NO") ?
- DITEM_SUCCESS : DITEM_FAILURE;
-
+ "the system. If you don't want any routing daemon, choose NO")
+ ? DITEM_SUCCESS : DITEM_FAILURE;
+
if (ret == DITEM_SUCCESS) {
- char *cp;
-
- cp = variable_get(VAR_ROUTER);
- if (strcmp(cp, "NO")) {
+ char *cp = variable_get(VAR_ROUTER);
+
+ if (cp && strcmp(cp, "NO")) {
+ variable_set2(VAR_ROUTER_ENABLE, "YES");
if (!strcmp(cp, "gated")) {
if (package_add(variable_get(VAR_GATED_PKG)) != DITEM_SUCCESS) {
msgConfirm("Unable to load gated package. Falling back to no router.");
- variable_set2(VAR_ROUTER, "NO");
+ variable_unset(VAR_ROUTER);
+ variable_unset(VAR_ROUTERFLAGS);
+ variable_set2(VAR_ROUTER_ENABLE, "NO");
+ cp = NULL;
}
}
- /* Now get the flags, if they chose a router */
- ret = variable_get_value(VAR_ROUTERFLAGS,
- "Please Specify the routing daemon flags; if you're running routed\n"
- "then -q is the right choice for nodes and -s for gateway hosts.\n") ? DITEM_SUCCESS : DITEM_FAILURE;
- if (ret != DITEM_SUCCESS) {
- variable_unset(VAR_ROUTER);
- variable_unset(VAR_ROUTERFLAGS);
+ if (cp) {
+ /* Now get the flags, if they chose a router */
+ ret = variable_get_value(VAR_ROUTERFLAGS,
+ "Please Specify the routing daemon flags; if you're running routed\n"
+ "then -q is the right choice for nodes and -s for gateway hosts.\n")
+ ? DITEM_SUCCESS : DITEM_FAILURE;
+ if (ret != DITEM_SUCCESS)
+ variable_unset(VAR_ROUTERFLAGS);
}
}
+ else {
+ /* No router case */
+ variable_set2(VAR_ROUTER_ENABLE, "NO");
+ variable_unset(VAR_ROUTERFLAGS);
+ variable_unset(VAR_ROUTER);
+ }
}
return ret | DITEM_RESTORE;
}
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index f76436a..52eaf28 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.182 1997/04/28 10:31:13 jkh Exp $
+ * $Id: install.c,v 1.183 1997/05/05 05:16:02 pst Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -965,7 +965,7 @@ installVarDefaults(dialogMenuItem *self)
char *cp;
/* Set default startup options */
- variable_set2(VAR_ROUTER, "NO");
+ variable_set2(VAR_ROUTER_ENABLE, "NO");
variable_set2(VAR_RELNAME, RELEASE_NAME);
variable_set2(VAR_CPIO_VERBOSITY, "high");
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE);
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index a6acfea..b39af2a 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.125 1997/04/28 10:31:14 jkh Exp $
+ * $Id: sysinstall.h,v 1.126 1997/05/05 05:16:03 pst Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -59,7 +59,7 @@
#define PACKAGE_APACHE "apache-1.2b8"
#define PACKAGE_NETCON "commerce/netcon/bsd61"
#define PACKAGE_PCNFSD "pcnfsd-93.02.16"
-#define PACKAGE_SAMBA "samba-1.9.15p8"
+#define PACKAGE_SAMBA "samba-1.9.16p11"
#define PACKAGE_LYNX "lynx-2.7.1"
/* device limits */
@@ -144,6 +144,7 @@
#define VAR_RELNAME "releaseName"
#define VAR_ROOT_SIZE "rootSize"
#define VAR_ROUTER "router"
+#define VAR_ROUTER_ENABLE "router_enable"
#define VAR_ROUTERFLAGS "routerflags"
#define VAR_SAMBA_PKG "samba_pkg"
#define VAR_SERIAL_SPEED "serialSpeed"
OpenPOWER on IntegriCloud