Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Aug 2005 10:33:52 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-hackers@freebsd.org
Cc:        Alexander Botero-Lowry <alex@complete-systems.net>
Subject:   Re: some rc.d cleanup
Message-ID:  <200508121033.53671.jhb@FreeBSD.org>
In-Reply-To: <20050811191814.GA4678@atlantis.foxybanana.com>
References:  <20050811191814.GA4678@atlantis.foxybanana.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 11 August 2005 03:18 pm, Alexander Botero-Lowry wrote:
> I've bene working on making src/sbin/chkconfig from NetBSD a more complete
> clone of chkconfig from IRIX as well as making it work on FreeBSD. In this
> task I have run into some nasty bugs in the implementation of some rc.d
> scripts in FreeBSD. Some of these bugs are minor, some are not. cleanvar
> and cleartmp are the worst culprits. These scripts if executed with the
> argument rcvar (which should only return the configuration value for the
> script) execute rm on a bunch of files. This action should only happen when
> the switch start is passed. abi also writes text outside of its start
> functions, which can be messy. I have a patch for cleartmp (breaking the
> x11 part of it out into a seperate file that is run by default) and a half
> patch for abi at: http://alex.complete-systems.net/freebsd-rc.d.patch
>
> /etc/rc.d/power_profile is also an issue. It's not a real rc.d script and
> therefore should not be in /etc/rc.d.

I'm guessing this part is extra:

+ if checkyesno ${rcvar}; then
+        echo "sysv"
+ else
+        echo "you suck"
+ fi

in the abi script? :)

Also, why not just move the extra rm commands in cleartmp up into the 
cleartmp_start() function instead of creating a whole separate script?  I 
also don't understand why it matters that one use start_precmd instead of 
using echo in the foo_start() functions.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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