[sblim-cmpi-base] Update provider registration script to use systemctl to stop/start sfcb

vcrhonek vcrhonek at fedoraproject.org
Thu Feb 19 12:55:01 UTC 2015


commit bc8ec10d6594abdc602908b67f85cbc00011b201
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Thu Feb 19 13:54:51 2015 +0100

    Update provider registration script to use systemctl to stop/start sfcb

 sblim-cmpi-base-1.6.4-prov-reg-sfcb-systemd.patch | 42 +++++++++++++++++++++++
 sblim-cmpi-base.spec                              | 26 ++++++++------
 2 files changed, 57 insertions(+), 11 deletions(-)
---
diff --git a/sblim-cmpi-base-1.6.4-prov-reg-sfcb-systemd.patch b/sblim-cmpi-base-1.6.4-prov-reg-sfcb-systemd.patch
new file mode 100644
index 0000000..130599b
--- /dev/null
+++ b/sblim-cmpi-base-1.6.4-prov-reg-sfcb-systemd.patch
@@ -0,0 +1,42 @@
+diff -up sblim-cmpi-base-1.6.4/provider-register.sh.orig sblim-cmpi-base-1.6.4/provider-register.sh
+--- sblim-cmpi-base-1.6.4/provider-register.sh.orig	2015-02-19 13:39:18.057255372 +0100
++++ sblim-cmpi-base-1.6.4/provider-register.sh	2015-02-19 13:40:32.471535246 +0100
+@@ -351,20 +351,8 @@ sfcb_rebuild()
+     if ps -C sfcbd > /dev/null 2>&1
+     then
+         # sfcb is running -- need to restart
+-	for INITSCRIPT in /etc/init.d/sfcb /usr/local/etc/init.d/sfcb none
+-	do
+-	  if test -x $INITSCRIPT
+-	  then
+-	      break;
+-	  fi
+-	done
+ 	chatter "Shutting down sfcb."
+-	if test $INITSCRIPT = none
+-	then
+-	    killall sfcbd
+-	else
+-	    $INITSCRIPT stop
+-	fi
++	systemctl stop sblim-sfcb
+ 	t=0
+ 	while ps -C sfcbd > /dev/null 2>&1
+ 	do
+@@ -385,14 +373,8 @@ sfcb_rebuild()
+ 	    return 1
+ 	fi
+ 	
+-	if test $INITSCRIPT = none
+-	then
+-	    echo "No init script found - you need to start sfcbd manually." >&2
+-	    return 1
+-	else
+-	    chatter "Restarting sfcb."
+-	    $INITSCRIPT start
+-	fi
++	chatter "Restarting sfcb."
++	systemctl start sblim-sfcb
+     else
+ 	# Not running - rebuild repository
+ 	chatter "Rebuilding repository."
diff --git a/sblim-cmpi-base.spec b/sblim-cmpi-base.spec
index 82edff1..ab76a27 100644
--- a/sblim-cmpi-base.spec
+++ b/sblim-cmpi-base.spec
@@ -1,6 +1,6 @@
 Name:           sblim-cmpi-base
 Version:        1.6.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        SBLIM CMPI Base Providers
 
 Group:          Applications/System
@@ -9,12 +9,13 @@ URL:            http://sblim.wiki.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
 Patch0:         sblim-cmpi-base-1.6.0-missing-fclose.patch
 Patch1:         sblim-cmpi-base-1.6.0-methods-enable.patch
-Patch2:         sblim-cmpi-base-1.6.0-provider-register-sfcb-init.patch
-Patch3:         sblim-cmpi-base-1.6.1-double-fclose.patch
-# Patch4: removes version from docdir
-Patch4:         sblim-cmpi-base-1.6.2-docdir.patch
-# Patch5: use Pegasus root/interop instead of root/PG_Interop
-Patch5:         sblim-cmpi-base-1.6.2-pegasus-interop.patch
+Patch2:         sblim-cmpi-base-1.6.1-double-fclose.patch
+# Patch3: removes version from docdir
+Patch3:         sblim-cmpi-base-1.6.2-docdir.patch
+# Patch4: use Pegasus root/interop instead of root/PG_Interop
+Patch4:         sblim-cmpi-base-1.6.2-pegasus-interop.patch
+# Patch5: call systemctl in provider registration
+Patch5:         sblim-cmpi-base-1.6.4-prov-reg-sfcb-systemd.patch
 Requires:       cim-server sblim-indication_helper
 BuildRequires:  sblim-cmpi-devel sblim-indication_helper-devel
 BuildRequires:  autoconf automake libtool pkgconfig
@@ -51,10 +52,10 @@ Testcase Files for the SBLIM Testsuite.
 autoreconf --install --force
 %patch0 -p0 -b .missing-fclose
 %patch1 -p0 -b .methods-enable
-%patch2 -p1 -b .provider-register-sfcb-init
-%patch3 -p1 -b .double-fclose
-%patch4 -p1 -b .docdir
-%patch5 -p1 -b .pegasus-interop
+%patch2 -p1 -b .double-fclose
+%patch3 -p1 -b .docdir
+%patch4 -p1 -b .pegasus-interop
+%patch5 -p1 -b .prov-reg-sfcb-systemd
 
 %build
 %configure TESTSUITEDIR=%{_datadir}/sblim-testsuite --disable-static
@@ -183,6 +184,9 @@ fi
 %postun -p /sbin/ldconfig
 
 %changelog
+* Thu Feb 19 2015 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.6.4-2
+- Update provider registration script to use systemctl to stop/start sfcb
+
 * Wed Oct 29 2014 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.6.4-1
 - Update to sblim-cmpi-base-1.6.4
 


More information about the scm-commits mailing list