summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-06 11:12:29 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-06 11:12:29 +0000
commit62549d8bde584228799cfc302ff6f67523c50481 (patch)
tree5693d86b2b70d2817c77bbe84ca20d33898035eb /debian
parent2167f8f1f9bbdc1943a4dbfd249447965e78b4b6 (diff)
Fix rapid-client deb generation and removal:
* Re-add /var/lib/rapid-tunneling . Add a placeholder file to keep it. * Fix user generation in postinst to not try again. * Delete user's home directory and remove user on purge. git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6555 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'debian')
-rw-r--r--debian/TODO.Debian3
-rw-r--r--debian/prerm44
-rw-r--r--debian/rapid-tunneling.install2
-rw-r--r--debian/rapid-tunneling.postinst4
-rw-r--r--debian/rapid-tunneling.postrm16
5 files changed, 23 insertions, 46 deletions
diff --git a/debian/TODO.Debian b/debian/TODO.Debian
index ed0dcc2..5453396 100644
--- a/debian/TODO.Debian
+++ b/debian/TODO.Debian
@@ -3,3 +3,6 @@ not.
If we do, we must use the current useradd command. If we don't: use
adduser. The web interface only assumes that there's such a user.
+
+
+* Do we delete users on purge?
diff --git a/debian/prerm b/debian/prerm
deleted file mode 100644
index 1ac9c16..0000000
--- a/debian/prerm
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-# prerm script for rapid-tunneling
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-# * <prerm> `remove'
-# * <old-prerm> `upgrade' <new-version>
-# * <new-prerm> `failed-upgrade' <old-version>
-# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-# * <deconfigured's-prerm> `deconfigure' `in-favour'
-# <package-being-installed> <version> `removing'
-# <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
- remove)
- userdel -r rapid-tunneling || :
- ;;
-
- upgrade)
- ;;
-
- failed-upgrade)
- ;;
-
- *)
- echo "prerm 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
-
-
diff --git a/debian/rapid-tunneling.install b/debian/rapid-tunneling.install
index ca4453e..100fe09 100644
--- a/debian/rapid-tunneling.install
+++ b/debian/rapid-tunneling.install
@@ -1,3 +1,3 @@
usr/sbin/rapid-tunneling
usr/sbin/rapid-tunneling-status
-
+var/lib/rapid-tunneling
diff --git a/debian/rapid-tunneling.postinst b/debian/rapid-tunneling.postinst
index 5fdc023..bebf14f 100644
--- a/debian/rapid-tunneling.postinst
+++ b/debian/rapid-tunneling.postinst
@@ -21,7 +21,9 @@ set -e
case "$1" in
configure)
# add a user with uid=gid=0
- useradd -d /var/lib/rapid-tunneling/home -m -u 0 -g 0 -o rapid-tunneling 2>/dev/null || true
+ if ! getent passwd rapid-tunneling >/dev/null ; then
+ useradd -d /var/lib/rapid-tunneling/home -m -u 0 -g 0 -o rapid-tunneling
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/rapid-tunneling.postrm b/debian/rapid-tunneling.postrm
new file mode 100644
index 0000000..89276e5
--- /dev/null
+++ b/debian/rapid-tunneling.postrm
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ purge)
+ userdel -r rapid-tunneling || :
+ rm -rf /var/lib/rapid-tunneling/home
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+