summaryrefslogtreecommitdiff
path: root/packaging/freebsd/pkg-deinstall
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-09-12 17:41:53 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-09-12 17:41:53 -0400
commit82c97a3d7799dcbd722523f251de8836d5956318 (patch)
tree7c8b25a098cfd19ccbac98357882e0efaccc0bc3 /packaging/freebsd/pkg-deinstall
parent4822085adf8698c5f1dc069e7f48c9b85ada8f0c (diff)
more tweaks to freebsd packaging.
Diffstat (limited to 'packaging/freebsd/pkg-deinstall')
-rwxr-xr-xpackaging/freebsd/pkg-deinstall13
1 files changed, 9 insertions, 4 deletions
diff --git a/packaging/freebsd/pkg-deinstall b/packaging/freebsd/pkg-deinstall
index 03db8e8..966f252 100755
--- a/packaging/freebsd/pkg-deinstall
+++ b/packaging/freebsd/pkg-deinstall
@@ -13,12 +13,17 @@ VARLIB="/var/monkeysphere"
case $2 in
POST-DEINSTALL)
-# FIXME: This needs to be filled in! Under what circumstances do we
-# want to actually purge all of /var/monkeysphere?
+ USER=monkeysphere
+# FIXME: This doesn't do anything! Under what circumstances do we
+# want to actually automatically purge all of /var/monkeysphere?
# (note: FreeBSD does not seem to want the package-specific user to be
# purged at package removal)
- echo "Warning: If you will *NOT* use this package anymore, please remove the monkeysphere user manually."
- echo " You may also want to remove the cached authentication data and keyrings in $VARLIB"
+ if pw user show "${USER}" 2>/dev/null; then
+ echo "Warning: If you will *NOT* use this package anymore, please remove the monkeysphere user manually."
+ fi
+ if [ -d "$VARLIB" ] ; then
+ echo "Warning: You may want to remove monkeysphere's cached authentication data and keyrings in $VARLIB"
+ fi
;;
esac