rework systemd integration
This commit is contained in:
parent
a3dfcc8e96
commit
3c6090c127
27
avahi.spec
27
avahi.spec
@ -380,14 +380,13 @@ fi
|
||||
|
||||
%triggerun -- avahi < 0.6.26-1
|
||||
if /sbin/chkconfig avahi-daemon ; then
|
||||
/bin/systemctl enable avahi-daemon.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl --no-reload enable avahi-daemon.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ "$1" -eq 0 ]; then
|
||||
/bin/systemctl disable avahi-daemon.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl --no-reload disable avahi-daemon.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop avahi-daemon.service >/dev/null 2>&1 || :
|
||||
/sbin/service avahi-daemon stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del avahi-daemon >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
@ -412,24 +411,24 @@ getent passwd avahi-autoipd >/dev/null 2>&1 || useradd \
|
||||
|
||||
%post dnsconfd
|
||||
/sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1 || :
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ "$1" -eq 1 ]; then
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%triggerun dnsconfd -- avahi-dnsconfd < 0.6.26-1
|
||||
if /sbin/chkconfig avahi-dnsconfd ; then
|
||||
/bin/systemctl --no-reload enable avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%preun dnsconfd
|
||||
if [ "$1" -eq 0 ]; then
|
||||
/bin/systemctl disable avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||
/sbin/service avahi-dnsconfd stop >/dev/null 2>&1 || :
|
||||
/bin/systemctl --no-reload disable avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del avahi-dnsconfd >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun dnsconfd
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service avahi-dnsconfd condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%triggerin dnsconfd -- avahi-dnsconfd < 0.6.26-1
|
||||
if /sbin/chkconfig avahi-dnsconfd ; then
|
||||
/bin/systemctl enable avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
|
||||
%post glib -p /sbin/ldconfig
|
||||
%postun glib -p /sbin/ldconfig
|
||||
|
Loading…
Reference in New Issue
Block a user