summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-28 13:13:14 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-28 13:13:14 -0500
commit6a8ca11c71b55becac131b58caa27e8d69696587 (patch)
tree48835c4252c40f46ae2582aeff334e9953606de0
parent90e182fac0303b6a5a9c9da92446b366b2bdadd7 (diff)
parent54abd85dc6b4c54a99644eec21ce51635012ea8b (diff)
Merge commit 'jrollins/master'
-rw-r--r--packaging/debian/changelog3
-rwxr-xr-xpackaging/debian/monkeysphere.postinst34
-rwxr-xr-xpackaging/debian/monkeysphere.postrm9
-rwxr-xr-xpackaging/debian/monkeysphere.preinst25
-rwxr-xr-xpackaging/debian/monkeysphere.prerm15
5 files changed, 28 insertions, 58 deletions
diff --git a/packaging/debian/changelog b/packaging/debian/changelog
index 58a80a3..46f7863 100644
--- a/packaging/debian/changelog
+++ b/packaging/debian/changelog
@@ -1,9 +1,10 @@
monkeysphere (0.24~pre-1) UNRELEASED; urgency=low
+ * update/cleanup mainterscripts
* New upstream release:
- Fixed how version information is stored/retrieved.
- -- Jameson Graef Rollins <jrollins@finestructure.net> Sun, 22 Feb 2009 12:02:06 -0500
+ -- Jameson Graef Rollins <jrollins@finestructure.net> Sat, 28 Feb 2009 13:02:57 -0500
monkeysphere (0.23.1-1) unstable; urgency=low
diff --git a/packaging/debian/monkeysphere.postinst b/packaging/debian/monkeysphere.postinst
index 3d0d66f..bbb02cf 100755
--- a/packaging/debian/monkeysphere.postinst
+++ b/packaging/debian/monkeysphere.postinst
@@ -7,21 +7,25 @@
VARLIB="/var/lib/monkeysphere"
-# add a monkeysphere user if one does not already exist
-if ! getent passwd monkeysphere >/dev/null ; then
- echo "adding monkeysphere user..."
- adduser --quiet --system --no-create-home --group \
- --home "$VARLIB" \
- --shell '/bin/bash' \
- --gecos 'monkeysphere authentication user,,,' \
- monkeysphere
-fi
-
-# try to transition from to 0.23:
-/usr/share/monkeysphere/transitions/0.23
-
-# setup monkeysphere authentication
-monkeysphere-authentication setup
+case $1 in
+ configure)
+ # add a monkeysphere user if one does not already exist
+ if ! getent passwd monkeysphere >/dev/null ; then
+ echo "adding monkeysphere user..."
+ adduser --quiet --system --no-create-home --group \
+ --home "$VARLIB" \
+ --shell '/bin/bash' \
+ --gecos 'monkeysphere authentication user,,,' \
+ monkeysphere
+ fi
+
+ # try to transition from to 0.23:
+ /usr/share/monkeysphere/transitions/0.23
+
+ # setup monkeysphere authentication
+ monkeysphere-authentication setup
+ ;;
+esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
diff --git a/packaging/debian/monkeysphere.postrm b/packaging/debian/monkeysphere.postrm
index 79f7245..e70a1b1 100755
--- a/packaging/debian/monkeysphere.postrm
+++ b/packaging/debian/monkeysphere.postrm
@@ -7,8 +7,13 @@
case $1 in
purge)
- echo "removing monkeysphere user..."
- userdel monkeysphere > /dev/null || true
+ # delete monkeysphere user
+ # http://wiki.debian.org/AccountHandlingInMaintainerScripts
+ if type deluser >/dev/null 2>&1; then
+ deluser --quiet --system monkeysphere > /dev/null || true
+ else
+ echo >&2 "not removing monkeysphere system account because deluser command was not found"
+ fi
;;
esac
diff --git a/packaging/debian/monkeysphere.preinst b/packaging/debian/monkeysphere.preinst
deleted file mode 100755
index fd22f6f..0000000
--- a/packaging/debian/monkeysphere.preinst
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh -e
-
-# preinst script for monkeysphere
-
-# Author: Jameson Rollins <jrollins@finestructure.net>
-# Copyright 2008-2009
-
-ETC="/etc/monkeysphere"
-
-# move the old server conf file to be the authentication conf file
-if [ -f "$ETC"/monkeysphere-server.conf -a \
- ! -f "$ETC"/monkeysphere-authentication.conf ] ; then
- mv "$ETC"/monkeysphere-server.conf "$ETC"/monkeysphere-authentication.conf
-fi
-
-# remove the old gpg-*.conf files
-rm -f "$ETC"/gpg-host.conf
-rm -f "$ETC"/gpg-authentication.conf
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/packaging/debian/monkeysphere.prerm b/packaging/debian/monkeysphere.prerm
deleted file mode 100755
index 5835f53..0000000
--- a/packaging/debian/monkeysphere.prerm
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh -e
-
-# prerm script for monkeysphere
-
-# Author: Jameson Rollins <jrollins@finestructure.net>
-# Copyright 2008-2009
-
-true
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0