diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-02-15 13:21:19 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-02-15 13:21:19 +0000 |
| commit | 760b3ff032d6eeea68b5f6183f4eba3ec2545651 (patch) | |
| tree | b52772a5facc8203ab350c55c2dcce05a200ce4d | |
| parent | 2007fa5423054f5e41ce26404d2f9a80bba55c4b (diff) | |
Notes
| -rw-r--r-- | release/sysinstall/config.c | 24 | ||||
| -rw-r--r-- | release/sysinstall/sysinstall.h | 4 |
2 files changed, 18 insertions, 10 deletions
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 28c629a2f8015..2941214abceeb 100644 --- a/release/sysinstall/config.c +++ b/release/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.16.2.67 1997/02/14 02:55:54 jkh Exp $ + * $Id: config.c,v 1.16.2.68 1997/02/14 21:29:20 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -371,28 +371,36 @@ configSysconfig(char *config) msgDebug("Writing %s out to debugging screen..\n", config); fp = fdopen(DebugFD, "w"); } - else + else { + (void)vsystem("cp %s %s.previous", config, config); fp = fopen(config, "w"); + } for (i = 0; i < nlines; i++) { - static Boolean firstTime = TRUE; - fprintf(fp, lines[i]); /* Stand by for bogus special case handling - we try to dump the interface specs here */ - if (firstTime && !strncmp(lines[i], VAR_INTERFACES, strlen(VAR_INTERFACES))) { + if (!strncmp(lines[i], VAR_INTERFACES, strlen(VAR_INTERFACES))) { Device **devp; int j, cnt; devp = deviceFind(NULL, DEVICE_TYPE_NETWORK); cnt = deviceCount(devp); for (j = 0; j < cnt; j++) { - char iname[255]; + char iname[255], toadd[512]; + int k, addit = TRUE; snprintf(iname, 255, "%s%s", VAR_IFCONFIG, devp[j]->name); if ((cp = variable_get(iname))) { - fprintf(fp, "%s=\"%s\"\n", iname, cp); + snprintf(toadd, sizeof toadd, "%s=\"%s\"\n", iname, cp); + for (k = 0; k < nlines; k++) { + if (!strcmp(lines[k], toadd)) { + addit = FALSE; + break; + } + } + if (addit) + fprintf(fp, toadd); } } - firstTime = FALSE; } free(lines[i]); } diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 571faf13bdbce..dac30da0fd0ad 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.42.2.73 1997/02/07 04:26:51 jkh Exp $ + * $Id: sysinstall.h,v 1.42.2.74 1997/02/14 21:29:24 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -60,7 +60,7 @@ #define PACKAGE_NETCON "commerce/netcon/bsd61" #define PACKAGE_PCNFSD "pcnfsd-93.02.16" #define PACKAGE_SAMBA "samba-1.9.15p8" -#define PACKAGE_LYNX "lynx-2.6fm" +#define PACKAGE_LYNX "lynx-2.7" /* device limits */ #define DEV_NAME_MAX 64 /* The maximum length of a device name */ |
