debian/nut.postrm: Do not try to remove nut user is deluser is not installed anymore
This commit is contained in:
parent
58a98cfddc
commit
9a6e44c40b
2 changed files with 8 additions and 4 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -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 <bigon@debian.org> Wed, 22 Dec 2010 18:28:42 +0100
|
||||
-- Laurent Bigonville <bigon@debian.org> Wed, 22 Dec 2010 18:53:16 +0100
|
||||
|
||||
nut (2.4.3-1.1) unstable; urgency=low
|
||||
|
||||
|
|
8
debian/nut.postrm
vendored
8
debian/nut.postrm
vendored
|
@ -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
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue