Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Sep 1997 13:50:15 -0700 (PDT)
From:      wefa@unicom.talkline.de
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   conf/4455: /stand/sysinstall swamps rc.conf with doubled comments
Message-ID:  <199709022050.NAA26934@hub.freebsd.org>
Resent-Message-ID: <199709022100.OAA27255@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         4455
>Category:       conf
>Synopsis:       /stand/sysinstall swamps rc.conf with doubled comments
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep  2 14:00:01 PDT 1997
>Last-Modified:
>Originator:     Christoph Weber-Fahr
>Organization:
O.tekl.o Communications
>Release:        2.2.2
>Environment:
FreeBSD helena.unicom.de 2.2.2-RELEASE FreeBSD 2.2.2-RELEASE #0: Tue Sep  2 15:4
7:32 MET DST 1997     wefa@helena.unicom.de:/usr/src/sys/compile/HELENA  i386
>Description:
When using /stand/sysinstall for adminitrative tasks it often
duplicates the comments that are appended behind data lines
in rc.conf.
Because of the doubling rc.conf tends to grow exponentially
rc.conf remains syntactically intact, however.
>How-To-Repeat:
use /stand/sysinstall, change something - say, the time zone - and
then examine rc.conf
>Fix:
I have an awk script repairing the damage :-)... More seriously, the
problem is in /usr/src/release/sysinstall/config.h:configEnvironmentRC_conf().
Here you don't check for trailing comments but store them with the variable value.
The fix depends on the rc.conf syntax: if you don't allow # within
variable values, you can simply chop the line at the first # before
further processing. Else you have do slightly more complex checks.
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709022050.NAA26934>