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:
joe 2001-08-15 17:10:49 +00:00
parent a2783f32df
commit e6d799200d
2 changed files with 8 additions and 2 deletions

View File

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

View File

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