[Pkg-samba-maint] r3705 - in trunk/samba: . debian

Jelmer Vernooij jelmer at samba.org
Sat Mar 12 19:55:13 UTC 2011


Hi Steve,

On Sat, 2011-03-12 at 10:12 -0800, Steve Langasek wrote:
> On Sat, Mar 12, 2011 at 05:11:07PM +0000, jelmer at alioth.debian.org wrote:
> > debian/samba.if-up: Use invoke-rc.d.
> Why is this change needed?  invoke-rc.d is only a policy requirement for
> maintainer scripts, not for other integration scripts on the system; and,
It was inspired by a lintian warning, script-calls-init-script-directly:

"This script apparently runs an init script directly rather than using
invoke-rc.d. While use of invoke-rc.d is only required for maintainer
scripts, supporting the policy layer that it implements is a good idea
in any script."

> > Modified: trunk/samba/debian/samba.if-up
> > ===================================================================
> > --- trunk/samba/debian/samba.if-up	2011-03-12 17:10:53 UTC (rev 3704)
> > +++ trunk/samba/debian/samba.if-up	2011-03-12 17:11:05 UTC (rev 3705)
> > @@ -21,13 +21,13 @@
> >  		;;
> >  esac
> >  
> > -status=$(/etc/init.d/samba status)
> > +status=$(invoke-rc.d samba status)
> 
> >  # Really only necessary to do anything if nmbd is not already running
> >  if echo "$status" | grep -q 'smbd is running' \
> >     && ! echo "$status" | grep -q 'nmbd is running'
> >  then
> 
> since we're checking status anyway, there's no risk here of accidentally
> starting nmbd when we're not supposed to.  Whereas by calling 'invoke-rc.d
> samba status', we're proxying through an additional policy layer which could
> accidentally interfere with starting nmbd up when needed.  This is a case
> where we *don't* want to respect the invoke-rc.d policy layer, we want a
> simple rule here: "if smbd is running and nmbd isn't, try to start nmbd".
> 
> So I think this should be reverted.
Thanks for the explanation, I've reverted it. Why would we not want to
follow the invoke-rc.d policy in this case though?

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20110312/cee642fb/attachment.pgp>


More information about the Pkg-samba-maint mailing list