[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-755-ga3ab31d

Holger Levsen holger at layer-acht.org
Mon Jun 18 11:38:43 UTC 2012


The following commit has been merged in the piatti branch:
commit 75a442db0de189f910a5af40b5a46c4695ab9878
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Jun 18 12:03:47 2012 +0200

    Reintroduce postrm scripts

diff --git a/debian/piuparts-master.postrm b/debian/piuparts-master.postrm
new file mode 100644
index 0000000..1efe94e
--- /dev/null
+++ b/debian/piuparts-master.postrm
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+set -e 
+
+user=piupartsm
+
+case "$1" in
+  purge)
+    rm -rf /var/lib/piuparts/$user
+
+    if [ -d /var/lib/piuparts/htdocs ] ; then
+        rm -rf /var/lib/piuparts/htdocs
+    fi
+
+    if [ -d /var/lib/piuparts/backup ] ; then
+        rm -rf /var/lib/piuparts/backup
+    fi
+
+    if [ -d /var/lib/piuparts ] ; then
+        rmdir /var/lib/piuparts
+    fi
+
+    if [ -d /etc/piuparts ] ; then
+        rm -rf /etc/piuparts
+    fi
+
+    ;;
+  upgrade|remove|failed-upgrade|abort-install|abort-upgrade)
+    ;;
+  *)
+    echo "postrm called with unknown argument \`$1'" >&2
+    exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
diff --git a/debian/piuparts.postrm b/debian/piuparts-slave.postrm
similarity index 57%
copy from debian/piuparts.postrm
copy to debian/piuparts-slave.postrm
index 619b7bb..9d3da5a 100644
--- a/debian/piuparts.postrm
+++ b/debian/piuparts-slave.postrm
@@ -2,16 +2,16 @@
 
 set -e 
 
-muser=piupartsm
-suser=piupartss
+user=piupartss
 
 case "$1" in
   purge)
+    rm -rf /var/lib/piuparts/$user
 
-    # may be left over from a previous version
-    if [ -d /etc/piuparts ] ; then
-        rmdir /etc/piuparts
-    fi
+    # belongs to piuparts-master atm
+    #if [ -d /etc/piuparts ] ; then
+    #    rm -rf /etc/piuparts
+    #fi
 
     ;;
   upgrade|remove|failed-upgrade|abort-install|abort-upgrade)
diff --git a/debian/piuparts.postrm b/debian/piuparts.postrm
index 619b7bb..5629e4e 100644
--- a/debian/piuparts.postrm
+++ b/debian/piuparts.postrm
@@ -2,9 +2,6 @@
 
 set -e 
 
-muser=piupartsm
-suser=piupartss
-
 case "$1" in
   purge)
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list