Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2002 09:48:36 -0700 (PDT)
From:      Hal Burch <hburch@lumeta.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/41949: sysinstall sorts /etc/rc.conf during netboot
Message-ID:  <200208231648.g7NGmaxG028754@www.freebsd.org>

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

>Number:         41949
>Category:       misc
>Synopsis:       sysinstall sorts /etc/rc.conf during netboot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 23 09:50:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Hal Burch
>Release:        4.5-RELEASE-p19
>Organization:
Lumeta Corporation
>Environment:
FreeBSD devscan2.prod.lumeta.com 4.5-RELEASE-p19 FreeBSD 4.5-RELEASE-p19 #0: Mon Aug 19 14:03:25 EDT 2002     root@devscan2.prod.lumeta.com:/usr/src/sys/compile/LDS2_2  i386

>Description:
Sysinstall sorts /etc/rc.conf after a netboot.  If packages append to the rc.conf, this can cause bad behavior (especially multiline ifs, for example).

This sort seems fraught with danger, including putting a "inetd_enable=YES" after a package-added "inetd_enable=NO" (or vice-versa, depending on what you think the behavior "should be").

There are many hacks around it, but I do not like anf of the ones I've heard.  You could also use rc.conf.local, which sysinstall does not appear to mess with, but I would prefer to save that for truly "local" configurations to the machine, not things we plan to do on all of our systems.

Amusingly, it reorders the comments that sysinstall itself adds to the file.
>How-To-Repeat:
Create a package that appends multiline ifs to /etc/rc.conf and install a FreeBSD system including it via netboot.
>Fix:
Delete lines 416-419 of /usr/src/release/sysinstall/config.c that do the sorting.
However, this was probably deliberately added for a reason, so does not really address whatever that reason was.
It does, however, make tracking changes easier, especially if the "sysinstall generated deltas" was timestamped.

Another option is to add "rc.conf.sysinstall" to rc_conf_files in /etc/defaults/rc.conf, listed first, and change where sysinstall does its changes, but then there's another file to worry about and check.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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