From owner-freebsd-bugs Wed Sep 12 4:30:12 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9A5D137B40E for ; Wed, 12 Sep 2001 04:30:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8CBU0985883; Wed, 12 Sep 2001 04:30:00 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3948B37B405 for ; Wed, 12 Sep 2001 04:26:12 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8CBQC685339; Wed, 12 Sep 2001 04:26:12 -0700 (PDT) (envelope-from nobody) Message-Id: <200109121126.f8CBQC685339@freefall.freebsd.org> Date: Wed, 12 Sep 2001 04:26:12 -0700 (PDT) From: Jesús Arnáiz To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: conf/30520: rc files creation problem 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: 30520 >Category: conf >Synopsis: rc files creation problem >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 12 04:30:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jesús Arnáiz >Release: 4.0, 4.2 and 4.4 tested >Organization: >Environment: FreeBSD 0z0ne.com 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Tue Dec 26 13:16:58 CET 2000 >Description: When you use /stand/sysinstall to add or remove a daemon from the boot of the system (and may be configuring other rc files also) it adds new lines without deleting the previous one. An example: --rc.conf----- # -- sysinstall generated deltas -- # # Created: Tue Sep 4 20:28:36 2001 # 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. kern_securelevel_enable="NO" keymap="spanish.iso.acc" nfs_reserved_port_only="YES" sendmail_enable="YES" sshd_enable="YES" usbd_enable="YES" # -- sysinstall generated deltas -- # ifconfig_xl0="inet 172.27.100.51 netmask 255.255.252.0" defaultrouter="172.27.100.1" tcp_extensions="YES" hostname="mordor.ofi.adm" # -- sysinstall generated deltas -- # inetd_enable="NO" # -- sysinstall generated deltas -- # sendmail_enable="NO" --- As you can see I have two "sendmail_enable="NO"". >How-To-Repeat: Using /stand/sysinstall and Enabling and Disabling a Service (and other rc configuration). >Fix: I think you should do something like.... cat $RCFILE | grep -v "$LINETOADD" > tmp mv tmp $RCFILE echo "$LINETOADD" >> $RCFILE Regards! >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message