From a98d8c790a08bf3b963dfd8e99fd3db94661cbe0 Mon Sep 17 00:00:00 2001 From: "Simon L. B. Nielsen" Date: Tue, 16 Nov 2004 21:59:00 +0000 Subject: [PATCH] Only write the rc.conf header when a new rc.conf is written. This was accidentally removed in v. 1.211. Submitted by: Olafur Osvaldsson PR: bin/73692 MFC after: 1 week Approved by: trhodes --- usr.sbin/sade/config.c | 2 +- usr.sbin/sysinstall/config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index cfb705ac87c1..b7eee11bfbfa 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -428,7 +428,7 @@ configRC_conf(void) fprintf(rcSite, "#REMOVED: %s", line); } fclose(rcOld); - } else { + } else if (write_header) { fprintf(rcSite, "# This file now contains just the overrides from /etc/defaults/rc.conf.\n"); fprintf(rcSite, "# Please make all changes to this file, not to /etc/defaults/rc.conf.\n\n"); fprintf(rcSite, "# Enable network daemons for user convenience.\n"); diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index cfb705ac87c1..b7eee11bfbfa 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -428,7 +428,7 @@ configRC_conf(void) fprintf(rcSite, "#REMOVED: %s", line); } fclose(rcOld); - } else { + } else if (write_header) { fprintf(rcSite, "# This file now contains just the overrides from /etc/defaults/rc.conf.\n"); fprintf(rcSite, "# Please make all changes to this file, not to /etc/defaults/rc.conf.\n\n"); fprintf(rcSite, "# Enable network daemons for user convenience.\n");