| Summary: | rc files creation problem | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Jesús Arnáiz <jesus> |
| Component: | conf | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Peter Pentchev
2001-09-12 12:19:51 UTC
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"". Fix: I think you should do something like.... cat $RCFILE | grep -v "$LINETOADD" > tmp mv tmp $RCFILE echo "$LINETOADD" >> $RCFILE Regards! How-To-Repeat: Using /stand/sysinstall and Enabling and Disabling a Service (and other rc configuration). On Wed, Sep 12, 2001 at 02:05:22PM +0200, Jesus Arnaiz wrote:
> Ok, I understand.
>
> The problem is the system reads all the configuration files when it boots,
> and if rc.files grows your system boots delay a little. But as you say is
> not a really problem.
Well, let's see. On a 4.4-RC system, cvsup'd and rebuilt today..
[root@ringworld:v2 /etc]# wc -l rc*
724 rc
217 rc.atm
81 rc.conf
4 rc.conf.local
39 rc.devfs
133 rc.diskless1
82 rc.diskless2
293 rc.firewall
276 rc.firewall6
68 rc.i386
96 rc.isdn
794 rc.network
496 rc.network6
56 rc.pccard
46 rc.resume
153 rc.serial
96 rc.shutdown
50 rc.suspend
203 rc.syscons
45 rc.sysctl
3952 total
[root@ringworld:v2 /etc]#
My rc.conf and rc.conf.local come up to just about 2.5% of the system
rc scripts :) The five-to-ten lines added by sysinstall (and sometimes
those are even fewer than five) would only add 0.2% "overhead"; things
do not seem all that bad, IMHO.. :)
G'luck,
Peter
--
This sentence is false.
Ok, I understand. The problem is the system reads all the configuration files when it boots, and if rc.files grows your system boots delay a little. But as you say is not a really problem. Regards. -- Jesus Arnaiz. > -----Mensaje original----- > De: Peter Pentchev [mailto:roam@ringlet.net] > Enviado el: miercoles, 12 de septiembre de 2001 13:20 > Para: Jesús Arnáiz > CC: freebsd-gnats-submit@FreeBSD.org > Asunto: Re: conf/30520: rc files creation problem > > > On Wed, Sep 12, 2001 at 04:26:12AM -0700, Jesús Arnáiz wrote: > > > > >Number: 30520 > > >Category: conf > > >Synopsis: rc files creation problem > > >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. > [snip] > > > > As you can see I have two "sendmail_enable="NO"". > > I do not really think this should be considered a problem. > The way sysinstall works allows you to view the whole history of > its editing the rc.conf file, and lets you very easily restore > old configurations (esp. program flags, where every single letter > matters ;) > > Yes, this adds to the size of the rc.conf file, but the history kept > is much helpful sometimes.. > > G'luck, > Peter > > -- > I've heard that this sentence is a rumor. > State Changed From-To: open->feedback Discussion in the audit trail implies that this isn't really a problem. Is it OK to close this PR? For the audit trail: If memory serves me right, jesus@0z0ne.com wrote: > > Yes, I would like to have two different "rc" files, a history which let's > you know what configuration you have had in the past (even better if it > includess dates), and the one you are usign without repeated lines. But as > it have been said in this thread it is not a real problem. State Changed From-To: feedback->closed Submitter agrees this isn't really a problem. |