Bug#825913: systemd init script integration: needs manual systemctl daemon-reload after installing initscript

Chris Wilson chris+debianbug at qwirx.com
Tue May 31 11:16:42 BST 2016


Package: systemd
Version: 230-1
Severity: normal

Dear Maintainer,

I installed Nagios from source, including an init.d script, but this script
mysteriously failed to start Nagios.

When installing packages from source, it is normal to install an initscript in
/etc/init.d.  These scripts no longer work in Debian >= Jessie because
/lib/lsb/init-functions.d/40-systemd intercepts their execution and tries to
make systemd start the service, but systemd-sysv-generator has not been invoked
to generate a service file for it yet, so systemd cannot be used yet.

The failure of traditional initscripts defies expectations of backwards
compatibility by invoking magic (in 40-systemd) which does not work in this
case.

Workarounds are to manually execute "systemctl daemon-reload" (which runs
systemd-sysv-generator in a special way) or reboot the system, which generates
these service files, but it's not clear from the error that either is
necessary, since it just says:

    [....] Starting nagios (via systemctl): nagios.serviceFailed to start
    nagios.service: Unit nagios.service failed to load: No such file or directory.
    failed!

Jessie's 40-systemd script automatically invokes "systemctl daemon-reload" but
only when run from a dpkg install. Even this backwards-compatibility measure
seems to have been removed in unstable.

Please consider invoking "systemctl -p LoadState show $service" from 40-systemd,
and if it says "not-found" then run "systemctl daemon-reload" to generate a
service file for it.

-- Package-specific info:

-- System Information:
Debian Release: 8.4
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Foreign Architectures: amd64

Kernel: Linux 4.4.0-22-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  adduser         3.113+nmu3
ii  libacl1         2.2.52-2
ii  libapparmor1    2.10-4
ii  libaudit1       1:2.4-1+b1
ii  libblkid1       2.25.2-6
ii  libc6           2.19-18+deb8u4
ii  libcap2         1:2.24-8
ii  libcap2-bin     1:2.24-8
ii  libcryptsetup4  2:1.6.6-5
ii  libgcc1         1:4.9.2-10
ii  libgcrypt20     1.7.0-2
ii  libgpg-error0   1.17-3
ii  libkmod2        18-3
ii  liblzma5        5.1.1alpha+20120614-2+b3
ii  libmount1       2.28-5
ii  libpam0g        1.1.8-3.1+deb8u1+b1
ii  libseccomp2     2.3.1-2
ii  libselinux1     2.3-2
ii  libsystemd0     230-1
ii  mount           2.28-5
ii  util-linux      2.28-5

Versions of packages systemd recommends:
pn  dbus            <none>
pn  libpam-systemd  <none>

Versions of packages systemd suggests:
pn  systemd-container  <none>
pn  systemd-ui         <none>

Versions of packages systemd is related to:
ii  udev  230-1

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemd-delta.txt
Type: text/x-diff
Size: 2941 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20160531/157dcab6/attachment.diff>
-------------- next part --------------
Failed to create bus connection: No such file or directory
-------------- next part --------------
==> /var/lib/systemd/deb-systemd-helper-enabled/networking.service.dsh-also <==
/etc/systemd/system/multi-user.target.wants/networking.service
/etc/systemd/system/network-online.target.wants/networking.service

==> /var/lib/systemd/deb-systemd-helper-enabled/network-online.target.wants/networking.service <==

==> /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/open-vm-tools.service <==

==> /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/networking.service <==

==> /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/cron.service <==

==> /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/ssh.service <==

==> /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/rsyslog.service <==

==> /var/lib/systemd/deb-systemd-helper-enabled/open-vm-tools.service.dsh-also <==
/etc/systemd/system/multi-user.target.wants/open-vm-tools.service

==> /var/lib/systemd/deb-systemd-helper-enabled/cron.service.dsh-also <==
/etc/systemd/system/multi-user.target.wants/cron.service

==> /var/lib/systemd/deb-systemd-helper-enabled/ssh.socket.dsh-also <==
/etc/systemd/system/sockets.target.wants/ssh.socket

==> /var/lib/systemd/deb-systemd-helper-enabled/ssh.service.dsh-also <==
/etc/systemd/system/multi-user.target.wants/ssh.service
/etc/systemd/system/sshd.service

==> /var/lib/systemd/deb-systemd-helper-enabled/sshd.service <==

==> /var/lib/systemd/deb-systemd-helper-enabled/rsyslog.service.dsh-also <==
/etc/systemd/system/multi-user.target.wants/rsyslog.service
/etc/systemd/system/syslog.service

==> /var/lib/systemd/deb-systemd-helper-enabled/syslog.service <==
-------------- next part --------------
# UNCONFIGURED FSTAB FOR BASE SYSTEM


More information about the Pkg-systemd-maintainers mailing list