|
|
@ -142,8 +142,9 @@ case "$1" in
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
# Upstart is not active?
|
|
|
|
# Upstart is not active?
|
|
|
|
|
|
|
|
UPSTART_DIVERT=`dpkg-divert --listpackage /sbin/initctl`
|
|
|
|
UPSTART_ACTIVE=`dbus-send --system --print-reply --dest=com.ubuntu.Upstart /com/ubuntu/Upstart org.freedesktop.DBus.Properties.Get string:com.ubuntu.Upstart0_6 string:version 2>/dev/null || true`
|
|
|
|
UPSTART_ACTIVE=`dbus-send --system --print-reply --dest=com.ubuntu.Upstart /com/ubuntu/Upstart org.freedesktop.DBus.Properties.Get string:com.ubuntu.Upstart0_6 string:version 2>/dev/null || true`
|
|
|
|
if [ -z "$UPSTART_ACTIVE" ]; then
|
|
|
|
if [ -z "$UPSTART_DIVERT" ] && [ -z "$UPSTART_ACTIVE" ]; then
|
|
|
|
echo "Upstart is not active - masking initctl" >&2
|
|
|
|
echo "Upstart is not active - masking initctl" >&2
|
|
|
|
dpkg-divert --local --rename --add /sbin/initctl
|
|
|
|
dpkg-divert --local --rename --add /sbin/initctl
|
|
|
|
ln -s /bin/true /sbin/initctl
|
|
|
|
ln -s /bin/true /sbin/initctl
|
|
|
@ -152,7 +153,7 @@ fi
|
|
|
|
#DEBHELPER#
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
|
|
|
|
# Upstart is not active?
|
|
|
|
# Upstart is not active?
|
|
|
|
if [ -z "$UPSTART_ACTIVE" ]; then
|
|
|
|
if [ -z "$UPSTART_DIVERT" ] && [ -z "$UPSTART_ACTIVE" ]; then
|
|
|
|
rm /sbin/initctl
|
|
|
|
rm /sbin/initctl
|
|
|
|
dpkg-divert --local --rename --remove /sbin/initctl
|
|
|
|
dpkg-divert --local --rename --remove /sbin/initctl
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|