libnss-ldap default runlevels cause invoke-rc.d to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libnss-ldap (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
During postinst invoke-rc.d libnss-ldap start is run.
libnss-ldap comes without any Default-Start levels
On line 390 of invoke-rc.d:
### LOCAL INITSCRIPT POLICY: Enforce need of a start entry
### in either runlevel S or current runlevel to allow start
### or restart.
###
case ${ACTION} in
start|restart)
if testexec ${SLINK} ; then
RC=104
elif testexec ${KLINK} ; then
RC=101
elif testexec ${SSLINK} ; then
RC=104
else
RC=101
fi
;;
esac
Therefore, the (now generated) systemd service is not started.
This causes it to not execute its "Stop" action during shutdown, causing the system to fail booting because nssldap-
Possible remedies:
--- libnss-ldap.orig 2016-10-06 15:42:27.991990056 +0200
+++ libnss-ldap 2016-10-06 15:45:48.921305843 +0200
@@ -6,4 +6,4 @@
# Required-Stop: mountall.sh
-# Default-Start:
-# Default-Stop: 0 1 6
+# Default-Start: 1 2 5
+# Default-Stop: 0 6
# Short-Description: Updates /etc/ldap.conf
The "5" is essential as noted above in update-rc.d.
Runlevels 1, 2 and 5 are translated to rescue, multiuser and graphical.target
By enabling this patch and then running:
update-rc.d libnss-ldap remove
update-rc.d libnss-ldap defaults
invoke-rc.d libnss-ldap start
The systemd service is now started:
dec 22 21:55:26 ubuntu systemd[1]: Starting LSB: Updates /etc/ldap.conf...
dec 22 21:55:26 ubuntu systemd[1]: Started LSB: Updates /etc/ldap.conf.
Whereas before nothing would happen.
Alternatively a systemd service could be added, along the lines of:
[Unit]
Description=Ensure LDAP does not prevent the system from booting
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStop=
[Install]
WantedBy=
-------
Description: Ubuntu 16.04.3 LTS
Release: 16.04
-------
libnss-ldap:
Installed: 265-3ubuntu2
Candidate: 265-3ubuntu2
Version table:
*** 265-3ubuntu2 500
500 http://
100 /var/lib/
-------
Related to: https:/
The attachment "libnssldap_ runlevel5. diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]