PREUN
/bin/sh
if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade
service dhcpd stop >/dev/null 2>&1
service dhcrelay stop >/dev/null 2>&1
/sbin/chkconfig --del dhcpd
/sbin/chkconfig --del dhcrelay
fi
exit 0
POSTIN
/bin/sh
/sbin/chkconfig --add dhcpd
/sbin/chkconfig --add dhcrelay
if [ "$1" -ge 1 ]; then
if [ ! -e /usr/share/man/man5/dhcp-options.5.gz ]; then
ln -s /usr/share/man/man5/dhcpd-options.5.gz /usr/share/man/man5/dhcp-options.5.gz
fi
if [ ! -e /usr/share/man/man5/dhcp-eval.5.gz ]; then
ln -s /usr/share/man/man5/dhcpd-eval.5.gz /usr/share/man/man5/dhcp-eval.5.gz
fi
fi
exit 0
POSTUN
/bin/sh
if [ "$1" -ge "1" ]; then
service dhcpd condrestart >/dev/null 2>&1
service dhcrelay condrestart >/dev/null 2>&1
elif [ "$1" -eq 0 ]; then
if [ -e /usr/share/man/man5/dhclient-options.5.gz ]; then
ln -sf /usr/share/man/man5/dhclient-options.5.gz /usr/share/man/man5/dhcp-options.5.gz
fi
if [ -e /usr/share/man/man5/dhclient-eval.5.gz ]; then
ln -sf /usr/share/man/man5/dhclient-eval.5.gz /usr/share/man/man5/dhcp-eval.5.gz
fi
fi
exit 0