Adapt routing configuration glue to rc.conf format.
This commit is contained in:
parent
3f1ea1975a
commit
a66697afa3
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user