New rc scripts?

Gerard Beekmans gerard at
Fri Oct 20 14:25:33 PDT 2000

> To add further layers of confusion to the init scripts:


> 1) enable and disable options in the init.d scripts

You don't even have to do it with all the symlinks. Try this:

# Begin /etc/init.d/sshd

if [ -f /etc/sysconfig/disable-sshd ]
	exit 0

To disable sshd, /usr/bin/touch /etc/sysconfig/disable-sshd

To enable sshd, remove the file

Or use a more elegant way. Perhaps a /etc/sysconfig/daemons

# Begin /etc/sysconfig/daemons


# End

# Begin sshd

source /etc/sysconfig/daemons

if [ ! sshd ]
	exit 0

To enable it you can run a script that does in essence 
	cd /etc/sysconfig
	sed s/"sshd=0"/"sshd=1"/ aemons > daemons-new
	mv daemons-new daemons

I'm sure there are more elegant solutions, just grabbing two of the top of my 

But an enable/disable function would be nice. Let's give it some thought and 
see what other people come up with. A good old fashioned vote in a little 
while can determin what way will  be used

> 2) Who you gonna blame
> If I put a mistake in one of my scripts, I get a
> nice message recommending I e-mail lfs-discuss...
> How about putting something like this in
> /etc/init.d/rc, print_error_msg():
> grep "MAINTAINER:" $i

When in doubt, blame me. If there is somebody's specific code in a script 
it'll be mentioned in the header of the file (look at rc script) but I 
usually make modifications anyways so it's not always their original code, 
but based on theirs.

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-

Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list