summaryrefslogtreecommitdiffstats
path: root/debian/wheezy/applications/tdesudo
diff options
context:
space:
mode:
Diffstat (limited to 'debian/wheezy/applications/tdesudo')
-rw-r--r--debian/wheezy/applications/tdesudo/debian/postinst2
-rw-r--r--debian/wheezy/applications/tdesudo/debian/preinst13
2 files changed, 10 insertions, 5 deletions
diff --git a/debian/wheezy/applications/tdesudo/debian/postinst b/debian/wheezy/applications/tdesudo/debian/postinst
index 9164f9d4a..5269ffae5 100644
--- a/debian/wheezy/applications/tdesudo/debian/postinst
+++ b/debian/wheezy/applications/tdesudo/debian/postinst
@@ -11,8 +11,6 @@ fi
case "$1" in
configure)
- dpkg-divert --package $package_name --rename --remove \
- /usr/trinity/bin/tdesu || true
;;
abort-upgrade)
;;
diff --git a/debian/wheezy/applications/tdesudo/debian/preinst b/debian/wheezy/applications/tdesudo/debian/preinst
index a13492559..770dfaacb 100644
--- a/debian/wheezy/applications/tdesudo/debian/preinst
+++ b/debian/wheezy/applications/tdesudo/debian/preinst
@@ -16,9 +16,16 @@ case "$1" in
--rename /opt/trinity/bin/tdesu
;;
upgrade)
- dpkg-divert --package $package_name \
- --divert /opt/trinity/bin/tdesu.distrib \
- --rename /opt/trinity/bin/tdesu
+ divert=`dpkg-divert --listpackage "/usr/trinity/bin/tdesu"`
+ if [ -n "$divert" ] && [ "$divert" = "$package_name" ]; then
+ dpkg-divert --remove --package $package_name --rename "/usr/trinity/bin/tdesu"
+ fi
+ divert=`dpkg-divert --listpackage "/opt/trinity/bin/tdesu"`
+ if [ -z "$divert" ]; then
+ dpkg-divert --package $package_name \
+ --divert /opt/trinity/bin/tdesu.distrib \
+ --rename /opt/trinity/bin/tdesu
+ fi
;;
abort-upgrade)
;;