how about, #! /bin/sh
set -e if [ "$1" = "purge" ] then ( userdel syslog ERR="$?" if [ "$ERR" -eq "8" ] ; then echo "Ignoring removal of logged in user syslog" exit 0 else exit $ERR fi ) || false update-rc.d sysklogd remove >/dev/null fi Need to use userdel to catch only error 8, deluser only gives 0 or 1. Note, this problem will also happen if purging rsyslog when sysklogd is running -- package sysklogd (not installed) failed to install/upgrade: subprocess installed post-removal script returned error exit status 1 https://bugs.launchpad.net/bugs/401056 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs