Using prerm boilerplate.
authorDaniel Baumann <daniel@debian.org>
Thu, 19 Apr 2012 20:18:38 +0000 (22:18 +0200)
committerDaniel Baumann <daniel@debian.org>
Thu, 19 Apr 2012 20:21:45 +0000 (22:21 +0200)
debian/lxde-common.prerm

index 1b10d27..6f0d313 100644 (file)
@@ -1,8 +1,21 @@
-#!/bin/sh -e
+#!/bin/sh
 
-if [ "$1" = "remove" ] || [ "$1" = upgrade ]; then
-  update-alternatives --remove x-session-manager /usr/bin/startlxde
-fi
+set -e
+
+case "${1}" in
+       remove|upgrade|deconfigure)
+               update-alternatives --remove x-session-manager /usr/bin/startlxde
+               ;;
+
+       failed-upgrade)
+
+               ;;
+
+       *)
+               echo "prerm called with unknown argument \`${1}'" >&2
+               exit 1
+               ;;
+esac
 
 #DEBHELPER#