systemd/debian/systemd-sysv.postinst
Michael Biebl 10952c547d Update the checks which test if systemd is the active init.
The recommended check is [ -d /run/systemd/system ] as this will also
work with a standalone systemd-logind.
2013-06-20 01:17:00 +02:00

17 lines
489 B
Bash

#!/bin/sh
set -e
# 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 [ ! -d /run/systemd/system ] ; then
if [ ! -p /dev/initctl ] && [ -p /run/initctl ] ; then
ln -sf /run/initctl /dev/initctl
fi
fi
#DEBHELPER#