#!/bin/sh
set -e
# Automatically added by dh_installinit/13.3.4
if [ "$1" = "purge" ] ; then
update-rc.d nfs-common remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_systemd_start/13.3.4
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable/13.3.4
if [ "$1" = "remove" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper mask 'nfs-client.target' >/dev/null || true
fi
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge 'nfs-client.target' >/dev/null || true
deb-systemd-helper unmask 'nfs-client.target' >/dev/null || true
fi
fi
# End automatically added section
case "$1" in
purge)
for FILE in /etc/default/nfs-common /etc/idmapd.conf; do
# Taken from the ucf example postrm
for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do
rm -f $FILE$ext
done
rm -f $FILE
if [ -x /usr/bin/ucf ]; then
ucf --purge $FILE
fi
done
rm -f /var/lib/nfs/state \
/var/lib/nfs/sm/* \
/var/lib/nfs/sm.bak/*
dpkg-statoverride --remove /sbin/mount.nfs || true
;;
esac