Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c4e7f8e8f93f3069c1d5a463e83fc5c3 > scriptlet

ffingerd-1.28-10mdv2010.0.i586.rpm

POSTIN

/bin/sh
# remove other fingerd's and add ffingerd. make a backup, too
cat /etc/inetd.conf | grep ffingerd > /tmp/ffingerd.test
if [ ! -s /tmp/ffingerd.test ]; then
     cp -f /etc/inetd.conf /etc/inetd.conf.rpmsave
     cat /etc/inetd.conf | grep -v in.fingerd | grep -v "End of inetd.conf" > /etc/inetd.conf
     echo "#" >> /etc/inetd.conf
     echo "# Fefe's finger daemon, a secure finger daemon" >> /etc/inetd.conf
     echo "#" >> /etc/inetd.conf
     echo "finger  stream  tcp     nowait  nobody  /usr/sbin/tcpd  /usr/sbin/ffingerd" >> /etc/inetd.conf
     echo >> /etc/inetd.conf
     echo "# End of inetd.conf" >> /etc/inetd.conf
fi
rm /tmp/ffingerd.test

# now restart inetd
if [ -f /var/run/inetd.pid ]; then
     kill -HUP `cat /var/run/inetd.pid` ;
else
     echo "Now you need to restart inetd" ;
fi

POSTUN

/bin/sh
# restore the old config file, or try to at least
if [ -f /etc/inetd.conf.rpmsave ]; then
     mv /etc/inetd.conf.rpmsave /etc/inetd.conf ;
fi

# now restart inetd
if [ -f /var/run/inetd.pid ]; then
     kill -HUP `cat /var/run/inetd.pid` ;
else
     echo "Now you need to restart inetd" ;
fi