[28772] in Source-Commits
lightdm-config commit: Make postinst install on systemd systems by ignoring errors
daemon@ATHENA.MIT.EDU (Lizhou Sha)
Sat May 6 23:37:48 2017
Date: Sat, 6 May 2017 23:37:40 -0400
From: Lizhou Sha <slz@mit.edu>
Message-Id: <201705070337.v473beFJ021871@drugstore.mit.edu>
To: source-commits@mit.edu
https://github.com/mit-athena/lightdm-config/commit/1c855afed44ee4b17fd54d2d3077838888641be6
commit 1c855afed44ee4b17fd54d2d3077838888641be6
Author: Lizhou Sha <slz@mit.edu>
Date: Sat May 6 23:23:53 2017 -0400
Make postinst install on systemd systems by ignoring errors
(Trac: #1554)
debian/changelog | 7 +++++++
debian/debathena-lightdm-config.postinst | 8 +++++++-
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d743d4c..3479ca6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debathena-lightdm-config (1.13.3) unstable; urgency=medium
+
+ * Fix the postinst to install on a systemd system by ignoring errors (Trac:
+ #1554)
+
+ -- Lizhou Sha <slz@mit.edu> Sat, 06 May 2017 23:21:39 -0400
+
debathena-lightdm-config (1.13.2) unstable; urgency=low
* Tweak the kiosk launching command to use the normal session startup
diff --git a/debian/debathena-lightdm-config.postinst b/debian/debathena-lightdm-config.postinst
index 2403932..e26b81b 100644
--- a/debian/debathena-lightdm-config.postinst
+++ b/debian/debathena-lightdm-config.postinst
@@ -39,8 +39,14 @@ case "$1" in
# Deal with the fact that symlinks don't work in /etc/init
# If we managed to confuse upstart such that we don't exist,
# force a reload:
- if ! status lightdm >/dev/null 2>&1; then
+ # Also check that initctl can connect to upstart system bus, or indeed, exist at all
+ if initctl version 2>/dev/null && ! status lightdm >/dev/null 2>&1; then
# I hope this doesn't break the world.
+ # Update: This does break the world on xenial, which uses upstart, but
+ # only in the user session, so initctl doesn't see it running in this
+ # script. Temporary hack in the if statement above to let the package
+ # install, with intent to deprecate once the last vestiges of upstart
+ # has been purged from our collective memory.
initctl reload-configuration
fi
if pgrep -u lightdm -f debathena-lightdm-greeter >/dev/null 2>&1; then