Write changes out to /etc/rc.conf again; rc.conf.site is dead!

This commit is contained in:
jkh 1999-02-09 22:18:10 +00:00
parent 975a675525
commit bf919900eb
12 changed files with 45 additions and 39 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.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) {

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: 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 @@ installNovice(dialogMenuItem *self)
}
/* 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();
}

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.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);

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: 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) {

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.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) {

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: 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 @@ installNovice(dialogMenuItem *self)
}
/* 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();
}

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.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);

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: 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) {

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.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) {

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: 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 @@ installNovice(dialogMenuItem *self)
}
/* 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();
}

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.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);

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: 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) {