Accepting request 103358 from home:computersalat:devel:sysmgmnt

fix pre/post scripts

OBS-URL: https://build.opensuse.org/request/show/103358
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=16
This commit is contained in:
Christian Wittmer 2012-02-08 15:13:48 +00:00 committed by Git OBS Bridge
parent dd60137393
commit 5d14955f3f
2 changed files with 18 additions and 20 deletions

View File

@ -1,5 +1,5 @@
-------------------------------------------------------------------
Wed Feb 8 11:03:06 UTC 2012 - chris@computersalat.de
Wed Feb 8 15:03:01 UTC 2012 - chris@computersalat.de
- fix pre/post scripts
* RHEL/CentOS does not know "SuSE macros" :(

View File

@ -16,7 +16,6 @@
#
Name: cfengine
%define libname libpromises
%define libsoname %{libname}1
@ -189,32 +188,26 @@ done
%post
%if 0%{?suse_version}
%if 0%{?suse_version} > 1010
%install_info --name=%{name} --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz
%else
:
%endif
%else
%install_info --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz
%endif
/sbin/ldconfig
%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
%insserv_cleanup
for i in execd monitord; do
%restart_on_update cf-${i}
done
%else
# Update ?
if [ ${1:-0} -eq 1 ]; then
for i in execd monitord; do
/etc/init.d/cf-${i} restart
done
else
:
%endif
%else
%install_info_delete --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz
for i in execd monitord; do
/etc/init.d/cf-${i} restart
done
fi
%endif
/sbin/ldconfig
@ -229,7 +222,12 @@ done
%if 0%{?suse_version}
%restart_on_update cf-serverd
%else
/etc/init.d/cf-serverd restart
# Update ?
if [ ${1:-0} -eq 1 ]; then
/etc/init.d/cf-serverd restart
else
:
fi
%endif
%post -n %{libsoname} -p /sbin/ldconfig