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

This commit is contained in:
mchristi 2006-10-06 01:33:11 +00:00
parent e99cc78952
commit baed0f4cd0
2 changed files with 24 additions and 1 deletions

View File

@ -1,7 +1,7 @@
Summary: iSCSI daemon and utility programs Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils Name: iscsi-initiator-utils
Version: 6.2.0.695 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 Source0: http://people.redhat.com/mchristi/iscsi/FC6/open-iscsi/rpm/open-iscsi-6.2.0.695.tar.bz2
Source1: iscsi.init Source1: iscsi.init
Patch0: open-iscsi-5.0.5.595-update-initscripts-and-docs.patch 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}%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d 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/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 -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/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
install -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8 install -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
@ -69,12 +76,20 @@ fi
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc README %doc README
%dir /var/lib/iscsi/nodes
%dir /var/lib/iscsi/send_targets
%dir /var/lock/iscsi
%config /etc/rc.d/init.d/iscsi %config /etc/rc.d/init.d/iscsi
%attr(0600,root,root) %config(noreplace) /etc/iscsi/iscsid.conf %attr(0600,root,root) %config(noreplace) /etc/iscsi/iscsid.conf
/sbin/* /sbin/*
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Thu Oct 5 2006 Mike Christie <mchristie@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@redhat.com> - 6.2.0.695-0.5 * Tue Oct 3 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.5
- BZ 208864 move /etc/iscsi/nodes and send_targets to /var/lib/iscsi - BZ 208864 move /etc/iscsi/nodes and send_targets to /var/lib/iscsi

View File

@ -16,6 +16,14 @@ RETVAL=0
start() 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: " echo -n $"Starting iSCSI initiator service: "
modprobe -q iscsi_tcp modprobe -q iscsi_tcp
daemon iscsid daemon iscsid