diff --git a/debian/changelog b/debian/changelog index d95568b..6afa8ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,10 @@ nut (2.4.3-2) UNRELEASED; urgency=low * debian/watch: Bump version to 3 * Add debian/patches/0002-fix_udev_action.patch: Also set permission for "change" udev ACTION (Closes: #557178) + * debian/nut.postrm: Do not try to remove nut user is deluser is not + installed anymore - -- Laurent Bigonville Wed, 22 Dec 2010 18:28:42 +0100 + -- Laurent Bigonville Wed, 22 Dec 2010 18:53:16 +0100 nut (2.4.3-1.1) unstable; urgency=low diff --git a/debian/nut.postrm b/debian/nut.postrm index 385c39f..38b8d52 100644 --- a/debian/nut.postrm +++ b/debian/nut.postrm @@ -15,9 +15,11 @@ case "$1" in rm -f /etc/udev/rules.d/52_nut-usbups.rules rm -f /etc/udev/rules.d/52-nut-usbups.rules # remove the nut user - if getent passwd nut >/dev/null; then - deluser --quiet nut - fi + if [ -x "$(command -v deluser)" ]; then + deluser --quiet --system nut > /dev/null || true + else + echo >&2 "not removing nut system account because deluser command was not found" + fi # handle a dpkg bug [ -d /etc/nut ] && rmdir --ignore-fail-on-non-empty /etc/nut >/dev/null 2>&1 ;;