rpcbind forced userdel/groupdel on package install/upgrade?
Chuck Anderson
cra at WPI.EDU
Tue Jan 29 17:06:55 UTC 2008
Why does rpcbind do this? Shouldn't usermod be used instead of
userdel/useradd? It means on every single rpcbind package upgrade,
the user is deleted and re-added.
#rpm -q --scripts rpcbind
preinstall scriptlet (using /bin/sh):
# if the rpc uid and gid is left over from the portmapper
# remove both of them.
/usr/sbin/userdel rpc 2> /dev/null || :
/usr/sbin/groupdel rpc 2> /dev/null || :
# Now re-add the rpc uid/gid
/usr/sbin/groupadd -g 32 rpc > /dev/null 2>&1
/usr/sbin/useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
-M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add rpcbind
preuninstall scriptlet (using /bin/sh):
if [ $1 -eq 0 ]; then
service rpcbind stop > /dev/null 2>&1
/sbin/chkconfig --del rpcbind
/usr/sbin/userdel rpc 2>/dev/null || :
/usr/sbin/groupdel rpc 2>/dev/null || :
rm -rf /var/lib/rpcbind
fi
postuninstall scriptlet (using /bin/sh):
if [ "$1" -ge "1" ]; then
service rpcbind condrestart > /dev/null 2>&1
fi
More information about the fedora-devel-list
mailing list