From owner-freebsd-bugs@FreeBSD.ORG Sun Nov 2 16:30:20 2003 Return-Path: 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 3D57016A4CE for ; Sun, 2 Nov 2003 16:30:20 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCE7B43FD7 for ; Sun, 2 Nov 2003 16:30:18 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hA30UIFY013735 for ; Sun, 2 Nov 2003 16:30:18 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hA30UIm2013731; Sun, 2 Nov 2003 16:30:18 -0800 (PST) (envelope-from gnats) Resent-Date: Sun, 2 Nov 2003 16:30:18 -0800 (PST) Resent-Message-Id: <200311030030.hA30UIm2013731@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anders Nordby Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5442716A4CE; Sun, 2 Nov 2003 16:21:31 -0800 (PST) Received: from totem.fix.no (totem.fix.no [80.91.36.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53F1B43FD7; Sun, 2 Nov 2003 16:21:30 -0800 (PST) (envelope-from anders@totem.fix.no) Received: from localhost (totem.fix.no [80.91.36.20]) by totem.fix.no (Postfix) with ESMTP id 2F57F9851C; Mon, 3 Nov 2003 01:21:38 +0100 (CET) Received: from totem.fix.no ([80.91.36.20]) by localhost (totem.fix.no [80.91.36.20]) (amavisd-new, port 10024) with LMTP id 28393-04-2; Mon, 3 Nov 2003 01:21:37 +0100 (CET) Received: by totem.fix.no (Postfix, from userid 1000) id 7AA6B98465; Mon, 3 Nov 2003 01:21:37 +0100 (CET) Message-Id: <20031103002137.7AA6B98465@totem.fix.no> Date: Mon, 3 Nov 2003 01:21:37 +0100 (CET) From: Anders Nordby To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: trhodes@FreeBSD.org cc: anders@FreeBSD.org cc: rwatson@FreeBSD.org cc: re@FreeBSD.org cc: alfred@FreeBSD.org cc: simon@FreeBSD.org Subject: bin/58850: Recent sysinstall changes wipes out rc.conf contents X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Anders Nordby List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 00:30:20 -0000 >Number: 58850 >Category: bin >Synopsis: Recent sysinstall changes wipes out rc.conf contents >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 02 16:30:18 PST 2003 >Closed-Date: >Last-Modified: >Originator: anders@FreeBSD.org >Release: FreeBSD 4.9-RELEASE >Organization: Fluxpod Information eXchange >Environment: FreeBSD neta 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003 root@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC i386 FreeBSD neta 5.1-RELEASE FreeBSD 5.1-RELEASE #0: Thu Jun 5 02:55:42 GMT 2003 root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: Recent changes to sysinstall/config.c empties rc.conf in automated installations. >How-To-Repeat: Set up a PXE automated install environment according to http://www.freebsd.org/doc/en_US.ISO8859-1/articles/pxe/. Create a custom package that adds data to /etc/rc.conf during installation using pkg-install. Watch how rc.conf is emptied on install clients after throdes' changes to config.c: root@neta:~# cat /etc/rc.conf # -- sysinstall generated deltas -- # Mon Nov 3 07:09:40 2003 # Created: Mon Nov 3 07:09:40 2003 # Enable network daemons for user convenience. # Please make all changes to this file, not to /etc/defaults/rc.conf. # This file now contains just the overrides from /etc/defaults/rc.conf. hostname="booter" ifconfig_fxp0="DHCP" root@neta:~# Proof of concept: make that custom package add data to a temporary rc.conf file instead, and of course, it is not emptied. >Fix: Re-do patch 1.156.2.34 -> 1.156.2.35 in src/release/sysinstall/config.c (RELENG_4) and 1.210 -> 1.211 in src/usr.sbin/sysinstall/config.c (HEAD). Work-around for your custom PXE post-installation fixup/rc.conf modification package: a) Create a temporary rc.conf script. b) Create a /usr/local/etc/rc.d script that adds the contents of your temporary rc.conf to the real one upon the next reboot, deletes itself and then does another reboot. >Release-Note: >Audit-Trail: >Unformatted: