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
|
%triggerun -- avahi < 0.6.26-1
|
||||||
if /sbin/chkconfig avahi-daemon ; then
|
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
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" -eq 0 ]; then
|
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 || :
|
/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 || :
|
/sbin/chkconfig --del avahi-daemon >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -412,24 +411,24 @@ getent passwd avahi-autoipd >/dev/null 2>&1 || useradd \
|
|||||||
|
|
||||||
%post dnsconfd
|
%post dnsconfd
|
||||||
/sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1 || :
|
/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
|
%preun dnsconfd
|
||||||
if [ "$1" -eq 0 ]; then
|
if [ "$1" -eq 0 ]; then
|
||||||
/bin/systemctl disable avahi-dnsconfd.service >/dev/null 2>&1 || :
|
/bin/systemctl --no-reload disable avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||||
/sbin/service avahi-dnsconfd stop >/dev/null 2>&1 || :
|
/bin/systemctl stop avahi-dnsconfd.service >/dev/null 2>&1 || :
|
||||||
/sbin/chkconfig --del avahi-dnsconfd >/dev/null 2>&1 || :
|
/sbin/chkconfig --del avahi-dnsconfd >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun dnsconfd
|
%postun dnsconfd
|
||||||
if [ "$1" -ge "1" ]; then
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
/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
|
|
||||||
|
|
||||||
%post glib -p /sbin/ldconfig
|
%post glib -p /sbin/ldconfig
|
||||||
%postun glib -p /sbin/ldconfig
|
%postun glib -p /sbin/ldconfig
|
||||||
|
Loading…
Reference in New Issue
Block a user