systemd-logind upstart script breaks if libpam-systemd is installed for more than one arch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Martin Pitt |
Bug Description
/etc/init/
# only start if PAM module is actually available, not if libpam-systemd is
# removed but not purged
[ -e /lib/*/
Which is a wrongly written script. It assumes that there is at most one file matching the wildcard. It is not true in my system.
If your system have both libpam-
# ls /lib/*/
/lib/i386-
and you get the following:
# cat /var/log/
/proc/self/fd/9: 4: [: /lib/i386-
systemd-logind stop/pre-start, process 2462
systemd-logind does not start at all. This causes many bad things to happen later.
There are many ways to fix this. For my purposes I removed the faulty line from the file. I don't know what is the expected behaviour. Maybe this one:
ls /lib/*/
This bug might be the root cause of other bugs. Like this one: #1372187 (and #1377727)
SRU TEST CASE
=============
- On an amd64 system, run "sudo apt-get install libpam-
- Then run "sudo restart systemd-logind"
- On current trusty this will result in stop/waiting, with the error in /var/log/
- With this fix this will result in start/running and no error.
My system info:
# lsb_release -rd
Description: Ubuntu 14.04.1 LTS
Release: 14.04
# apt-cache policy libpam-systemd
libpam-systemd:
Installed: 204-5ubuntu20.7
Candidate: 204-5ubuntu20.7
Argh, many thanks for pointing this out! What an obvious and silly error.
This does not affect 14.10 as the upstart job for logind is gone entirely in favor of D-BUS activation. But this must be fixed for 14.04.