summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2015-08-30 11:52:45 +0200
committerSlávek Banko <slavek.banko@axis.cz>2015-08-30 11:53:33 +0200
commit211736e905be29e1ba1647181795794236d6328f (patch)
tree239358990072912ec1deabf46d6930e728638316 /ubuntu/maverick
parent92b8ed7f1427fe2240779b23d5388ecc776b50b4 (diff)
downloadtde-packaging-211736e905be29e1ba1647181795794236d6328f.tar.gz
tde-packaging-211736e905be29e1ba1647181795794236d6328f.zip
Added verification if masking of initctl already exists
This fixes tdm instalation on Ubuntu in chroot Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit e5f2386a7884932cffd7c862b6ddedbd2e8a6810)
Diffstat (limited to 'ubuntu/maverick')
-rw-r--r--ubuntu/maverick/tdebase/debian/tdm-trinity.postinst5
1 files changed, 3 insertions, 2 deletions
diff --git a/ubuntu/maverick/tdebase/debian/tdm-trinity.postinst b/ubuntu/maverick/tdebase/debian/tdm-trinity.postinst
index 4977c4998..c33169e82 100644
--- a/ubuntu/maverick/tdebase/debian/tdm-trinity.postinst
+++ b/ubuntu/maverick/tdebase/debian/tdm-trinity.postinst
@@ -142,8 +142,9 @@ case "$1" in
esac
# 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`
-if [ -z "$UPSTART_ACTIVE" ]; then
+if [ -z "$UPSTART_DIVERT" ] && [ -z "$UPSTART_ACTIVE" ]; then
echo "Upstart is not active - masking initctl" >&2
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
@@ -152,7 +153,7 @@ fi
#DEBHELPER#
# Upstart is not active?
-if [ -z "$UPSTART_ACTIVE" ]; then
+if [ -z "$UPSTART_DIVERT" ] && [ -z "$UPSTART_ACTIVE" ]; then
rm /sbin/initctl
dpkg-divert --local --rename --remove /sbin/initctl
fi