SPECS: multipath-tools.spec - add initscript - add %pre and %post ...

glen glen at pld-linux.org
Thu Oct 18 18:22:03 CEST 2007


Author: glen                         Date: Thu Oct 18 16:22:03 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add initscript
- add %pre and %post scripts to stop multipathd during update (novell bug #229950)

---- Files affected:
SPECS:
   multipath-tools.spec (1.28 -> 1.29) 

---- Diffs:

================================================================
Index: SPECS/multipath-tools.spec
diff -u SPECS/multipath-tools.spec:1.28 SPECS/multipath-tools.spec:1.29
--- SPECS/multipath-tools.spec:1.28	Tue Oct 16 17:41:54 2007
+++ SPECS/multipath-tools.spec	Thu Oct 18 18:21:58 2007
@@ -3,7 +3,7 @@
 Summary(pl.UTF-8):	Implementacja wielotrasowego dostępu do zasobów przy użyciu device-mappera
 Name:		multipath-tools
 Version:	0.4.8
-Release:	0.1
+Release:	0.2
 License:	GPL v2
 Group:		Base
 Source0:	http://christophe.varoqui.free.fr/multipath-tools/%{name}-%{version}.tar.bz2
@@ -12,6 +12,7 @@
 Patch0:		%{name}-llh.patch
 # was not used - is OPTIONS+="last_rule" stille needed?
 #Patch1:		%{name}-udev.patch
+Source1:	multipathd.init
 BuildRequires:	device-mapper-devel >= 1.02.07
 BuildRequires:	libaio-devel
 BuildRequires:	linux-libc-headers >= 2.6.12.0-5
@@ -63,6 +64,7 @@
 	DESTDIR=$RPM_BUILD_ROOT
 
 install -D multipath.conf.annotated $RPM_BUILD_ROOT%{_sysconfdir}/multipath.conf
+install -d %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/multipathd
 install -d $RPM_BUILD_ROOT/var/lib/multipath
 mv $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/{,40-}multipath.rules
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/dev.d/block/multipath.dev
@@ -70,6 +72,16 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -f /etc/rc.d/init.d/multipathd ] && dmsetup table | grep -q multipath; then
+	service multipathd stop
+fi
+
+%post
+if dmsetup table | grep -q multipath; then
+	service multipathd start
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHOR ChangeLog FAQ README* TODO
@@ -85,6 +97,7 @@
 %attr(755,root,root) %{_sbindir}/mpath_prio_rdac
 %attr(755,root,root) %{_sbindir}/multipath
 %attr(755,root,root) %{_sbindir}/multipathd
+%attr(754,root,root) /etc/rc.d/init.d/multipathd
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/multipath.conf
 %{_sysconfdir}/udev/rules.d/40-multipath.rules
 %{_sysconfdir}/udev/rules.d/kpartx.rules
@@ -103,6 +116,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.29  2007/10/18 16:21:58  glen
+- add initscript
+- add %pre and %post scripts to stop multipathd during update (novell bug #229950)
+
 Revision 1.28  2007/10/16 15:41:54  glen
 - device-mapper-devel >= 1.02.07 for dm_task_skip_lockfs symbol
 - /lib/udev is the installed path on amd64
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/multipath-tools.spec?r1=1.28&r2=1.29&f=u



More information about the pld-cvs-commit mailing list