r6192 - in glibc-package/trunk/debian: . debhelper.in
Author: aurel32
Date: 2014-07-06 08:01:30 +0000 (Sun, 06 Jul 2014)
New Revision: 6192
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/debhelper.in/libc.postinst
Log:
debian/debhelper.in/libc.postinst: don't run "telinit u" under systemd
Closes: #753725.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2014-07-06 07:58:14 UTC (rev 6191)
+++ glibc-package/trunk/debian/changelog 2014-07-06 08:01:30 UTC (rev 6192)
@@ -7,6 +7,8 @@
* debian/patches/alpha/local-string-functions.diff: disable strcmp
and strncmp as these functions behaves incorrectly when crossing
pages. This fixes badsalttest in the testsuite.
+ * debian/debhelper.in/libc.postinst: don't run "telinit u" under systemd
+ Closes: #753725.
[ Helmut Grohne ]
* Rename the bootstrap stage to DEB_BUILD_PROFILES=stage1 to conform
Modified: glibc-package/trunk/debian/debhelper.in/libc.postinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.postinst 2014-07-06 07:58:14 UTC (rev 6191)
+++ glibc-package/trunk/debian/debhelper.in/libc.postinst 2014-07-06 08:01:30 UTC (rev 6192)
@@ -218,20 +218,23 @@
fi # end upgrading and $preversion lt 2.19
fi # Upgrading
- # Restart init. Currently handles chroots and upstart, and assumes
- # anything else is going to not fail at behaving like sysvinit:
+ # Restart init. Currently handles chroots, systemd and upstart, and
+ # assumes anything else is going to not fail at behaving like
+ # sysvinit:
TELINIT=yes
if ischroot 2>/dev/null; then
# Don't bother trying to re-exec init from a chroot:
TELINIT=no
- else
- if [ -x "`which initctl`" ]; then
- UPSTART=$(initctl version 2>/dev/null | awk '/upstart/ {print $3}' | tr -d ')')
- if dpkg --compare-versions "$UPSTART" lt-nl 1.6.1; then
- # This is an old upstart that can't re-exec statefully:
- TELINIT=no
- touch /var/run/init.upgraded
- fi
+ elif [ -d /run/systemd/system ]; then
+ # Skip if systemd is the active PID 1, since systemd doesn't
+ # need a reexec for a clean shutdown
+ TELINIT=no
+ elif [ -x "`which initctl`" ]; then
+ UPSTART=$(initctl version 2>/dev/null | awk '/upstart/ {print $3}' | tr -d ')')
+ if dpkg --compare-versions "$UPSTART" lt-nl 1.6.1; then
+ # This is an old upstart that can't re-exec statefully:
+ TELINIT=no
+ touch /var/run/init.upgraded
fi
fi
if [ "$TELINIT" = "yes" ]; then
Reply to: