Bug#898388: systemd-sysv: shutdown command always fails

Michael Biebl biebl at debian.org
Fri May 11 09:04:44 BST 2018


Am 11.05.2018 um 08:10 schrieb Meeuwissen Olaf:
> Hi,
> 
> Thanks for the quick follow-up.
> 
> Michael Biebl writes:
> 
>> Control: tags -1 + moreinfo
>>
>>> I have set up unattended-upgrades to reboot my machine at 04:00 when
>>> necessary.  Internally, unattended-upgrades runs
>>>
>>>   /sbin/shutdown -r 04:00
>>>
>>> trying to achieve this.  This fails as evidenced by these (dated) log
>>> messages
>>>
>>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Found /var/run/reboot-required, rebooting
>>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Failed to connect to bus: No such file or directory
>>
>> What's the output of
>> systemctl status dbus.socket dbus.service systemd-logind.service
> 
>   $ sudo systemctl status dbus.socket dbus.service systemd-logind.service
>   Unit dbus.socket could not be found.
>   Unit dbus.service could not be found.
>   * systemd-logind.service - Login Service
>      Loaded: loaded (/lib/systemd/system/systemd-logind.service; static; vendor preset: enabled)
>      Active: inactive (dead)
>   Condition: start condition failed at Fri 2018-05-11 04:00:25 JST; 10h ago
>              `- ConditionPathExists=/lib/systemd/system/dbus.service was not met
>        Docs: man:systemd-logind.service(8)
>              man:logind.conf(5)
>              http://www.freedesktop.org/wiki/Software/systemd/logind
>              http://www.freedesktop.org/wiki/Software/systemd/multiseat
> 
> Yes, I don't have dbus installed.  Nothing I have installed has a
> dependency on it that is Depends: or more important.  I don't install
> Recommends: and actively remove them unless other installed packages
> declare a (Pre-)Depends:
> 
> Based on my understanding of the relevant section[1] in the Debian
> Policy, I would argue that systemd-sysv needs a Depends: dbus.
> 
>  [1]: https://www.debian.org/doc/debian-policy/#binary-dependencies-depends-recommends-suggests-enhances-pre-depends
> 
> The Recommends: that systemd declares looks fine as I have not observed
> any other breakage.
> 
> FTR, after I install dbus, I get
> 
>   $ sudo shutdown -r 04:00
>   Shutdown scheduled for Sat 2018-05-12 04:00:00 JST, use 'shutdown -c' to cancel.
> 

Scheduled shutdowns require systemd-logind, which in turn requires dbus.
The basic functionality of systemd does not strictly require dbus
though. This pretty much fits the bill for recommends and we want to
allow (at least for the time being), to not have dbus installed, even if
this means, that certain functionality in systemd is then not available.
This is a choice the admin has to make.

If you choose to not install dbus, then you can't use logind (and as
such scheduled shutdowns).

So everything is behaving as expected.


Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20180511/97274184/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list