2005-11-30 04:39:17 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# remove symlinks in /etc/rc?.d
|
|
|
|
[ "$1" = "purge" ] && update-rc.d cryptobox remove
|
2005-12-01 19:22:05 +01:00
|
|
|
|
2005-12-12 23:32:22 +01:00
|
|
|
if [ "$1" = "purge" ] && grep -q "cryptobox package.*HEADER" /etc/sudoers
|
|
|
|
then echo "Removing entry from /etc/sudoers"
|
|
|
|
sed -i "/cryptobox package.*HEADER/,/cryptobox package.*FOOTER/d" /etc/sudoers
|
2005-12-13 03:27:33 +01:00
|
|
|
echo "Removing mount and config directories (/var/lib/cryptobox) ..."
|
|
|
|
rmdir /var/lib/cryptobox/mnt || echo " mount directory not empty - skipped" >&2
|
|
|
|
mountpoint -q /var/lib/cryptobox/config || rm -rf /var/lib/cryptobox/config || \
|
|
|
|
echo " failed to remove config directory - skipped" >&2
|
|
|
|
rmdir /var/lib/cryptobox || \
|
|
|
|
echo " the cryptobox directory (/var/lib/cryptobox) has not been removed" >&2
|
2005-12-12 23:32:22 +01:00
|
|
|
fi
|
|
|
|
|
2005-12-01 19:22:05 +01:00
|
|
|
# return without error
|
|
|
|
true
|