From 63ff3eef328bd9aa34939b8dd205cdce482c3480 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 16 Mar 2012 03:20:43 +0100 Subject: [PATCH] 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 --- debian/changelog | 3 +++ debian/systemd-sysv.postinst | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 debian/systemd-sysv.postinst diff --git a/debian/changelog b/debian/changelog index ad306a34..9986a398 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ systemd (44-1) UNRELEASED; urgency=low [ 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 Thu, 08 Mar 2012 15:16:10 +0100 diff --git a/debian/systemd-sysv.postinst b/debian/systemd-sysv.postinst new file mode 100644 index 00000000..4930d618 --- /dev/null +++ b/debian/systemd-sysv.postinst @@ -0,0 +1,12 @@ +#!/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 -- 2.39.5