[Pkg-net-snmp-devel] Bug#606784: snmpd: package fails to upgrade properly from lenny
Luci Stanescu
luci at cnix.ro
Sun Jan 23 17:07:20 UTC 2011
Are you this isn't something else? This part from the postinst script is
a bit weird:
the postinst does:
if [ "x$1" = xconfigure ]; then
if [ ! `getent group snmp >/dev/null` ]; then
deluser --quiet --system snmp
fi
adduser --quiet --system --group --no-create-home --home
/var/lib/snmp snmp
chown -R snmp:snmp /var/lib/snmp
fi
On my system (real system, not chroot, virtual machine etc.), I've
noticed this doesn't work because I've configured it to backup user home
directories when the user is deleted; so I get a lot of lines like:
/usr/sbin/deluser: Cannot handle special file /proc/28732/fd/1
The test [ ! `getent group snmp >/dev/null` ] will, as far as I can
tell, always be false (`somecommand >/dev/null` will always result in ''
so the test is effectively [ ! '' ]):
luci at lucifer:~$ [ ! `getent group root >/dev/null` ] && echo foo
foo
luci at lucifer:~$ [ ! `getent group lala >/dev/null` ] && echo foo
foo
Are you sure it shouldn't have been:
if ! `getent group snmp >/dev/null`; then
?
luci at lucifer:~$ ! getent group root >/dev/null && echo foo
luci at lucifer:~$ ! getent group lala >/dev/null && echo foo
foo
--
Luci Stanescu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5117 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-net-snmp-devel/attachments/20110123/beb0af73/attachment.bin>
More information about the Pkg-net-snmp-devel
mailing list