From owner-freebsd-bugs Fri Aug 23 9:50: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFB8737B400 for ; Fri, 23 Aug 2002 09:50:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DD4843E77 for ; Fri, 23 Aug 2002 09:50:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7NGo4JU093448 for ; Fri, 23 Aug 2002 09:50:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7NGo4tB093447; Fri, 23 Aug 2002 09:50:04 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DAF337B400 for ; Fri, 23 Aug 2002 09:48:37 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 506E243E65 for ; Fri, 23 Aug 2002 09:48:37 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g7NGmaOT028755 for ; Fri, 23 Aug 2002 09:48:36 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g7NGmaxG028754; Fri, 23 Aug 2002 09:48:36 -0700 (PDT) Message-Id: <200208231648.g7NGmaxG028754@www.freebsd.org> Date: Fri, 23 Aug 2002 09:48:36 -0700 (PDT) From: Hal Burch To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/41949: sysinstall sorts /etc/rc.conf during netboot Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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