1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-30 16:51:41 +00:00

Sysinstall inserts a comment between changes to /etc/rc.conf.

Add a timestamp to the comment so that it's possible to see when
changes were made.

e.g.:
# -- sysinstall generated deltas -- # Wed Aug 15 18:10:20 2001
This commit is contained in:
Josef Karthauser 2001-08-15 17:10:49 +00:00
parent 99fe508b9d
commit 67923e665b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81709
2 changed files with 8 additions and 2 deletions

View File

@ -382,6 +382,7 @@ configRC_conf(void)
time_t t_loc; time_t t_loc;
char *cp; char *cp;
static int did_marker = 0; static int did_marker = 0;
time_t tp;
configTtys(); configTtys();
write_header = !file_readable("/etc/rc.conf"); write_header = !file_readable("/etc/rc.conf");
@ -400,7 +401,9 @@ configRC_conf(void)
for (v = VarHead; v; v = v->next) { for (v = VarHead; v; v = v->next) {
if (v->dirty) { if (v->dirty) {
if (!did_marker) { if (!did_marker) {
fprintf(rcSite, "# -- sysinstall generated deltas -- #\n"); time(&tp);
fprintf(rcSite, "# -- sysinstall generated deltas -- # "
"%s", ctime(&tp));
did_marker = 1; did_marker = 1;
} }
fprintf(rcSite, "%s=\"%s\"\n", v->name, v->value); fprintf(rcSite, "%s=\"%s\"\n", v->name, v->value);

View File

@ -382,6 +382,7 @@ configRC_conf(void)
time_t t_loc; time_t t_loc;
char *cp; char *cp;
static int did_marker = 0; static int did_marker = 0;
time_t tp;
configTtys(); configTtys();
write_header = !file_readable("/etc/rc.conf"); write_header = !file_readable("/etc/rc.conf");
@ -400,7 +401,9 @@ configRC_conf(void)
for (v = VarHead; v; v = v->next) { for (v = VarHead; v; v = v->next) {
if (v->dirty) { if (v->dirty) {
if (!did_marker) { if (!did_marker) {
fprintf(rcSite, "# -- sysinstall generated deltas -- #\n"); time(&tp);
fprintf(rcSite, "# -- sysinstall generated deltas -- # "
"%s", ctime(&tp));
did_marker = 1; did_marker = 1;
} }
fprintf(rcSite, "%s=\"%s\"\n", v->name, v->value); fprintf(rcSite, "%s=\"%s\"\n", v->name, v->value);