From 58dd43480cf9cc0d8e9b807555afaddf107d08bb Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Tue, 9 Feb 1999 22:18:10 +0000 Subject: [PATCH] Write changes out to /etc/rc.conf again; rc.conf.site is dead! --- release/sysinstall/config.c | 14 ++++++++------ release/sysinstall/install.c | 6 +++--- release/sysinstall/sysinstall.h | 4 ++-- release/sysinstall/system.c | 4 ++-- usr.sbin/sade/config.c | 14 ++++++++------ usr.sbin/sade/install.c | 6 +++--- usr.sbin/sade/sade.h | 4 ++-- usr.sbin/sade/system.c | 4 ++-- usr.sbin/sysinstall/config.c | 14 ++++++++------ usr.sbin/sysinstall/install.c | 6 +++--- usr.sbin/sysinstall/sysinstall.h | 4 ++-- usr.sbin/sysinstall/system.c | 4 ++-- 12 files changed, 45 insertions(+), 39 deletions(-) diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index 2ab6fae2ea1..cf92b12c06b 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.119 1999/02/02 15:57:13 jkh Exp $ + * $Id: config.c,v 1.120 1999/02/05 22:15:47 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -328,8 +328,8 @@ configEnvironmentRC_conf(void) char *fname; int marked; } configs[] = { - { "/etc/rc.conf", 0 }, - { "/etc/rc.conf.site", 1 }, + { "/etc/defaults/rc.conf", 0 }, + { "/etc/rc.conf", 1 }, { "/etc/rc.conf.local", 0 }, { NULL, 0 }, }; @@ -368,19 +368,21 @@ configEnvironmentResolv(char *config) int configRC(dialogMenuItem *unused) { - configRC_conf("/etc/rc.conf"); + configRC_conf(); return DITEM_SUCCESS; } void -configRC_conf(char *config) +configRC_conf(void) { FILE *rcSite; Variable *v; - rcSite = fopen("/etc/rc.conf.site", "w"); + rcSite = fopen("/etc/rc.conf", "w"); if (!rcSite) return; + fprintf(rcSite, "# This file now contains just the overrides from /etc/defaults/rc.conf\n"); + fprintf(rcSite, "# please make all changes to this file.\n\n"); /* Now do variable substitutions */ for (v = VarHead; v; v = v->next) { diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index 03512d3a06a..21f3375df18 100644 --- a/release/sysinstall/install.c +++ b/release/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.225 1999/01/29 11:39:04 jkh Exp $ + * $Id: install.c,v 1.226 1999/02/05 22:15:48 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -593,7 +593,7 @@ nodisks: } /* Now would be a good time to checkpoint the configuration data */ - configRC_conf("/etc/rc.conf"); + configRC_conf(); sync(); if (directory_exists("/usr/X11R6")) { @@ -739,7 +739,7 @@ installConfigure(void) dmenuOpenSimple(&MenuConfigure, FALSE); restorescr(w); } - configRC_conf("/etc/rc.conf"); + configRC_conf(); sync(); } diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 1d6a2ba8da8..481a0680a88 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.156 1999/02/05 22:15:51 jkh Exp $ + * $Id: sysinstall.h,v 1.157 1999/02/05 22:25:13 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -406,7 +406,7 @@ extern void command_func_add(char *key, commandFunc func, void *data); /* config.c */ extern void configEnvironmentRC_conf(void); extern void configEnvironmentResolv(char *config); -extern void configRC_conf(char *config); +extern void configRC_conf(void); extern int configFstab(dialogMenuItem *self); extern int configRC(dialogMenuItem *self); extern int configRegister(dialogMenuItem *self); diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c index b34664c9310..d7f35eedd21 100644 --- a/release/sysinstall/system.c +++ b/release/sysinstall/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.87 1999/01/08 09:13:00 jkh Exp $ + * $Id: system.c,v 1.88 1999/02/05 22:15:52 jkh Exp $ * * Jordan Hubbard * @@ -150,7 +150,7 @@ systemShutdown(int status) mediaDevice->shutdown(mediaDevice); /* write out any changes to rc.conf .. */ - configRC_conf("/etc/rc.conf"); + configRC_conf(); /* Shut down the dialog library */ if (DialogActive) { diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index 2ab6fae2ea1..cf92b12c06b 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.119 1999/02/02 15:57:13 jkh Exp $ + * $Id: config.c,v 1.120 1999/02/05 22:15:47 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -328,8 +328,8 @@ configEnvironmentRC_conf(void) char *fname; int marked; } configs[] = { - { "/etc/rc.conf", 0 }, - { "/etc/rc.conf.site", 1 }, + { "/etc/defaults/rc.conf", 0 }, + { "/etc/rc.conf", 1 }, { "/etc/rc.conf.local", 0 }, { NULL, 0 }, }; @@ -368,19 +368,21 @@ configEnvironmentResolv(char *config) int configRC(dialogMenuItem *unused) { - configRC_conf("/etc/rc.conf"); + configRC_conf(); return DITEM_SUCCESS; } void -configRC_conf(char *config) +configRC_conf(void) { FILE *rcSite; Variable *v; - rcSite = fopen("/etc/rc.conf.site", "w"); + rcSite = fopen("/etc/rc.conf", "w"); if (!rcSite) return; + fprintf(rcSite, "# This file now contains just the overrides from /etc/defaults/rc.conf\n"); + fprintf(rcSite, "# please make all changes to this file.\n\n"); /* Now do variable substitutions */ for (v = VarHead; v; v = v->next) { diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 03512d3a06a..21f3375df18 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.225 1999/01/29 11:39:04 jkh Exp $ + * $Id: install.c,v 1.226 1999/02/05 22:15:48 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -593,7 +593,7 @@ nodisks: } /* Now would be a good time to checkpoint the configuration data */ - configRC_conf("/etc/rc.conf"); + configRC_conf(); sync(); if (directory_exists("/usr/X11R6")) { @@ -739,7 +739,7 @@ installConfigure(void) dmenuOpenSimple(&MenuConfigure, FALSE); restorescr(w); } - configRC_conf("/etc/rc.conf"); + configRC_conf(); sync(); } diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 1d6a2ba8da8..481a0680a88 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.156 1999/02/05 22:15:51 jkh Exp $ + * $Id: sysinstall.h,v 1.157 1999/02/05 22:25:13 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -406,7 +406,7 @@ extern void command_func_add(char *key, commandFunc func, void *data); /* config.c */ extern void configEnvironmentRC_conf(void); extern void configEnvironmentResolv(char *config); -extern void configRC_conf(char *config); +extern void configRC_conf(void); extern int configFstab(dialogMenuItem *self); extern int configRC(dialogMenuItem *self); extern int configRegister(dialogMenuItem *self); diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index b34664c9310..d7f35eedd21 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.87 1999/01/08 09:13:00 jkh Exp $ + * $Id: system.c,v 1.88 1999/02/05 22:15:52 jkh Exp $ * * Jordan Hubbard * @@ -150,7 +150,7 @@ systemShutdown(int status) mediaDevice->shutdown(mediaDevice); /* write out any changes to rc.conf .. */ - configRC_conf("/etc/rc.conf"); + configRC_conf(); /* Shut down the dialog library */ if (DialogActive) { diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 2ab6fae2ea1..cf92b12c06b 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.119 1999/02/02 15:57:13 jkh Exp $ + * $Id: config.c,v 1.120 1999/02/05 22:15:47 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -328,8 +328,8 @@ configEnvironmentRC_conf(void) char *fname; int marked; } configs[] = { - { "/etc/rc.conf", 0 }, - { "/etc/rc.conf.site", 1 }, + { "/etc/defaults/rc.conf", 0 }, + { "/etc/rc.conf", 1 }, { "/etc/rc.conf.local", 0 }, { NULL, 0 }, }; @@ -368,19 +368,21 @@ configEnvironmentResolv(char *config) int configRC(dialogMenuItem *unused) { - configRC_conf("/etc/rc.conf"); + configRC_conf(); return DITEM_SUCCESS; } void -configRC_conf(char *config) +configRC_conf(void) { FILE *rcSite; Variable *v; - rcSite = fopen("/etc/rc.conf.site", "w"); + rcSite = fopen("/etc/rc.conf", "w"); if (!rcSite) return; + fprintf(rcSite, "# This file now contains just the overrides from /etc/defaults/rc.conf\n"); + fprintf(rcSite, "# please make all changes to this file.\n\n"); /* Now do variable substitutions */ for (v = VarHead; v; v = v->next) { diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 03512d3a06a..21f3375df18 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.225 1999/01/29 11:39:04 jkh Exp $ + * $Id: install.c,v 1.226 1999/02/05 22:15:48 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -593,7 +593,7 @@ nodisks: } /* Now would be a good time to checkpoint the configuration data */ - configRC_conf("/etc/rc.conf"); + configRC_conf(); sync(); if (directory_exists("/usr/X11R6")) { @@ -739,7 +739,7 @@ installConfigure(void) dmenuOpenSimple(&MenuConfigure, FALSE); restorescr(w); } - configRC_conf("/etc/rc.conf"); + configRC_conf(); sync(); } diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 1d6a2ba8da8..481a0680a88 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.156 1999/02/05 22:15:51 jkh Exp $ + * $Id: sysinstall.h,v 1.157 1999/02/05 22:25:13 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -406,7 +406,7 @@ extern void command_func_add(char *key, commandFunc func, void *data); /* config.c */ extern void configEnvironmentRC_conf(void); extern void configEnvironmentResolv(char *config); -extern void configRC_conf(char *config); +extern void configRC_conf(void); extern int configFstab(dialogMenuItem *self); extern int configRC(dialogMenuItem *self); extern int configRegister(dialogMenuItem *self); diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index b34664c9310..d7f35eedd21 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/sysinstall/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.87 1999/01/08 09:13:00 jkh Exp $ + * $Id: system.c,v 1.88 1999/02/05 22:15:52 jkh Exp $ * * Jordan Hubbard * @@ -150,7 +150,7 @@ systemShutdown(int status) mediaDevice->shutdown(mediaDevice); /* write out any changes to rc.conf .. */ - configRC_conf("/etc/rc.conf"); + configRC_conf(); /* Shut down the dialog library */ if (DialogActive) {