[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-782-gd639116
Holger Levsen
holger at layer-acht.org
Mon Jun 18 21:14:37 UTC 2012
The following commit has been merged in the piatti branch:
commit 00296ec40482cd878521b79dab204736d4b1c1d2
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Jun 18 19:58:57 2012 +0200
make postrm scripts more robust
diff --git a/debian/piuparts-master.postrm b/debian/piuparts-master.postrm
index 1efe94e..807d14e 100644
--- a/debian/piuparts-master.postrm
+++ b/debian/piuparts-master.postrm
@@ -16,12 +16,16 @@ case "$1" in
rm -rf /var/lib/piuparts/backup
fi
+ if [ -d /var/lib/piuparts/master ] ; then
+ rm -rf /var/lib/piuparts/master
+ fi
+
if [ -d /var/lib/piuparts ] ; then
- rmdir /var/lib/piuparts
+ rmdir /var/lib/piuparts || true
fi
if [ -d /etc/piuparts ] ; then
- rm -rf /etc/piuparts
+ rmdir /etc/piuparts || true
fi
;;
diff --git a/debian/piuparts-slave.postrm b/debian/piuparts-slave.postrm
index 9d3da5a..be7dc7a 100644
--- a/debian/piuparts-slave.postrm
+++ b/debian/piuparts-slave.postrm
@@ -8,10 +8,13 @@ case "$1" in
purge)
rm -rf /var/lib/piuparts/$user
- # belongs to piuparts-master atm
- #if [ -d /etc/piuparts ] ; then
- # rm -rf /etc/piuparts
- #fi
+ if [ -d /var/lib/piuparts/slave ] ; then
+ rm -rf /var/lib/piuparts/slave
+ fi
+
+ if [ -d /etc/piuparts ] ; then
+ rmdir /etc/piuparts || true
+ fi
;;
upgrade|remove|failed-upgrade|abort-install|abort-upgrade)
diff --git a/debian/piuparts.postrm b/debian/piuparts.postrm
index 5629e4e..3834446 100644
--- a/debian/piuparts.postrm
+++ b/debian/piuparts.postrm
@@ -7,7 +7,7 @@ case "$1" in
# may be left over from a previous version
if [ -d /etc/piuparts ] ; then
- rmdir /etc/piuparts
+ rmdir /etc/piuparts || true
fi
;;
--
piuparts git repository
More information about the Piuparts-commits
mailing list