diff options
Diffstat (limited to 'debian/freeradius-dhcp.postrm')
-rw-r--r-- | debian/freeradius-dhcp.postrm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/freeradius-dhcp.postrm b/debian/freeradius-dhcp.postrm new file mode 100644 index 0000000..d7c484c --- /dev/null +++ b/debian/freeradius-dhcp.postrm @@ -0,0 +1,24 @@ +#!/bin/sh +# vim:ts=2:sw=2:et + +set -e + +case "$1" in + purge) + # Remove dangling links from mods-enabled. + for link in /etc/freeradius/3.0/mods-enabled/dhcp; do + if [ -L "$link" ] && [ ! -e "$link" ]; then + rm -f "$link" + fi + done + + # rmdir fails when called on a directory which does not exist + if [ -d /etc/freeradius ]; then + rmdir --ignore-fail-on-non-empty /etc/freeradius + fi + ;; +esac + +#DEBHELPER# + +exit 0 |