Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 1996 15:36:42 -0600 (MDT)
From:      Nate Williams <nate@mt.sri.com>
To:        Terry Lambert <terry@lambert.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Opinions? NT VS UNIX, NT SUCKS SOMETIMES
Message-ID:  <199608162136.PAA08388@rocky.mt.sri.com>
In-Reply-To: <199608162004.NAA03242@phaeton.artisoft.com>
References:  <m0urJR3-00036xC@viking.ucsalf.ac.uk> <199608162004.NAA03242@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> In BSD, I can add service A by appending to /etc/rc.local during
> install.

That's one way of doing it, but not the only way.

> I can then add service B by doing the same thing.

> Now I want to deinstall service A... I am screwed because:
> 
> 1)	I can't stop the service by name unless it's exactly one
> 	process, or I do a whole lot of work that has to be
> 	duplicated over and over for each package because the
> 	support infrastructure is non-existent.

The current setup doesn't allow for 'stopping' of services.

> 2)	I can't automatically hack the file, because I may not
> 	have tagged the file in such a way that it's editable, and
> 	since we allow users to hack the file as well as allowing
> 	install scripts to hack the file, we can never be sure that
> 	we would be removing the right thing anyway.

The 'other' solution works in this case.

> 3)	I can't automatically start the service in the same way that
> 	I would start the service on system initialization without
> 	a reboot, because the start "script" is now homogenized into
> 	the rc.local and forever unuasable on a per item basis.

The 'other' solution works in this case.

>From -current's /etc/sysconfig:

# Location of local startup directories.
local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"

>From -current's /etc/rc:

# for each valid dir in $local_startup, search for init scripts matching *.sh
if [ "X${local_startup}" != X"NO" ]; then
        for dir in ${local_startup}; do
                [ -d ${dir} ] && for script in ${dir}/*.sh; do
                        [ -x ${script} ] && ${script} start
                done
        done
fi

This is *very* much like SysV's init, except that it leaves the system
(ie; standard/normal configuration) localized, and non-standard (custom)
stuff off somewhere else.  This si a 'Good Thing' IMHO.

init(8) still needs to be modified to have it run a signle 'shutdown'
script which would do the same thing as above, but it wouldn't be that
hard to do.

The SysV of 'multiple run-levels' is something I've yet to see used.
Even the most hard-core SysV gurus use the two available in BSD,
single-user and multi-user.


Nate




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