PREIN
/bin/sh
# Add the "avahi" user
/usr/sbin/useradd -c 'Avahi daemon' -u 70 \
-s /sbin/nologin -r -d '/' avahi 2> /dev/null || :
PREUN
/bin/sh
if [ "$1" -eq 0 ]; then
service avahi-daemon stop > /dev/null 2>&1
/sbin/chkconfig --del avahi-daemon
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 -cfp /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