- Fixed init script packaging

OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=11
This commit is contained in:
James Fehlig 2012-01-25 18:04:47 +00:00 committed by Git OBS Bridge
parent 8876b30f89
commit fcbad5080b
2 changed files with 14 additions and 19 deletions

View File

@ -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

View File

@ -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