in case we are upgrading from a system running a newer version of sysvinit
(using /run/initctl) and sysvinit is replaced with systemd-sysv during the
upgrade. Closes: #663219
[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
+ * Create compat /dev/initctl symlink in case we are upgrading from a system
+ running a newer version of sysvinit (using /run/initctl) and sysvinit is
+ replaced with systemd-sysv during the upgrade. Closes: #663219
-- Tollef Fog Heen <tfheen@debian.org> Thu, 08 Mar 2012 15:16:10 +0100
--- /dev/null
+#!/bin/sh
+
+# We are installing systemd-sysv but systemd is not running.
+# This most likely means we are upgrading from another init, possibly a newer
+# sysvinit version which created the initctl socket at /run/initctl.
+# systemd's sysv tools expect the socket at /dev/initctl, so create the compat
+# symlink ourselves.
+if [ ! -e /sys/fs/cgroup/systemd ] ; then
+ if [ ! -p /dev/initctl ] && [ -p /run/initctl ] ; then
+ ln -sf /run/initctl /dev/initctl
+ fi
+fi