Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 216b73a49f7441f0572012255893e2c7 > scriptlet

tftpd-hpa-0.48-1.amd64.rpm

PREIN

/bin/sh

 
 
if [ -n "`/usr/bin/getgid tftp`" ]; then 
	if [ "`/usr/bin/getgid tftp`" != "59" ]; then 
		echo "Error: group tftp doesn't have gid=59. Correct this before installing tftpd-hpa." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding group tftp GID=59." 
	/usr/sbin/groupadd -g 59 -r tftp 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : 
fi;
 
 
 
if [ -n "`/bin/id -u tftp 2>/dev/null`" ]; then 
	if [ "`/bin/id -u tftp`" != "15" ]; then 
		echo "Error: user tftp doesn't have uid=15. Correct this before installing tftpd-hpa." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding user tftp UID=15." 
	/usr/sbin/useradd \
		 \
		-u 15 \
		-r \
		-d /var/lib/tftp \
		-s /bin/false \
		-c "TFTP User"\
		-g tftp \
		 \
		 \
		tftp 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || : 
fi;

POSTIN

/bin/sh
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/rc-inetd ] && . /etc/sysconfig/rc-inetd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/rc-inetd ]; then
/sbin/service rc-inetd reload 1>&2 || :;
fi
fi };

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/rc-inetd ] && . /etc/sysconfig/rc-inetd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/rc-inetd ]; then
/sbin/service rc-inetd reload 1>&2 || :;
fi
fi };	/usr/lib/rpm/user_group.sh user del tftp
	/usr/lib/rpm/user_group.sh group del tftp
fi