On Fri, Jun 03, 2005 at 07:26:28AM +0200, Christian Perrier wrote:
> Quoting Cesar Martinez Izquierdo ([EMAIL PROTECTED]):
> > Package: samba
> > Version: 3.0.14a-4
> > Severity: important
> > Tags: patch

> > The samba's logrotate file /etc/logrotate.d/samba
> > containsa a line like:

> >     postrotate
> >             invoke-rc.d --quiet samba reload > /dev/null

> > This starts samba even if previously stopped/disabled (for instance, by
> > removing rc2.d link). I would suggest to test for the smbd.pid 
> > pidfile, as follows:

> >From invoke-rc.d man page:

>       invoke-rc.d  itself  will  only  pay attention to the current
>        runlevel, and block any tries to start an init  script  in  a
>        runlevel  it is not configured to be started at.  Other poli‐
>        cies are implemented with the use of the policy-rc.d  helper,
>        and  are only available if /usr/sbin/policy-rc.d is installed
>        in the system.

> So, theoretically, as long as a given script is setup to NOT start in
> a given runlevel, invoke-rc.d will NOT start it.

> However, I don't really know how this works exactly as the invoke-rc.d
> man page is a bit obscure to me.

> Steve, Eloy, do you have more clues than me on that issue?

I'm not sure how this is a bug at all.  "invoke-rc.d samba reload" will call
/etc/init.d/samba reload:

        reload)
                echo -n "Reloading /etc/samba/smb.conf (smbd only)"
                start-stop-daemon --stop --signal HUP --pidfile $SMBDPID

                echo "."
                ;;

Running this on a system that doesn't have an active smbd gives me:

$ /usr/sbin/invoke-rc.d samba reload
Reloading /etc/samba/smb.conf (smbd only)No process in pidfile
/var/run/samba/smbd.pid' found running; none killed.
.
$

So I really don't think the proposed change is necessary.

-- 
Steve Langasek
postmodern programmer

Attachment: signature.asc
Description: Digital signature

Reply via email to