[Pkg-samba-maint] Bug#722465: qtsmbstatus-server: fails to install due to insserv rejecting the script header

Ivo De Decker ivo.dedecker at ugent.be
Sat Apr 19 14:10:10 UTC 2014


Control: reassign -1 qtsmbstatus-server 2.2.1-2

Hi Petter,

On Fri, Apr 18, 2014 at 08:15:03AM +0200, Petter Reinholdtsen wrote:
> I had a look at this bug report for qtsmbstatus-server, in the belief
> that the problem was easy to fix:
> 
> >  Setting up qtsmbstatus-server (2.2.1-2) ...
> >  insserv: Service samba has to be enabled to start service qtsmbstatusd
> >  insserv: exiting now!
> >  update-rc.d: error: insserv rejected the script header
> >  dpkg: error processing qtsmbstatus-server (--configure):
> >   subprocess installed post-installation script returned error exit status 1
> 
> But that proved to be wrong.  The qtsmbstatus-server package depend on
> the samba package, which include the samba init.d script with a
> 'Provides: samba' in place.  I also tested to install the
> qtsmbstatus-server package in sid and noticed the installation failure
> also happened there.  Looking closer, the problem is that the samba
> init.d script is not enabled by default:
> 
>   ### BEGIN INIT INFO
>   # Provides:          samba
>   # Required-Start:    smbd nmbd
>   # Required-Stop:     smbd nmbd
>   # Default-Start:     
>   # Default-Stop:      
>   # Short-Description: ensure Samba daemons are started (nmbd and smbd)
>   ### END INIT INFO
> 
> This causes update-rc.d to not add any start and stop symlinks during
> package installation, and thus qtsmbstatus-server is unable to find the
> required service during boot and package installation.
> 
> Is this a bug in samba?  In that case, I suggest changing the
> Default-Start and Default-Stop lines to list runlevels like this:
> 
>   # Default-Start:     2 3 4 5
>   # Default-Stop:      1

The samba init script only exists for backward compatibility. The services are
started by the snmd and nmbd init scripts (when running in 'old' mode), or by
the samba-ad-dc init script (when running in samba AD DC mode). Depending on
smbd isn't really a solution, because that will not have the right result when
running in samba AD DC mode (the smbd init script will exit successfully, but
won't do anything in that case). Depending on both smbd and samba-ad-dc might
be an option (this will ensure that the smbd functionality is available,
whatever the mode samba is running in).

> If not, I suggest to change qtsmbstatus-server like this, to make the
> samba init.d dependency optional:
> 
> diff --git a/debian/qtsmbstatus-server.qtsmbstatusd.init b/debian/qtsmbstatus-server.qtsmbstatusd.init
> index eff0e48..965fb16 100644
> --- a/debian/qtsmbstatus-server.qtsmbstatusd.init
> +++ b/debian/qtsmbstatus-server.qtsmbstatusd.init
> @@ -5,8 +5,9 @@
>  # For LSB
>  ### BEGIN INIT INFO
>  # Provides:          qtsmbstatusd
> -# Required-Start:    $remote_fs $syslog samba
> +# Required-Start:    $remote_fs $syslog
>  # Required-Stop:     $remote_fs $syslog
> +# Should-Start:      samba
>  # Default-Start:     2 3 4 5
>  # Default-Stop:      0 1 6
>  # Short-Description: start qtsmbstatusd server at boot time

This might also be an option.

> I am passing on the bug report to samba or their view.  Please send it
> back if samba is correct and should not start by default any more.

As it is intentional that the samba init script isn't started by default, I'm
sending it back.

Cheers,

Ivo



More information about the Pkg-samba-maint mailing list