Preinst script to create sipb-xen group.
authorEric Price <ecprice@mit.edu>
Sat, 29 Mar 2008 22:44:45 +0000 (18:44 -0400)
committerEric Price <ecprice@mit.edu>
Sat, 29 Mar 2008 22:44:45 +0000 (18:44 -0400)
svn path=/trunk/packages/sipb-xen-www/; revision=332

debian/sipb-xen-www.preinst [new file with mode: 0644]

diff --git a/debian/sipb-xen-www.preinst b/debian/sipb-xen-www.preinst
new file mode 100644 (file)
index 0000000..d5afbad
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh
+# preinst script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+       if ! getent group sipb-xen > /dev/null; then
+           addgroup --system sipb-xen
+       fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+