On Thursday 20 September 2001 04:26, Guillaume Cottenceau wrote:
> John Silva <[EMAIL PROTECTED]> writes:
>
>
> [...]
>
> > Unfortunately, the following snippet of code from /etc/rc.d/rc doesn't do
> > what you want:
> >
> > # Check if the subsystem is already up.
> > subsys=${i#/etc/rc$runlevel.d/S??}
> > [ -f /var/lock/subsys/$subsys ] || \
> > [ -f /var/lock/subsys/${subsys}.init ] && continue
> >
> > I assume the intent was to test existence of the lockfile and not execute
> > the initscript if the lockfile is present.
> >
> > Unfortunately, what it tests for is that /var/lock/subsys/$subsys does
> > _not_ exist and ${subsys}.init _does_ exist.
>
> As I read the code, it tests if subsys exists or subsys.init exists, and
> skip the launch if so.
That does seem to be true - simple test cases bear this out.
It also seems that on my system the behavior I observed is no longer
reproducable.
Given what the code in rc actually does I have difficulty in understanding
why smb was restarted on runlevel changes despite the subsys lockfile. The
obvious solution was the smb patch, and that did correct the problem at the
time.
This suggests that for some reason the rc script shut down smb unnecessarily
and the smb script permitted it. The obvious answer is that the test in the
kill section failed to execute the continue for some reason.
Chalk it up to a gremlin, I guess.
-J.
--
John P. Silva [EMAIL PROTECTED]