Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2001 04:26:12 -0700 (PDT)
From:      Jesús Arnáiz <jesus@0z0ne.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   conf/30520: rc files creation problem
Message-ID:  <200109121126.f8CBQC685339@freefall.freebsd.org>

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


>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




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