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

index dd5bdaf..a96e625 100644 (file)
@@ -1,12 +1,24 @@
-#!/bin/sh -e
+#!/bin/sh
 
-if [ "$1" = configure ]; then
-  update-alternatives --install /usr/bin/x-session-manager \
-    x-session-manager /usr/bin/startlxde 50 \
-    --slave /usr/share/man/man1/x-session-manager.1.gz \
-    x-session-manager.1.gz /usr/share/man/man1/startlxde.1.gz
+set -e
 
-fi
+case "${1}" in
+       configure)
+               update-alternatives --install /usr/bin/x-session-manager \
+                       x-session-manager /usr/bin/startlxde 50 \
+                       --slave /usr/share/man/man1/x-session-manager.1.gz \
+                       x-session-manager.1.gz /usr/share/man/man1/startlxde.1.gz
+               ;;
+
+       abort-upgrade|abort-remove|abort-deconfigure)
+
+               ;;
+
+       *)
+               echo "postinst called with unknown argument \`${1}'" >&2
+               exit 1
+               ;;
+esac
 
 #DEBHELPER#