Call stop_on_removal from preun and restart_on_update and insserv_cleanup

from postun on pre-12.3 systems only; (bnc#856759).

OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/samba?expand=0&rev=363
This commit is contained in:
Lars Müller
2014-01-08 15:57:34 +00:00
committed by Git OBS Bridge
parent 0b95018e19
commit 90ad8c4216
4 changed files with 21 additions and 11 deletions

View File

@@ -135,7 +135,7 @@ BuildRequires: systemd
%else
%define build_make_smp_mflags %{?jobs:-j%jobs}
%endif
%define SOURCE_TIMESTAMP 3139
%define SOURCE_TIMESTAMP 3140
%define BRANCH %{version}
%global with_mitkrb5 1
%global with_dc 0
@@ -1517,9 +1517,10 @@ getent group ntadmin >/dev/null || groupadd -g 71 -o -r ntadmin || :
%endif
%preun
%{?stop_on_removal:%{stop_on_removal smb nmb}}
%if 0%{?suse_version} > 1220
%service_del_preun nmb.service smb.service
%else
%{?stop_on_removal:%{stop_on_removal smb nmb}}
%endif
%post
@@ -1530,10 +1531,11 @@ getent group ntadmin >/dev/null || groupadd -g 71 -o -r ntadmin || :
%endif
%postun
%{?restart_on_update:%{restart_on_update nmb smb}}
%{?insserv_cleanup:%{insserv_cleanup}}
%if 0%{?suse_version} > 1220
%service_del_postun nmb.service smb.service
%else
%{?restart_on_update:%{restart_on_update nmb smb}}
%{?insserv_cleanup:%{insserv_cleanup}}
%endif
%pre client
@@ -1711,9 +1713,10 @@ fi
%endif
%preun winbind
%{?stop_on_removal:%{stop_on_removal winbind}}
%if 0%{?suse_version} > 1220
%service_del_preun winbind.service
%else
%{?stop_on_removal:%{stop_on_removal winbind}}
%endif
%postun winbind
@@ -1727,10 +1730,11 @@ if [ -x %{_sbindir}/nscd ]; then
fi
fi
%endif
%{?restart_on_update:%{restart_on_update winbind}}
%{?insserv_cleanup:%{insserv_cleanup}}
%if 0%{?suse_version} > 1220
%service_del_postun winbind.service
%else
%{?restart_on_update:%{restart_on_update winbind}}
%{?insserv_cleanup:%{insserv_cleanup}}
%endif
%post -n %{libsmbclient_name} -p /sbin/ldconfig