summaryrefslogtreecommitdiffstats
path: root/debian/lenny/metapackages
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-09-15 01:40:28 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-09-15 01:43:51 +0200
commitdc647fd5af8a48c5fa421456bdf52194303a1412 (patch)
tree4cd8b252d9abfcd70e353722d6ef2192a63c1116 /debian/lenny/metapackages
parent885ee6bd7df327175b3dd2f71a441daec3d05ebe (diff)
downloadtde-packaging-dc647fd5af8a48c5fa421456bdf52194303a1412.tar.gz
tde-packaging-dc647fd5af8a48c5fa421456bdf52194303a1412.zip
Fix former service and diverts in rename-meta on Debian and Ubuntu
Diffstat (limited to 'debian/lenny/metapackages')
-rw-r--r--debian/lenny/metapackages/rename-meta/debian/kdesudo-trinity.preinst13
-rw-r--r--debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst (renamed from debian/lenny/metapackages/rename-meta/debian/kdm-trinity.postinst)59
-rw-r--r--debian/lenny/metapackages/rename-meta/debian/kio-umountwrapper-trinity.preinst22
3 files changed, 93 insertions, 1 deletions
diff --git a/debian/lenny/metapackages/rename-meta/debian/kdesudo-trinity.preinst b/debian/lenny/metapackages/rename-meta/debian/kdesudo-trinity.preinst
new file mode 100644
index 000000000..12e16e22d
--- /dev/null
+++ b/debian/lenny/metapackages/rename-meta/debian/kdesudo-trinity.preinst
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+set -e
+
+package_name=kdesudo-trinity
+
+divert=`dpkg-divert --listpackage "/opt/trinity/bin/kdesu"`
+if [ -n "$divert" ] && [ "$divert" = $package_name ]; then
+ dpkg-divert --package $package_name --rename --remove \
+ /opt/trinity/bin/kdesu
+fi
+
+exit 0
diff --git a/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.postinst b/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst
index e026f2bfe..391d99542 100644
--- a/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.postinst
+++ b/debian/lenny/metapackages/rename-meta/debian/kdm-trinity.preinst
@@ -1,5 +1,5 @@
#! /bin/sh
-# postinst script for kdm-trinity
+# preinst script for kdm-trinity
#
# see: dh_installdeb(1)
@@ -12,6 +12,63 @@ if [ -e /usr/share/debconf/confmodule ]; then
HAVE_DEBCONF=yes
fi
+# remove former service
+if [ -e /etc/init.d/kdm-trinity ]; then
+ REMOVING=yes
+ rm -f /etc/init.d/kdm-trinity
+fi
+
+if [ -n "$REMOVING" ]; then
+ # is there an kdm process running?
+ if start-stop-daemon --stop --quiet --signal 0 --name kdm-trinity; then
+ # any children?
+ PARENTS=$(pidof /usr/bin/kdm-trinity || true)
+ CHILDREN=
+ if [ -n "$PARENTS" ]; then
+ for PROCESS in $PARENTS; do
+ # make sure we got numbers back
+ [ $PROCESS -eq $PROCESS ] 2> /dev/null ||
+ exit
+ # FIXME - redo this part uses shell-lib.sh from xfree86
+ # die "pidof returned non-numeric value"
+ # we could use grep -q here if ps would ignore SIGPIPE :-P
+ if (ps axj | grep "^ *$PROCESS" > /dev/null 2>&1); then
+ CHILDREN=yes
+ fi
+ done
+ if [ -n "$CHILDREN" ]; then
+ if [ -n "$HAVE_DEBCONF" ]; then
+ # ask the question
+ db_input high kdm/stop_running_server_with_children || true
+ db_go
+ # what did the user say?
+ ANSWER=
+ if db_get kdm/stop_running_server_with_children; then
+ ANSWER="$RET"
+ fi
+ if [ "$ANSWER" = "true" ]; then
+ STOP=yes
+ fi
+ # forget that we have seen the question; this is the sort of
+ # non-configuration question that should be asked every time
+ db_fset kdm/stop_running_server_with_children seen false
+ fi
+ else
+ STOP=yes
+ fi
+ fi
+ fi
+fi
+
+if [ -n "$STOP" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d kdm-trinity stop || true
+ else
+ /etc/init.d/kdm-trinity stop || true
+ fi
+fi
+
+
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
if [ -n "$HAVE_DEBCONF" ]; then
diff --git a/debian/lenny/metapackages/rename-meta/debian/kio-umountwrapper-trinity.preinst b/debian/lenny/metapackages/rename-meta/debian/kio-umountwrapper-trinity.preinst
new file mode 100644
index 000000000..b7af2273b
--- /dev/null
+++ b/debian/lenny/metapackages/rename-meta/debian/kio-umountwrapper-trinity.preinst
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+set -e
+
+package_name=kio-umountwrapper-trinity
+
+divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop"`
+if [ -n "$divert" ] && [ "$divert" = $package_name ]; then
+ dpkg-divert --package $package_name --remove --rename /opt/trinity/share/apps/konqueror/servicemenus/media_safelyremove.desktop
+fi
+
+divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop"`
+if [ -n "$divert" ] && [ "$divert" = $package_name ]; then
+ dpkg-divert --package $package_name --remove --rename /opt/trinity/share/apps/dolphin/servicemenus/media_safelyremove.desktop
+fi
+
+divert=`dpkg-divert --listpackage "/opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop"`
+if [ -n "$divert" ] && [ "$divert" = $package_name ]; then
+ dpkg-divert --package $package_name --remove --rename /opt/trinity/share/apps/d3lphin/servicemenus/media_safelyremove.desktop
+fi
+
+exit 0