PREIN
/bin/sh
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." 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 ftp \
\
\
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
fi