Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > d14d4e0b579aa78ec501054390a5a595 > scriptlet

rpcbind-0.2.0-7.fc14.i686.rpm

PREIN

/bin/sh

# Check the validity of the rpc uid and gid.
# If they don't exist, create them
# If they exist but are the wrong value, remove them 
#   and recreate them with the correct value
# If they exist and are the correct value do nothing
rpcid=`getent passwd rpc | cut -d: -f 3`
if [ -n "$rpcid" -a "$rpcid" != "32" ]; then
	/usr/sbin/userdel  rpc 2> /dev/null || :
	/usr/sbin/groupdel rpc 2> /dev/null || : 
fi
if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
	/usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1
	/usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
    	-M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
fi

PREUN

/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

POSTIN

/bin/sh
/sbin/chkconfig --add rpcbind

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
    service rpcbind condrestart > /dev/null 2>&1
fi