PREIN
/bin/sh
/usr/sbin/groupadd -g 70 -r avahi 2> /dev/null || :
/usr/sbin/useradd -r -u 70 -s /sbin/nologin -c "Avahi daemon" -d / -g avahi avahi 2> /dev/null || :
PREUN
/bin/sh
if [ "$1" -eq "0" ]; then
/sbin/service avahi-daemon stop > /dev/null 2>&1
/sbin/chkconfig --del avahi-daemon
/sbin/service avahi-dnsconfd stop >/dev/null 2>&1
/sbin/chkconfig --del avahi-dnsconfd
fi
POSTIN
/bin/sh
/sbin/ldconfig
# Run avahi-daemon by default:
/sbin/chkconfig --add avahi-daemon >/dev/null 2>&1 || :;
# avahi-dnsconfd NOT run by default in any runlevel; add it
# so system-config-services can see it
/sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1 || :;
if [ "$1" -eq 1 ]; then
# We should realy make dbus reload the system.d config here. Dunno how though.
# kill -HUP `cat /var/run/messagebus.pid` ?
if [ -s /etc/localtime ]; then
cp -fp /etc/localtime /etc/avahi/etc/localtime || :;
fi;
fi;
POSTUN
/bin/sh
/sbin/ldconfig
if [ "$1" -ge "1" ]; then
/sbin/service avahi-daemon condrestart >/dev/null 2>&1
/sbin/service avahi-dnsconfd condrestart >/dev/null 2>&1
fi