diff -u sysklogd-1.5/debian/changelog sysklogd-1.5/debian/changelog --- sysklogd-1.5/debian/changelog +++ sysklogd-1.5/debian/changelog @@ -1,3 +1,11 @@ +sysklogd (1.5-5ubuntu3.1) jaunty; urgency=low + + * debian/postrm: If syslog user is still logged in, ignore errors when + trying to remove it. This happens when rsyslog is running in the + upgrade case. LP: #401056 + + -- Michael Terry Wed, 16 Sep 2009 14:56:58 -0400 + sysklogd (1.5-5ubuntu3) jaunty; urgency=low * Add test for /etc/unbound/syslogd to debian/rc (init script) to grab the diff -u sysklogd-1.5/debian/postrm sysklogd-1.5/debian/postrm --- sysklogd-1.5/debian/postrm +++ sysklogd-1.5/debian/postrm @@ -3,7 +3,17 @@ set -e +deluser_syslog() { + # 1 is returned if the syslog user is still logged in (e.g. rsyslog + # is now running as that user). Which is valid, so ignore it. + # Debian doesn't run rsyslog as the 'syslog' user, so this is Ubuntu-only + # for the moment. + deluser --system --quiet syslog || ERR=$? + if [ -z "$ERR" -o "$ERR" = "1" ]; then ERR=0; fi + return $ERR +} + if [ "$1" = "purge" ] then - deluser --system --quiet syslog + deluser_syslog update-rc.d sysklogd remove >/dev/null fi