Accepting request 103304 from home:computersalat:devel:sysmgmnt

fix pre/post scripts

OBS-URL: https://build.opensuse.org/request/show/103304
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=15
This commit is contained in:
Christian Wittmer 2012-02-08 12:40:10 +00:00 committed by Git OBS Bridge
parent 4567b0ffd6
commit dd60137393
2 changed files with 28 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 8 11:03:06 UTC 2012 - chris@computersalat.de
- fix pre/post scripts
* RHEL/CentOS does not know "SuSE macros" :(
-------------------------------------------------------------------
Tue Feb 7 12:20:19 UTC 2012 - chris@computersalat.de

View File

@ -16,6 +16,7 @@
#
Name: cfengine
%define libname libpromises
%define libsoname %{libname}1
@ -178,8 +179,13 @@ done
#{__rm} -rf %{buildroot}/%{_libdir}/libpromises.a
%preun
%if 0%{?suse_version}
%stop_on_removal cf-monitord
%stop_on_removal cf-execd
%else
/etc/init.d/cf-execd stop
/etc/init.d/cf-monitord stop
%endif
%post
%if 0%{?suse_version}
@ -195,6 +201,10 @@ done
%postun
%if 0%{?suse_version}
%insserv_cleanup
for i in execd monitord; do
%restart_on_update cf-${i}
done
%if 0%{?suse_version} > 1010
%install_info_delete --name=%{name} --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz
%else
@ -202,18 +212,25 @@ done
%endif
%else
%install_info_delete --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz
%endif
%insserv_cleanup
/sbin/ldconfig
for i in execd monitord serverd; do
%restart_on_update cf-${i}
for i in execd monitord; do
/etc/init.d/cf-${i} restart
done
%endif
/sbin/ldconfig
%preun server
%if 0%{?suse_version}
%stop_on_removal cf-serverd
%else
/etc/init.d/cf-serverd stop
%endif
%postun server
%if 0%{?suse_version}
%restart_on_update cf-serverd
%else
/etc/init.d/cf-serverd restart
%endif
%post -n %{libsoname} -p /sbin/ldconfig