[iscsi-initiator-utils: 29/109] fix iscsi shutdown by not shutting down network and have rpm make the var dirs

Chris Leech cleech at fedoraproject.org
Tue Dec 10 21:21:48 UTC 2013


commit baed0f4cd0616bff0b703d43a1cfa57c05cf949b
Author: mchristi <mchristi at redhat.com>
Date:   Fri Oct 6 01:33:11 2006 +0000

    fix iscsi shutdown by not shutting down network and have rpm make the var dirs

 iscsi-initiator-utils.spec |   17 ++++++++++++++++-
 iscsi.init                 |    8 ++++++++
 2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec
index baa1c83..fdb22b0 100644
--- a/iscsi-initiator-utils.spec
+++ b/iscsi-initiator-utils.spec
@@ -1,7 +1,7 @@
 Summary: iSCSI daemon and utility programs
 Name: iscsi-initiator-utils
 Version: 6.2.0.695
-Release: 0.5
+Release: 0.6
 Source0: http://people.redhat.com/mchristi/iscsi/FC6/open-iscsi/rpm/open-iscsi-6.2.0.695.tar.bz2
 Source1: iscsi.init
 Patch0: open-iscsi-5.0.5.595-update-initscripts-and-docs.patch
@@ -44,6 +44,13 @@ mkdir -p $RPM_BUILD_ROOT/sbin
 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
 mkdir -p $RPM_BUILD_ROOT/etc/iscsi
+mkdir -p $RPM_BUILD_ROOT/etc/iscsi
+mkdir -p $RPM_BUILD_ROOT/etc/iscsi
+mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi
+mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/nodes
+mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/send_targets
+mkdir -p $RPM_BUILD_ROOT/var/lock/iscsi
+
 install -s -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart $RPM_BUILD_ROOT/sbin
 install -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
 install -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
@@ -69,12 +76,20 @@ fi
 %files
 %defattr(-,root,root)
 %doc README
+%dir /var/lib/iscsi/nodes
+%dir /var/lib/iscsi/send_targets
+%dir /var/lock/iscsi
 %config /etc/rc.d/init.d/iscsi
 %attr(0600,root,root) %config(noreplace) /etc/iscsi/iscsid.conf
 /sbin/*
 %{_mandir}/*/*
 
 %changelog
+* Thu Oct 5 2006 Mike Christie <mchristie at redhat.com> - 6.2.0.695-0.6
+- BZ 209523 make sure the network is not going to get shutdown so
+iscsi devices (include iscsi root and dm/md over iscsi) get syncd.
+- BZ 209415 have package create iscsi var dirs
+
 * Tue Oct 3 2006 Mike Christie <mchristie at redhat.com> - 6.2.0.695-0.5
 - BZ 208864 move /etc/iscsi/nodes and send_targets to /var/lib/iscsi
 
diff --git a/iscsi.init b/iscsi.init
index 64feae3..5b104ac 100755
--- a/iscsi.init
+++ b/iscsi.init
@@ -16,6 +16,14 @@ RETVAL=0
 
 start()
 {
+	echo -n $"Turning off network shutdown."
+	# we do not want iscsi or network to run during system shutdown
+	# incase there are RAID or multipath devices using
+	# iscsi disks
+	chkconfig --level 06 network off
+	rm /etc/rc0.d/*network
+	rm /etc/rc6.d/*network
+
 	echo -n $"Starting iSCSI initiator service: "
 	modprobe -q iscsi_tcp
 	daemon iscsid


More information about the scm-commits mailing list