From fcbad5080b1418cd98c073d8f0c41ffdf923e4055a7250b78b1e28acab701913 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 25 Jan 2012 18:04:47 +0000 Subject: [PATCH] - Fixed init script packaging OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=11 --- sanlock.changes | 5 +++++ sanlock.spec | 28 +++++++++------------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/sanlock.changes b/sanlock.changes index 58bc65b..61af892 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 25 11:03:43 MST 2012 - jfehlig@suse.com + +- Fixed init script packaging + ------------------------------------------------------------------- Mon Jan 23 11:20:40 MST 2012 - jfehlig@suse.com diff --git a/sanlock.spec b/sanlock.spec index 3760cfe..7cfcc79 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -35,6 +35,7 @@ BuildRequires: libblkid-devel libaio-devel python python-devel BuildRequires: systemd %{?systemd_requires} %endif +Requires(pre): %insserv_prereq %fillup_prereq Requires: %{name}-lib = %{version}-%{release} # Latest version available at # https://fedorahosted.org/releases/s/a/sanlock/ @@ -102,34 +103,23 @@ rm -rf $RPM_BUILD_ROOT %post %if %{with_systemd} %service_add_post wdmd.service sanlock.service -%else -%{fillup_only -n sanlock} %endif +%fillup_only -n sanlock +%restart_on_update wdmd +%restart_on_update sanlock %preun %if %{with_systemd} %service_del_preun wdmd.service sanlock.service -%else -%{stop_on_removal wdmd} -%{stop_on_removal sanlock} %endif -##if [ $1 = 0 ]; then -## /sbin/service sanlock stop > /dev/null 2>&1 -## /sbin/service wdmd stop > /dev/null 2>&1 -## /sbin/chkconfig --del sanlock -## /sbin/chkconfig --del wdmd -##fi +%stop_on_removal wdmd +%stop_on_removal sanlock %postun %if %{with_systemd} %service_del_postun wdmd.service sanlock.service -%else -%restart_on_update wdmd -%restart_on_update sanlock %endif -%{insserv_cleanup} -#/sbin/service sanlock condrestart >/dev/null 2>&1 || : -#/sbin/service wdmd condrestart >/dev/null 2>&1 || : +%insserv_cleanup %files %defattr(-,root,root,-) @@ -172,7 +162,7 @@ access to the shared disks. Provides: sanlock-python Summary: Python bindings for the sanlock library Group: Development/Libraries/Python -Requires: %{name}-lib = %{version}-%{release} +Requires: libsanlock1 = %{version}-%{release} %description -n python-%name The %{name}-python package contains a module that permits applications @@ -187,7 +177,7 @@ supplied by the sanlock library. %package devel Summary: Development files for %{name} Group: Development/Libraries/C and C++ -Requires: %{name}-lib = %{version}-%{release} +Requires: libsanlock1 = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for