[iscsi-initiator-utils: 2/109] auto-import changelog data from iscsi-initiator-utils-3.6.0.2-0.1.src.rpm * Wed Jul 14 2004 AJ Lewis
Chris Leech
cleech at fedoraproject.org
Tue Dec 10 21:19:32 UTC 2013
commit a653f5fb898053b41a348709b313e13af21592cd
Author: cvsdist <cvsdist at redhat.com>
Date: Thu Sep 9 06:23:12 2004 +0000
auto-import changelog data from iscsi-initiator-utils-3.6.0.2-0.1.src.rpm
* Wed Jul 14 2004 AJ Lewis <alewis at redhat.com> 3.6.0.2-0.1
- update to 3.6.0.2 upstream
- add iscsi-ls to installed binaries
- add iscsi-ls.1 manpage to man1
- remove /dev/iscsi reference (no longer used)
* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt
* Thu Jun 05 2003 Elliot Lee <sopwith at redhat.com>
- rebuilt
* Mon Feb 03 2003 Michael K. Johnson <johnsonm at redhat.com> 3.1.0.3-3
- rebuild, 3.1.0.3-3
* Mon Nov 11 2002 Michael K. Johnson <johnsonm at redhat.com>
- Fixed typo in initscript to allow to function
* Thu Oct 17 2002 Michael K. Johnson <johnsonm at redhat.com>
- update to 3.1.0.3 for draft 16 compliance
- /etc/initiatorname.iscsi should be mode 600
- C++ all gone, no need for libstdc++ static link
* Wed Aug 14 2002 Bob Matthews <bmatthews at redhat.com>
- fix perms on /etc/iscsi.conf
* Mon Jul 15 2002 Michael K. Johnson <johnsonm at redhat.com>
- add status function
* Thu May 02 2002 Michael K. Johnson <johnsonm at redhat.com>
- hack to link statically against libstdc++ so /sbin does not depend on /usr
* Wed Apr 10 2002 Michael K. Johnson <johnsonm at redhat.com>
- update to 2.1.0.20
* Fri Oct 26 2001 Than Ngo <than at redhat.com> 2.0.1.8-3
- cleanup startup script
- add excludearch s390 s390x
* Tue Aug 28 2001 Michael K. Johnson <johnsonm at redhat.com>
- clean up shutdown (#52440)
* Mon Aug 13 2001 Michael K. Johnson <johnsonm at redhat.com>
- update to 2.0.1.8 for draft 6 compliance
* Mon Aug 13 2001 Bob Matthews <bmatthews at redhat.com>
- fix typo in initscripts (#51585)
* Tue Jul 31 2001 Bill Nottingham <notting at redhat.com>
- fix up initscript output (#50502)
* Wed Jul 25 2001 Jeremy Katz <katzj at redhat.com>
- source /etc/init.d/functions in the initscript
* Tue Jul 24 2001 Michael K. Johnson <johnsonm at redhat.com>
- initial packaging
.cvsignore | 1 +
iscsi-initiator-utils.spec | 130 ++++
linux-iscsi-3.6.0.2-redhatify.patch | 1191 +++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 1323 insertions(+), 0 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
index e69de29..8f4daa8 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -0,0 +1 @@
+linux-iscsi-3.6.0.2.tgz
diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec
new file mode 100644
index 0000000..e67cb79
--- /dev/null
+++ b/iscsi-initiator-utils.spec
@@ -0,0 +1,130 @@
+Summary: iSCSI daemon and utility programs
+Name: iscsi-initiator-utils
+Version: 3.6.0.2
+Release: 0.1
+Source0: http://prdownloads.sourceforge.net/linux-iscsi/linux-iscsi-%{version}.tgz
+Patch0: linux-iscsi-3.6.0.2-redhatify.patch
+Group: System Environment/Daemons
+License: GPL
+URL: http://linux-iscsi.sourceforge.net/
+Buildroot: %{_tmppath}/%{name}-root
+Requires: kernel >= 2.4.21-15.0.3.EL
+Prereq: /sbin/chkconfig
+ExcludeArch: s390 s390x
+Obsoletes: iscsi
+
+%description
+The iscsi package provides the server daemon for the iSCSI protocol,
+as well as the utility programs used to manage it. iSCSI is a protocol
+for distributed disk access using SCSI commands sent over Internet
+Protocol networks.
+
+%prep
+%setup -q -n %{name}-%{version} -c
+cd linux-iscsi-%{version}
+%patch0 -p1 -b .redhatify
+
+%build
+cd linux-iscsi-%{version}
+make daemons utils
+
+%install
+cd linux-iscsi-%{version}
+
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT{/sbin,/usr/sbin,/dev/iscsi}
+mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/{man1,man5,man8}
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -s -m 755 iscsid iscsi-device iscsi-iname iscsi-ls $RPM_BUILD_ROOT/sbin
+# iscsigt I think is development-use-only, and the scripts
+# should not be needed in a complete integration
+install -s -m 755 iscsi-device $RPM_BUILD_ROOT/usr/sbin
+# iscsi-mountall is not necessary because we're using _netdev in /etc/fstab
+install -m 755 iscsi-umountall $RPM_BUILD_ROOT/sbin
+install -m 644 iscsi-ls.1 $RPM_BUILD_ROOT/%{_mandir}/man1
+install -m 644 iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
+install -m 644 iscsi.conf.5 $RPM_BUILD_ROOT/%{_mandir}/man5
+install -m 755 rc.iscsi $RPM_BUILD_ROOT/etc/rc.d/init.d/iscsi
+install -m 644 iscsi.conf $RPM_BUILD_ROOT/etc
+echo 'GenerateName=yes' > initiatorname.iscsi
+install -m 600 initiatorname.iscsi $RPM_BUILD_ROOT/etc
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add iscsi
+
+%preun
+if [ "$1" = "0" ]; then
+ /sbin/chkconfig --del iscsi
+fi
+
+
+%files
+%defattr(-,root,root)
+%config /etc/rc.d/init.d/iscsi
+%attr(600,root,root) %config(noreplace) /etc/initiatorname.iscsi
+%attr(600,root,root) %config(noreplace) /etc/iscsi.conf
+%doc linux-iscsi-%{version}/README
+/sbin/*
+/usr/sbin/*
+%{_mandir}/*/*
+
+%changelog
+* Wed Jul 14 2004 AJ Lewis <alewis at redhat.com> 3.6.0.2-0.1
+- update to 3.6.0.2 upstream
+- add iscsi-ls to installed binaries
+- add iscsi-ls.1 manpage to man1
+- remove /dev/iscsi reference (no longer used)
+
+* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
+- rebuilt
+
+* Thu Jun 05 2003 Elliot Lee <sopwith at redhat.com>
+- rebuilt
+
+* Mon Feb 03 2003 Michael K. Johnson <johnsonm at redhat.com> 3.1.0.3-3
+- rebuild, 3.1.0.3-3
+
+* Mon Nov 11 2002 Michael K. Johnson <johnsonm at redhat.com>
+- Fixed typo in initscript to allow to function
+
+* Thu Oct 17 2002 Michael K. Johnson <johnsonm at redhat.com>
+- update to 3.1.0.3 for draft 16 compliance
+- /etc/initiatorname.iscsi should be mode 600
+- C++ all gone, no need for libstdc++ static link
+
+* Wed Aug 14 2002 Bob Matthews <bmatthews at redhat.com>
+- fix perms on /etc/iscsi.conf
+
+* Mon Jul 15 2002 Michael K. Johnson <johnsonm at redhat.com>
+- add status function
+
+* Thu May 02 2002 Michael K. Johnson <johnsonm at redhat.com>
+- hack to link statically against libstdc++ so /sbin does not depend on /usr
+
+* Wed Apr 10 2002 Michael K. Johnson <johnsonm at redhat.com>
+- update to 2.1.0.20
+
+* Fri Oct 26 2001 Than Ngo <than at redhat.com> 2.0.1.8-3
+- cleanup startup script
+- add excludearch s390 s390x
+
+* Tue Aug 28 2001 Michael K. Johnson <johnsonm at redhat.com>
+- clean up shutdown (#52440)
+
+* Mon Aug 13 2001 Michael K. Johnson <johnsonm at redhat.com>
+- update to 2.0.1.8 for draft 6 compliance
+
+* Mon Aug 13 2001 Bob Matthews <bmatthews at redhat.com>
+- fix typo in initscripts (#51585)
+
+* Tue Jul 31 2001 Bill Nottingham <notting at redhat.com>
+- fix up initscript output (#50502)
+
+* Wed Jul 25 2001 Jeremy Katz <katzj at redhat.com>
+- source /etc/init.d/functions in the initscript
+
+* Tue Jul 24 2001 Michael K. Johnson <johnsonm at redhat.com>
+- initial packaging
diff --git a/linux-iscsi-3.6.0.2-redhatify.patch b/linux-iscsi-3.6.0.2-redhatify.patch
new file mode 100644
index 0000000..c29e4f0
--- /dev/null
+++ b/linux-iscsi-3.6.0.2-redhatify.patch
@@ -0,0 +1,1191 @@
+diff -Nurp linux-iscsi-3.6.0.2.old/Makefile linux-iscsi-3.6.0.2/Makefile
+--- linux-iscsi-3.6.0.2.old/Makefile 2004-06-18 14:41:28.000000000 -0500
++++ linux-iscsi-3.6.0.2/Makefile 2004-07-19 16:23:07.394829165 -0500
+@@ -33,247 +33,6 @@ export ROOT
+ BASEDIR:=/
+ export BASEDIR
+
+-# We need to have the kernel headers installed in order to compile.
+-# You can specify a TOPDIR for your Linux kernel here, or if you don't
+-# we'll look for it in a few likely places later.
+-TOPDIR:=
+-
+-# We also need the pathname of the kernel .config file to use.
+-# You can specify a .config for your Linux kernel here, or if you don't
+-# we'll look for it in a few likely places later.
+-KERNEL_CONFIG:=
+-
+-# The rest of this Makefile shouldn't need to be modified
+-
+-# record the version of the running kernel
+-KERNEL_VPSE:=$(shell uname -r)
+-KERNEL_VPS:=$(shell uname -r | sed -e 's|^\([0-9]\+\.[0-9]\+\.[0-9]\+\).*|\1|')
+-KERNEL_VP:=$(shell uname -r | awk -F. '{ print $$1 "." $$2}')
+-
+-# Try to find the top of the Linux kernel source tree for the running kernel
+-ifeq ($(TOPDIR),)
+- ifeq ($(wildcard /usr/src/linux/.),/usr/src/linux/.)
+- TOPDIR:=/usr/src/linux
+- endif
+- # linux-v.p
+- ifeq ($(wildcard /usr/src/linux-$(KERNEL_VP)/.),/usr/src/linux-$(KERNEL_VP)/.)
+- TOPDIR:=/usr/src/linux-$(KERNEL_VP)
+- endif
+- # linux-v.p.s
+- ifeq ($(wildcard /usr/src/linux-$(KERNEL_VPS)/.),/usr/src/linux-$(KERNEL_VPS)/.)
+- TOPDIR:=/usr/src/linux-$(KERNEL_VPS)
+- endif
+- # linux-v.p.s-e
+- ifeq ($(wildcard /usr/src/linux-$(KERNEL_VPSE)/.),/usr/src/linux-$(KERNEL_VPSE)/.)
+- TOPDIR:=/usr/src/linux-$(KERNEL_VPSE)
+- endif
+- # Linus has recommended a symlink /lib/modules/`uname -r`/build
+- ifeq ($(wildcard /lib/modules/$(KERNEL_VPSE)/build/.),/lib/modules/$(KERNEL_VPSE)/build/.)
+- TOPDIR:=/lib/modules/$(KERNEL_VPSE)/build
+- endif
+- ifeq ($(TOPDIR),)
+- $(warning Linux kernel source must be installed to compile this code.)
+- $(error Could not find the top of the linux kernel source tree.)
+- endif
+-endif
+-
+-# record the kernel source version
+-KERNEL_VERSION:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "VERSION" { print $$2 }' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
+-KERNEL_PATCHLEVEL:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "PATCHLEVEL" {print $$2 }' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
+-KERNEL_SUBLEVEL:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "SUBLEVEL" {print $$2 }' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
+-KERNEL_EXTRAVERSION:=$(shell awk -F"[ \t]*=[ \t]*" '$$1 == "EXTRAVERSION" {print $$2 }' $(TOPDIR)/Makefile | sed -e 's/[ \t\n]*//g')
+-KERNEL_SRC_VPS:=$(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)
+-KERNEL_SRC_VPSE:=$(KERNEL_VERSION).$(KERNEL_PATCHLEVEL).$(KERNEL_SUBLEVEL)$(KERNEL_EXTRAVERSION)
+-
+-# by default, use the VPSE from the kernel source for warning comparisons.
+-SOURCE_KERNEL_VERSION:=$(KERNEL_SRC_VPSE)
+-
+-# FIXME: would it be better to extract KERNELRELEASE from the kernel Makefile?
+-# Some distributions (e.g. SuSE) append other strings after EXTAVERSION, which
+-# can mess up some of our comparisions unless we compensate for it somehow.
+-# Extracting KERNELRELEASE via make is probably more reliable than scanning
+-# the Makefile with grep and awk.
+-
+-# by default, use the whole `uname -r` string for comparisons
+-RUNNING_KERNEL_VERSION:=$(KERNEL_VPSE)
+-
+-# SuSE may append some strings to the kernel version for SMP and HIGHMEM
+-# we want to strip these suffixes off of the `uname -r` string before
+-# doing comparisons against it.
+-SUSE_SUFFIXES:=$(shell grep '^[ \t]*SMPVERSION=[^ \t\n]' $(TOPDIR)/Makefile | awk -F= '{print $$2}') \
+- $(shell grep '^[ \t]*HIGHMEMVERSION=[^ \t\n]' $(TOPDIR)/Makefile | awk -F= '{print $$2}')
+-
+-ifneq ($(SUSE_SUFFIXES),)
+- # FIXME: if we could side-effect a variable within a foreach loop, that
+- # would be preferable. For now, hardcode the suffixes.
+-
+- # strip off the suffixes SuSE might have added to KERNELRELEASE
+- ifeq ($(shell printf "$(RUNNING_KERNEL_VERSION)" | tail -c 4),-SMP)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(RUNNING_KERNEL_VERSION)" | sed -e 's/-SMP$$//')
+- endif
+- ifeq ($(shell printf "$(RUNNING_KERNEL_VERSION)" | tail -c 4),-4GB)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(RUNNING_KERNEL_VERSION)" | sed -e 's/-4GB$$//')
+- endif
+- ifeq ($(shell printf "$(RUNNING_KERNEL_VERSION)" | tail -c 5),-64GB)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(RUNNING_KERNEL_VERSION)" | sed -e 's/-64GB$$//')
+- endif
+-
+- # SuSE tends to allow only one kernel binary to be installed,
+- # and keeps the config in /boot as well.
+- ifeq ($(wildcard /boot/vmlinuz.config),/boot/vmlinuz.config)
+- KERNEL_CONFIG:=/boot/vmlinuz.config
+- endif
+-
+- # FIXME: if /boot/vmlinuz.version.h and /boot/vmlinuz.autoconf.h don't match
+- # what is in TOPDIR/include/linux/, the user may have forgotten to
+- # copy the files. Ask if we should copy the files for the user.
+- # Copy by default, since that is what is most likely to work for
+- # people who don't understand the question. Users for whom that
+- # is wrong hopefully know how to regenerate the files with
+- # `make menuconfig`.
+-
+-endif
+-
+-# Try to find the kernel's config if the user didn't tell us where to find it.
+-# People who compile their own kernels will have a .config, as will some
+-# distributions that only ship one kernel binary, or that use separate
+-# kernel source for each kernel binary. Redhat uses the same kernel source
+-# for multiple kernel binaries.
+-
+-# special handling for Redhat, so that we can do better checking of kernel
+-# source mismatches with the running kernel, and can try to find the
+-# right kernel config file when there is no config file in /boot.
+-# Redhat Advanced Server kernel RPMs don't copy the appropriate config file
+-# to /boot/config-`uname -r`, so we have to try to guess which config file
+-# in $(TOPDIR)/configs might match the running kernel. Sadly there's no
+-# direct mapping from the uname output to the filename, so this gets ugly.
+-# We assume that some part of the EXTRAVERSION suffix will let us pick the
+-# right config file name. This breaks whenever Redhat adds a new kernel
+-# type, and may break if they change the way they encode their version
+-# in the kernel's EXTRAVERSION. It also breaks if they ever get rid
+-# of rhconfig.h, which is how we currently detect Redhat kernel source.
+-ifeq ($(wildcard $(TOPDIR)/include/linux/rhconfig.h),$(TOPDIR)/include/linux/rhconfig.h)
+- # try to strip the type suffix off of the kernel source VPSE, so that we
+- # can check for version mismatches later without getting false positives
+- # because of the kernel type suffix.
+- # As of 12/17/2002, known Redhat kernel types are: (empty), debug, BOOT, smp, enterprise, summit, bigmem, uml
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 6),custom)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/custom$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 5),cusom)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/cusom$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 5),debug)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/debug$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 4),BOOT)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/BOOT$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 3),smp)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/smp$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 10),enterprise)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/enterprise$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 9),enerprise)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/enerprise$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 6),summit)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/summit$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 5),summi)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/summi$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 6),bigmem)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/bigmem$$//')
+- endif
+- ifeq ($(shell printf "$(KERNEL_SRC_VPSE)" | tail -c 3),uml)
+- SOURCE_KERNEL_VERSION:=$(shell printf "$(KERNEL_SRC_VPSE)" | sed -e 's/uml$$//')
+- endif
+-
+- # determine the running Redhat kernel version (without the type suffix)
+- REDHAT_KERNEL_TYPE:=
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 6),custom)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/custom$$//')
+- REDHAT_KERNEL_TYPE:=-custom
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 5),cusom)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/cusom$$//')
+- REDHAT_KERNEL_TYPE:=-custom
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 5),debug)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/debug$$//')
+- REDHAT_KERNEL_TYPE:=-debug
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 4),BOOT)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/BOOT$$//')
+- REDHAT_KERNEL_TYPE:=-BOOT
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 3),smp)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/smp$$//')
+- REDHAT_KERNEL_TYPE:=-smp
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 10),enterprise)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/enterprise$$//')
+- REDHAT_KERNEL_TYPE:=-enterprise
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 9),enerprise)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/enerprise$$//')
+- REDHAT_KERNEL_TYPE:=-enterprise
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 6),summit)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/summit$$//')
+- REDHAT_KERNEL_TYPE:=-summit
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 5),summi)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/summi$$//')
+- REDHAT_KERNEL_TYPE:=-summit
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 6),bigmem)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/bigmem$$//')
+- REDHAT_KERNEL_TYPE:=-bigmem
+- endif
+- ifeq ($(shell printf "$(KERNEL_VPSE)" | tail -c 3),uml)
+- RUNNING_KERNEL_VERSION:=$(shell printf "$(KERNEL_VPSE)" | sed -e 's/uml$$//')
+- REDHAT_KERNEL_TYPE:=-uml
+- endif
+-
+- # Look for a Redhat config file that might be appropriate.
+- ifeq ($(wildcard $(TOPDIR)/configs/.),$(TOPDIR)/configs/.)
+- # we deliberately use the running kernel version next, so that we ignore
+- # all of these config files if the running kernel version doesn't match
+- # the source kernel version.
+- POSSIBLE_CONFIG:=$(TOPDIR)/configs/kernel-$(KERNEL_VPS)-$(shell uname -m)$(REDHAT_KERNEL_TYPE).config
+- ifeq ($(wildcard $(POSSIBLE_CONFIG)),$(POSSIBLE_CONFIG))
+- KERNEL_CONFIG:=$(POSSIBLE_CONFIG)
+- endif
+- endif
+-endif
+-
+-# some versions of Redhat make it easy, and put the file /boot
+-ifeq ($(wildcard /boot/config-$(KERNEL_VPSE)),/boot/config-$(KERNEL_VPSE))
+- KERNEL_CONFIG:=/boot/config-$(KERNEL_VPSE)
+-endif
+-
+-# some kernels build the config into the kernel image itself, and make
+-# it available in /proc/config.gz. If the kernel source looks like
+-# it matches the running kernel, use /proc/config.gz.
+-ifeq ($(wildcard /proc/config.gz),/proc/config.gz)
+- ifeq ($(KERNEL_SRC_VPSE),$(KERNEL_VPSE))
+- # FIXME: uncompress the config someplace and use it
+- endif
+-endif
+-
+-# the standard config file location is $(TOPDIR)/.config
+-ifeq ($(wildcard $(TOPDIR)/.config),$(TOPDIR)/.config)
+- KERNEL_CONFIG:=$(TOPDIR)/.config
+- # If there's a .config file, the user has configured a custom kernel,
+- # so we want to ignore any other config files found earlier, and
+- # check the entire EXTRAVERSION string for version mismatches.
+- SOURCE_KERNEL_VERSION:=$(KERNEL_SRC_VPSE)
+-endif
+-
+-
+ # for compiling the daemon and utils
+ CC:=gcc
+ CFLAGS:= -Wall -Wstrict-prototypes -O2 -DLINUX=1
+@@ -293,7 +52,7 @@ CFLAGS += -g -DDEBUG
+ LDFLAGS += -g
+ ISCSIMODFLAGS += -DDEBUG=1
+ else
+-OBJDIR:=$(OBJ)/$(OS)-$(ARCH)/obj
++OBJDIR:=.
+ KOBJDIR:=$(OBJ)/$(OS)-$(ARCH)/kobj
+ CLEANDIRS:=$(OBJ)/$(OS)-$(ARCH)/dbg-obj $(OBJ)/$(OS)-$(ARCH)/dbg-kobj
+ CFLAGS += -fomit-frame-pointer
+@@ -617,6 +376,6 @@ permissions:
+ @chmod 744 iscsi-umountall
+
+ clean:
+- rm -rf $(OBJDIR) $(KOBJDIR) $(CLEANDIRS) *.d *.dep
++ rm -rf $(KOBJDIR) $(CLEANDIRS) *.d *.dep
+
+
+diff -Nurp linux-iscsi-3.6.0.2.old/README linux-iscsi-3.6.0.2/README
+--- linux-iscsi-3.6.0.2.old/README 2004-06-18 14:41:28.000000000 -0500
++++ linux-iscsi-3.6.0.2/README 2004-07-19 16:23:56.110854064 -0500
+@@ -26,8 +26,6 @@ CONTENTS
+
+ Product Overview
+ Product Features
+- Before Installing The Driver
+- Installing And Removing The Driver
+ Configuring And Using The Driver
+ GPL License
+
+@@ -165,385 +163,6 @@ PRODUCT FEATURES
+
+
+ ===============================================================================
+-BEFORE INSTALLING THE DRIVER
+-===============================================================================
+-
+- The iSCSI driver, README file, and example configuration files are
+- available on the Linux-iSCSI project homepage at:
+-
+- http://linux-iscsi.sourceforge.net
+-
+- In addition, at the website you can get information about the availability
+- of new drivers, updated drivers, driver compatibility, and other relevant
+- information.
+-
+-
+-===============================================================================
+-INSTALLING AND REMOVING THE DRIVER
+-===============================================================================
+-
+- This section describes the procedures for installing and removing the
+- iSCSI Driver covering the following topics:
+-
+- System Requirements
+- Tested Hardware and Software
+- Installation Procedure
+- Removal Procedure
+- Driver Upgrade Procedure
+-
+-
+--------------------
+-SYSTEM REQUIREMENTS
+--------------------
+-
+- The 3.x iSCSI Driver for Linux requires a host running the Linux operating
+- system with a kernel version of 2.4.20 or later. Versions older than 2.4.20
+- contain a variety of bugs that are described later in this section.
+- Compilation will require the kernel header files matching the kernel version
+- you wish to run the driver on.
+-
+- If you are running a kernel binary compiled for you by a Linux vendor,
+- the iSCSI driver must be compiled against the source code distributed
+- by the Linux vendor, without any modifications. The process of compiling
+- a custom kernel from source makes modifications to the files in the
+- kernel source tree, and an iSCSI driver compiled against a modified
+- kernel source tree may not run on a kernel binary distributed by your
+- Linux vendor. If you have already made changes to the kernel source
+- tree and you wish to run the iSCSI driver on one of the vendor's kernel
+- binaries, you will need to reinstall the kernel source code provided
+- by your Linux vendor.
+-
+- Kernels released after the release date of this driver may not work
+- with this driver, depending on what if any changes have been made to
+- the kernel's SCSI mid-layer code.
+-
+- There are several issues with the Linux kernel code that can cause
+- problems when using SCSI devices (including iSCSI devices). Linux
+- kernels released after this date may or may not have fixed these
+- problems.
+-
+- - Linux kernels have a known bug in the buffer and page cache design.
+- When any writes to a buffered block device fail, it is possible for
+- the unwritten data to be discarded from the caches, even though the
+- data was never written to disk. Any future reads will get the prior
+- contents of the disk, and it is possible for applications to get no
+- errors reported.
+-
+- This occurs because block I/O write failures from the buffer
+- cache simply mark the buffer invalid when the write fails. This
+- leaves the buffer marked clean and invalid, and it may be
+- discarded from the cache at any time. Any future read either
+- finds no existing buffer or finds the invalid buffer, so the
+- read will fetch old data from disk and place it in the cache.
+-
+- If the fsync(2) function initiated the write, an error may be
+- returned. If memory pressure on the cache initiated the write,
+- the unwritten buffer may be discarded before fsync(2) is ever
+- called, and in that case fsync will be unaware of the data loss,
+- and will incorrectly report success.
+-
+- There is currently no reliable way for an application to ensure
+- that data written to buffered block devices has actually been
+- written to disk. Buffered data may be lost whenever a buffered
+- block I/O device fails a write.
+-
+- The iSCSI driver attempts to avoid this problem by retrying disk
+- commands for many types of failures. The DiskCommandTimeout defaults
+- to "infinite", which disables the command timeout, allowing commands
+- to be retried forever if the storage device is unreachable or
+- unresponsive.
+-
+- - The Redhat Advanced Server 2.1 kernels released as of January 29,
+- 2003 have a kernel bug that can cause umount to oops. See bugs
+- <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=74054>
+- and <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=66251>
+- for more details. Please contact Redhat and request a kernel
+- update if you encounter this problem.
+-
+- - All Linux kernels up to and including 2.4.20 have a bug in the
+- SCSI device initialization code. If kernel memory is low, the
+- initialization code can fail to allocate command blocks needed
+- for proper operation, but will do nothing to prevent I/O from
+- being queued to the non-functional device. If a process queues
+- an I/O request to a SCSI device that has no command blocks
+- allocated, that process will block forever in the kernel, never
+- exiting and ignoring all signals sent to it while blocked.
+-
+- If the LUN probes initiated by the iSCSI driver are blocked
+- forever by this problem, it will not be possible to stop or
+- unload the iSCSI driver, since the driver code will still
+- be in use. In addition, any other LUN probes initiated by
+- the iSCSI driver will also block, since any other probes will
+- block waiting for the probe currently in progress to finish.
+-
+- When the failure to allocate command blocks occurs, the kernel
+- will log a message similar to the following:
+-
+- ***************************************************************
+- kernel: scsi_build_commandblocks: want=12, space for=0 blocks
+-
+- In some cases, the following message will also be logged:
+-
+- kernel: scan_scsis: DANGER, no command blocks
+- ***************************************************************
+-
+- - Linux kernels 2.2.16 through 2.2.20 and 2.4.0 through 2.4.18 are known
+- to have a problem in the SCSI error recovery process. In some cases, a
+- successful device reset may be ignored and the SCSI layer will continue
+- on to the later stages of the error recovery process.
+-
+- The problem occurs when multiple SCSI commands for a particular device
+- are queued in the low-level SCSI driver when a device reset occurs. Even
+- if the low-level driver correctly reports that all the commands for
+- the device have been completed by the reset, Linux will assume only
+- one command has been completed and continue the error recovery
+- process. (If only one command has timed out or failed, Linux will
+- correctly terminate the error recovery process following
+- the device reset.)
+-
+- This action is undesirable because the later stages of error recovery
+- may send other types of resets, which can affect other SCSI
+- initiators using the same target or other targets on the same
+- bus. It is also undesirable because there are more serious bugs
+- in the later stages of the Linux SCSI error recovery process.
+-
+- The Linux iSCSI driver now attempts to avoid this problem by
+- replacing the usual error recovery handler for SCSI commands
+- that timeout or fail.
+-
+- - Linux kernels 2.2.16 through 2.2.20 and 2.4.0 through 2.4.2 may take
+- SCSI devices offline after Linux issues a reset as part of the
+- error recovery process. Taking a device offline causes all I/O to the
+- device to fail until the HBA driver is reloaded.
+-
+- After the error recovery process does a reset, it sends a SCSI
+- Test Unit Ready command to check if the SCSI target is operational
+- again. If this command returns SCSI sense data, instead of correctly
+- retrying the command, Linux will treat it as a fatal error, and
+- immediately take the SCSI device offline.
+-
+- The Test Unit Ready will almost always be returned with sense data
+- because most targets return a deferred error in the sense data of the
+- first command received after a reset. This is a way of telling
+- the initiator that a reset has occurred. Therefore, the affected
+- Linux kernel versions almost always take a SCSI device offline
+- after a reset occurs.
+-
+- This bug is fixed in Linux kernels 2.4.3 and later.
+-
+- The Linux iSCSI driver now attempts to avoid this problem by
+- replacing the usual error recovery handler for SCSI commands
+- that timeout or fail.
+-
+- - Linux kernels 2.2.16 through 2.2.21 and 2.4.0 through 2.4.20 appear to
+- have problems when SCSI commands to disk devices are completed
+- with a check condition/unit attention containing deferred sense
+- data. This can result in applications receiving I/O errors,
+- short reads or short writes.
+- The Linux SCSI code may deal with the error by giving up reading
+- or writing the first buffer head of a command, and retrying the
+- remainder of the I/O.
+-
+- The Linux iSCSI driver attempts to avoid this problem by
+- translating deferred sense data to current sense data for commands
+- sent to disk devices.
+-
+- - Linux kernels 2.2.16 through 2.2.21 and 2.4.0 through 2.4.20 may crash
+- on a NULL pointer if a SCSI device is taken offline while one of the
+- Linux kernel's I/O daemons (e.g. kpiod, kflushd, etc.) is trying to do
+- I/O to the SCSI device. The exact cause of this problem is still being
+- investigated.
+-
+- Note that some of the other bugs in the Linux kernel's error recovery
+- handling may result in a SCSI device being taken offline, thus
+- triggering this bug and resulting in a Linux kernel crash.
+-
+- - Linux kernels 2.2.16 through 2.2.21 running on uniprocessors may
+- hang if a SCSI disk device node is opened while the Linux SCSI
+- device structure for that node is still being initialized.
+-
+- This occurs because the sd driver which controls SCSI disks
+- will loop forever waiting for a device busy flag to be cleared
+- at a certain point in the open routine for the disk device.
+- Since this particular loop will never yield control of the
+- processor, the process initializing the SCSI disk device is
+- not allowed to run, and the initialization process can never
+- clear the device busy flag which the sd driver is constantly
+- checking.
+-
+- A similar problem exists in the SCSI generic driver in some
+- 2.4 kernel versions. The sg driver may crash on a bad
+- pointer if a /dev/sg* device is opened while it is being
+- initialized.
+-
+- - All Linux 2.4 kernels may trigger TCP retransmits from
+- the iSCSI target system even though no packets were lost,
+- mis-ordered or duplicated by the connecting network.
+- Setting the sysctl variable net.ipv4.tcp_low_latency (if it
+- exists) to 1 may reduce or eliminate the TCP retransmits.
+-
+- - RealTek ethernet controller RTL-8029 may encounter transmission
+- problems under heavy load which may cause a system panic.
+-
+-
+-----------------------------
+-TESTED HARDWARE AND SOFTWARE
+-----------------------------
+-
+- The 3.6.0 version of iSCSI driver has been tested successfully using the
+- software and equipment listed below. The driver should also work with other
+- software and hardware configurations not listed below, assuming they are
+- consistent with the System Requirements described earlier in this document.
+- The test programs used were a variety of commercial applications and custom
+- scripts that generated various types of traffic loads including raw and
+- filesystem I/O, with and without errors being injected.
+-
+- 1. Distributions:
+- - Redhat 9 (kernel 2.4.20-8)
+- - Redhat Advanced Server 2.1 (kernel 2.4.9-e.3)
+- - Redhat Enterprise Linux 3 (kernel 2.4.21-9)
+- - SuSE Linux Enterprise Server 8 (2.4.20)
+- - SuSE Linux 8.2 (2.4.20)
+-
+- 2. Servers:
+- - Datanet Eclipse Server - 1 CPU
+- - IBM Netfinity 8656 - 1 CPU
+- - Compaq Evo Workstation - 1 CPU
+- - Eclipse Server - 2 CPUs
+- - Compaq Proliant DL360 - 2 CPUs
+- - Datanet Eclipse Server - 4 CPUs
+-
+- 3. Filesystems:
+- - ext2
+- - ext3
+-
+-
+-----------------------
+-INSTALLATION PROCEDURE
+-----------------------
+-
+- Before you begin, make sure that your iSCSI target is connected to your
+- network. If another version of the Linux driver is currently installed (it may
+- have been included with your Linux distribution), you will need to remove it
+- before installing a newer driver version. See the installed driver's
+- documentation for detail procedures on removing the driver.
+-
+- 1. Download the linux-iscsi-<ver>.tgz file to a working directory (e.g.,
+- /usr/src/iscsi) where <ver> is the driver version (e.g., 3.6.0). If the
+- directory already exists, remove any files from a previous installation.
+-
+- 2. Change to the working directory created in step 1 and use tar(1) to
+- uncompress the source archive. The archive will contain a subdirectory
+- corresponding to the archive name. For example:
+-
+- cd /usr/src/iscsi
+- tar xvzf linux-iscsi-3.6.0.tgz
+- cd linux-iscsi-3.6.0
+-
+- Your working directory (/usr/src/iscsi in the example above) now contains
+- the iSCSI package. The package contains the driver and associated files.
+-
+- 3. Compile the iSCSI driver. If your kernel sources are not in the
+- usual place, add 'TOPDIR=/path/to/kernel' or edit the definition
+- of TOPDIR in the makefile. If your kernel configuration file is
+- not in the usual place, add 'KERNEL_CONFIG=/path/to/.config' or
+- edit the definition of KERNEL_CONFIG in the makefile. Compile the driver
+- by entering:
+-
+- make
+-
+- 4. As root, install the driver by entering:
+-
+- make install
+-
+- 5. You may need to verify the order of the boot script because the iSCSI
+- daemon tries to get a TCP connection to each configured iSCSI target
+- and if the network interface has not started by the time the boot
+- script runs, the connection(s) will not occur. Also, if you are using a
+- non-RedHat Linux distribution you may need to edit your boot scripts to
+- properly run the iSCSI setup script. You may also need to verify the order
+- of the shutdown script.
+-
+- 6. Edit /etc/iscsi.conf to setup the correct IP addresses and other required
+- driver parameters. Refer to "Editing The iscsi.conf File" section of
+- this document for more information on the settings used in this file.
+-
+- 7. Start the driver by entering the following command.
+-
+- /etc/init.d/iscsi start
+-
+- This should configure devices and cause the iSCSI driver to be loaded.
+-
+- Normal disk commands like mkfs and fsck will work on the iSCSI devices
+- just like they work on a local hard drive.
+-
+-
+------------------
+-REMOVAL PROCEDURE
+------------------
+-
+- 1. While logged in as root, unmount all iSCSI devices and stop
+- the driver by entering:
+-
+- /etc/init.d/iscsi stop
+-
+- 2. De-install the iSCSI driver package by entering:
+-
+- make remove
+-
+- This will delete the appropriate files from /lib/modules and
+- /sbin. The configuration files in /etc are not
+- deleted, since they will be needed if another driver version
+- is installed later.
+-
+- 3. Back up one directory level and delete the source code by entering:
+-
+- cd ..
+- rm -rf linux-iscsi-<ver>
+-
+-
+-------------------------
+-DRIVER UPGRADE PROCEDURE
+-------------------------
+-
+- To upgrade the iSCSI driver to the latest version, first deinstall the
+- existing package following the steps given in the Removal Procedure section
+- of the README for the driver you currently have installed.
+-
+- Upon successful deinstallation, install the latest driver as described in the
+- Installation Procedure section of the README for the new driver.
+-
+-
+-------------------------
+-KERNEL UPGRADE PROCEDURE
+-------------------------
+-
+- Because the iSCSI driver contains a Linux kernel module, the driver must
+- be rebuilt and reinstalled if you make any changes to your Linux
+- kernel. To remove, rebuild, and reinstall the driver, enter the following
+- commands while logged in as root:
+-
+- make remove
+- make clean
+- make
+- make install
+-
+- Because some Linux distributions include versions of this driver
+- in their kernel source tree, recompiling your kernel source tree
+- may create an older version of the iSCSI kernel module. The driver
+- will fail to operate correctly if there is a version mismatch
+- between the iSCSI daemon and the iSCSI kernel module.
+-
+- If your kernel source tree already contains a version of this driver
+- different from the one you have installed, you must disable the
+- iSCSI driver in your kernel configuration before recompiling a new
+- kernel from source. Leaving the iSCSI driver enabled in the kernel
+- configuration during a kernel rebuild may result in a newer iSCSI
+- kernel module being replaced by an older version from the kernel
+- source tree.
+-
+-
+-===============================================================================
+ CONFIGURING AND USING THE DRIVER
+ ===============================================================================
+
+@@ -578,7 +197,7 @@ STARTING AND STOPPING THE iSCSI DRIVER
+
+ To manually start the iSCSI driver enter:
+
+- /etc/init.d/iscsi start
++ service iscsi start
+
+ The iSCSI initialization will report information on each detected
+ device to the console or in dmesg(8) output. For example:
+@@ -606,7 +225,7 @@ STARTING AND STOPPING THE iSCSI DRIVER
+
+ To manually stop the iSCSI driver enter:
+
+- /etc/init.d/iscsi stop
++ service iscsi stop
+
+ When the driver is stopped, the init.d script will attempt to kill all
+ processes using iSCSI devices by first sending them "SIGTERM" and then by
+@@ -714,29 +333,26 @@ AUTO-MOUNTING FILESYSTEMS
+
+ Filesystems installed on iSCSI devices cannot be automatically mounted at
+ system reboot due to the fact that the IP network is not yet configured at
+- mount time. However, the driver provides a method to auto-mount these
+- filesystems as soon as the iSCSI devices become available (i.e., after the IP
+- network is configured).
++ mount time. However, the _netdev option provides a method to auto-mount these
++ filesystems as soon as the network become available.
+
+ To auto-mount a filesystem installed on an iSCSI device, follow these steps:
+
+ 1. List the iSCSI partitions to be automatically mounted in
+- /etc/fstab.iscsi which has the same format as /etc/fstab. The
+- /etc/fstab.iscsi file will not be overwritten when the driver is
+- installed nor will removing the current version of the driver delete
+- /etc/fstab.iscsi. It is left untouched during an install.
++ /etc/fstab.
+
+ 2. For each filesystem on each iscsi device(s), enter the logical volume on
+ which the filesystem resides. The mount points must exist for the
+-
+- filesystems to be mounted. For example, the following /etc/fstab.iscsi
++ filesystems to be mounted. For example, the following /etc/fstab
+ entries will mount the two iSCSI devices specified (sda and sdb):
+
+ *************************************************************************
+ #device mount FS mount backup fsck
+ #to mount point type options frequency pass
+- /dev/sda /mnt/t0 ext2 defaults 0 0
+- /dev/sdb /mnt/t1 ext2 defaults 0 0
++ LABEL=/ / ext3 defaults 1 1
++ LABEL=/boot /boot ext3 defaults 1 2
++ /dev/sda /mnt/t0 ext2 _netdev 0 0
++ /dev/sdb /mnt/t1 ext2 _netdev 0 0
+ *************************************************************************
+
+ 3. Upon a system restart, the iSCSI startup script invokes the
+@@ -752,7 +368,7 @@ AUTO-MOUNTING FILESYSTEMS
+ Due to variable network delays, targets may not always become available in the
+ same order from one boot to the next. Thus, the order in which iSCSI devices
+ are mounted may vary and may not match the order the devices are listed in
+- /etc/fstab.iscsi You should not assume mounts of iSCSI devices will occur in
++ /etc/fstab You should not assume mounts of iSCSI devices will occur in
+ any particular order.
+
+ ------------
+Binary files linux-iscsi-3.6.0.2.old/init and linux-iscsi-3.6.0.2/init differ
+Binary files linux-iscsi-3.6.0.2.old/iscsi-device and linux-iscsi-3.6.0.2/iscsi-device differ
+Binary files linux-iscsi-3.6.0.2.old/iscsi-iname and linux-iscsi-3.6.0.2/iscsi-iname differ
+Binary files linux-iscsi-3.6.0.2.old/iscsi-ls and linux-iscsi-3.6.0.2/iscsi-ls differ
+diff -Nurp linux-iscsi-3.6.0.2.old/iscsi-umountall linux-iscsi-3.6.0.2/iscsi-umountall
+--- linux-iscsi-3.6.0.2.old/iscsi-umountall 2004-01-07 06:27:33.000000000 -0600
++++ linux-iscsi-3.6.0.2/iscsi-umountall 2004-07-19 14:42:33.652709278 -0500
+@@ -6,7 +6,6 @@ BASEDIR=/
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin:$BASEDIR/sbin:$BASEDIR/bin:$PATH
+ USAGE="Usage:iscsi-umountall [-t] [-k]"
+ MTAB=/etc/mtab
+-FSTAB=/etc/fstab.iscsi
+ fslist=""
+
+ if [ -e /proc/mounts ] ; then
+@@ -37,21 +36,6 @@ is_iscsi() # check for iSCSI devices
+ return 0
+ fi
+
+- if [ -e $FSTAB ]; then
+- local dev mountp etc
+- while read dev mountp etc
+- do
+- case "$dev"
+- in
+- \#*) continue ;; # ignore comments
+- '') continue ;; # ignore empty lines
+- esac
+-
+- if [ "$mountp" = $2 ]; then
+- return 0
+- fi
+- done < $FSTAB
+- fi
+ return 1
+ }
+
+Binary files linux-iscsi-3.6.0.2.old/iscsid and linux-iscsi-3.6.0.2/iscsid differ
+diff -Nurp linux-iscsi-3.6.0.2.old/rc.iscsi linux-iscsi-3.6.0.2/rc.iscsi
+--- linux-iscsi-3.6.0.2.old/rc.iscsi 2004-06-08 10:07:11.000000000 -0500
++++ linux-iscsi-3.6.0.2/rc.iscsi 2004-07-19 16:10:36.441052971 -0500
+@@ -1,18 +1,10 @@
+ #! /bin/sh
+-# chkconfig: 2345 11 20
++# chkconfig: - 11 20
+ # description: iSCSI daemon
+
+-# For SuSE, the following information is read by "insserv" program and the
+-# start/stoplinks are installed at appropriate runlevels.
+-# The network interface and logger has to be up for starting iscsi service
+-### BEGIN INIT INFO
+-# Provides: iscsi
+-# Required-Start: $network $syslog
+-# Required-Stop: $network $syslog
+-# Default-Start: 2 3 5
+-# Default-Stop: 0 1 6
+-# Description: Start iSCSI to allow access to remote SCSI devices
+-### END INIT INFO
++# Source function library.
++[ -f /etc/init.d/functions ] || exit 0
++. /etc/init.d/functions
+
+ BASEDIR=/
+ PIDFILE=/var/run/iscsid.pid
+@@ -21,14 +13,6 @@ PIDFILE=/var/run/iscsid.pid
+ CONNFAILTIMEOUT=30
+ DISKCOMMANDTIMEOUT=5
+
+-# Increase the maximum TCP window size in Linux (well, socket memory, which is related) to this number
+-TCP_WINDOW_SIZE=1048576
+-
+-PATH="$BASEDIR/sbin:$BASEDIR/bin:/sbin:/bin:/usr/sbin:/usr/bin:$PATH"
+-export PATH
+-
+-test -d $BASEDIR || exit 0
+-
+ iscsi_network_boot()
+ {
+ mtab=/etc/mtab
+@@ -48,25 +32,21 @@ iscsi_network_boot()
+ fi
+ }
+
+-case $1 in
+- start)
++start() {
+ # Do sanity checks before we start..
+ if [ ! -e /etc/iscsi.conf ]; then
+ echo
+- echo "Error: configuration file /etc/iscsi.conf is missing!"
+- echo "The iSCSI driver has not been correctly installed and cannot start."
+- echo
++ echo $"Error: configuration file /etc/iscsi.conf is missing!"
++ echo $"The iSCSI driver has not been correctly installed and cannot start."
+ exit 1
+ elif [ -s $PIDFILE ] && kill -0 `head -n 1 $PIDFILE` >/dev/null ; then
+- echo "iSCSI daemon already running"
+- echo
++ echo $"iSCSI daemon already running"
+ exit 1
+ fi
+
+ grep -Eq '^[^#]' /etc/iscsi.conf
+ if [ $? -ne 0 ] ; then
+- echo "Error: Configuration file is empty, unable to start the driver"
+- echo
++ echo $"Error: Configuration file is empty, unable to start the driver"
+ exit 1
+ fi
+
+@@ -89,22 +69,19 @@ case $1 in
+ fi
+
+ if [ ! -f /etc/initiatorname.iscsi ] ; then
+- echo
+- echo "Error: InitiatorName file /etc/initiatorname.iscsi is missing!"
+- echo "The iSCSI driver has not been correctly installed and cannot start."
+- echo
++ echo $"Error: InitiatorName file /etc/initiatorname.iscsi is missing!"
+ exit 1
+ fi
+
+ # see if we need to generate a unique iSCSI InitiatorName
+ # this should only happen if the
+ if grep -q "^GenerateName=yes" /etc/initiatorname.iscsi ; then
+- if [ ! -x $BASEDIR/sbin/iscsi-iname ] ; then
+- echo "Error: $BASEDIR/sbin/iscsi-iname does not exist, driver was not successfully installed"
++ if [ ! -x ${BASEDIR}sbin/iscsi-iname ] ; then
++ echo "Error: ${BASEDIR}sbin/iscsi-iname does not exist, driver was not successfully installed"
+ exit 1;
+ fi
+ # Generate a unique InitiatorName and save it
+- INAME=`$BASEDIR/sbin/iscsi-iname`
++ INAME=`${BASEDIR}sbin/iscsi-iname`
+ if [ "$INAME" != "" ] ; then
+ echo "## DO NOT EDIT OR REMOVE THIS FILE!" > /etc/initiatorname.iscsi
+ echo "## If you remove this file, the iSCSI daemon will not start." >> /etc/initiatorname.iscsi
+@@ -112,7 +89,7 @@ case $1 in
+ echo "## may reject this initiator. The InitiatorName must be unique">> /etc/initiatorname.iscsi
+ echo "## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames." >> /etc/initiatorname.iscsi
+ printf "InitiatorName=$INAME\n" >> /etc/initiatorname.iscsi
+- chmod 600 /etc/initiatorname.iscsi
++
+ else
+ echo "Error: failed to generate an iSCSI InitiatorName, driver cannot start."
+ echo
+@@ -122,61 +99,13 @@ case $1 in
+
+ # make sure there is a valid InitiatorName for the driver
+ if ! grep -q "^InitiatorName=[^ \t\n]" /etc/initiatorname.iscsi ; then
+- echo
+- echo "Error: /etc/initiatorname.iscsi does not contain a valid InitiatorName."
+- echo "The iSCSI driver has not been correctly installed and cannot start."
+- echo
++ echo $"Error: /etc/initiatorname.iscsi does not contain a valid InitiatorName."
++ echo $"The iSCSI driver has not been correctly installed and cannot start."
+ exit 1
+ fi
+
+- # cycle the old log, since we can't guarantee anything is managing
+- # it, and in any case it's now only used for debugging info.
+- if [ -e /var/log/iscsi.log ] ; then
+- rm -f /var/log/iscsi.log.old
+- mv /var/log/iscsi.log /var/log/iscsi.log.old
+- fi
+- echo "" > /var/log/iscsi.log
+- chmod 0600 /var/log/iscsi.log
+-
+- # Increase the maximum TCP window size to something that will give reasonable
+- # performance for storage networking. Use at least a 1 MB max.
+- # This only works if we have /proc, but the daemon assumes that anyway,
+- # so there's no point trying to use sysctl.
+- if [ -e /proc/sys/net/core/rmem_max ] ; then
+- RMEM_MAX=`cat /proc/sys/net/core/rmem_max`
+- if [ $RMEM_MAX -lt $TCP_WINDOW_SIZE ] ; then
+- echo "$TCP_WINDOW_SIZE" > /proc/sys/net/core/rmem_max
+- fi
+- fi
+-
+- if [ -e /proc/sys/net/core/wmem_max ] ; then
+- WMEM_MAX=`cat /proc/sys/net/core/wmem_max`
+- if [ $WMEM_MAX -lt $TCP_WINDOW_SIZE ] ; then
+- echo "$TCP_WINDOW_SIZE" > /proc/sys/net/core/wmem_max
+- fi
+- fi
+-
+- # 2.4 kernels don't use the net/core values for TCP anymore
+- if [ -e /proc/sys/net/ipv4/tcp_rmem ] ; then
+- max=`awk '{print $3}' /proc/sys/net/ipv4/tcp_rmem`
+- if [ $max -lt $TCP_WINDOW_SIZE ] ; then
+- min=`awk '{print $1}' /proc/sys/net/ipv4/tcp_rmem`
+- default=`awk '{print $2}' /proc/sys/net/ipv4/tcp_rmem`
+- echo "$min $default $TCP_WINDOW_SIZE" > /proc/sys/net/ipv4/tcp_rmem
+- fi
+- fi
+-
+- if [ -e /proc/sys/net/ipv4/tcp_wmem ] ; then
+- max=`awk '{print $3}' /proc/sys/net/ipv4/tcp_wmem`
+- if [ $max -lt $TCP_WINDOW_SIZE ] ; then
+- min=`awk '{print $1}' /proc/sys/net/ipv4/tcp_wmem`
+- default=`awk '{print $2}' /proc/sys/net/ipv4/tcp_wmem`
+- echo "$min $default $TCP_WINDOW_SIZE" > /proc/sys/net/ipv4/tcp_wmem
+- fi
+- fi
+-
+ # start
+- echo -n "Starting iSCSI: iscsi"
++ echo -n $"Starting iSCSI: iscsi"
+
+ # the install script tells us when we need to unload an old module,
+ # so that 'make install; rc.iscsi restart' does what people expect.
+@@ -185,37 +114,13 @@ case $1 in
+ rm -f /tmp/.iscsi.unload.module
+ fi
+
+- if ! modprobe iscsi_sfnet >> /var/log/iscsi.log 2>&1; then
+- # collect info useful in debugging module load problems.
+- echo >> /var/log/iscsi.log
+- printf "uname -r = %s\n" `uname -r` >> /var/log/iscsi.log
+- printf "uname -m = %s\n" `uname -m` >> /var/log/iscsi.log
+- printf "/proc/cmdline = %s\n" `cat /proc/cmdline` >> /var/log/iscsi.log
+- printf "\nls -la /boot/:\n" >> /var/log/iscsi.log
+- ls -la /boot/ >> /var/log/iscsi.log
+- printf "\n/boot md5sums:\n" >> /var/log/iscsi.log
+- for k in /boot/vmlinu* ; do md5sum $k ; done >> /var/log/iscsi.log
+- printf "\nls -la /usr/src:\n" >> /var/log/iscsi.log
+- ls -la /usr/src >> /var/log/iscsi.log
+- DIR=/lib/modules/`uname -r`
+- printf "\nls -la $DIR:\n" >> /var/log/iscsi.log
+- ls -la $DIR >> /var/log/iscsi.log
+- printf "\nls -la $DIR/build/:\n" >> /var/log/iscsi.log
+- ls -la $DIR/build/ >> /var/log/iscsi.log
+- printf "\nhead $DIR/build/Makefile:\n" >> /var/log/iscsi.log
+- head -5 $DIR/build/Makefile >> /var/log/iscsi.log
+- printf "\nfind $DIR -name '*iscsi*' -print:\n" >> /var/log/iscsi.log
+- find $DIR -name '*iscsi*' -print >> /var/log/iscsi.log
+- printf "\nnm iSCSI modules:\n" >> /var/log/iscsi.log
+- for m in `find $DIR -name '*iscsi*' -print` ; do (printf "\n${m}:\n" ; nm $m ) ; done >> /var/log/iscsi.log
+- printf "\n/proc/ksyms:\n" >> /var/log/iscsi.log
+- cat /proc/ksyms >> /var/log/iscsi.log
+- # FIXME: should we find and copy some kernel config files as well?
+- # Tell the user it failed.
+- echo
+- echo "Couldn't load module iscsi_sfnet"
+- echo "See error log in /var/log/iscsi.log"
+- exit 1
++ if lsmod | grep -q "^iscsi_sfnet" ; then
++ :
++ else
++ if ! modprobe iscsi_sfnet ; then
++ echo $"Could not load module iscsi_sfnet.o"
++ return 1
++ fi
+ fi
+
+ # By default, we try to load the scsi disk driver module.
+@@ -280,51 +185,38 @@ case $1 in
+ iscsid
+ fi
+
+- # Make sure the K*iscsi scripts get called
+- if [ -d /var/lock/subsys ] ; then
+- touch /var/lock/subsys/iscsi
+- fi
+-
+- # if we have an iSCSI fstab, process it
+- if [ -f /etc/fstab.iscsi ] ; then
+- echo -n " fsck/mount"
+- sleep 6
+- iscsi-mountall
+- fi
+-
+ echo ""
+
+ ;;
+- stop)
++}
++
++stop() {
+ # if iSCSI network boot then exit.
+ if iscsi_network_boot ; then
+- echo "Since it is an iSCSI network boot therefore, driver cannot be stopped/restarted"
++ echo $"Since it is an iSCSI network boot therefore, driver cannot be stopped/restarted"
+ exit 1
+ fi
+
+- echo -n "Stopping iSCSI:"
++ echo -n $"Stopping iSCSI:"
+ for hba in /proc/scsi/iscsi/* ; do
+ echo "connfailtimeout - - $CONNFAILTIMEOUT" > $hba
+ echo "diskcommandtimeout - - $DISKCOMMANDTIMEOUT" > $hba
+ done
+
+- echo -n " sync"
+ sync
+
+ # unmount all filesystems on iSCSI devices
+- echo -n " umount"
++ echo -n $" umount"
+ iscsi-umountall -t -k
+
+- echo -n " sync"
+ sync
+ sleep 3
+
+- if [ -f $PIDFILE ] ; then
++ if [ -n "$(pidofproc iscsid)" ] ; then
+ echo -n " iscsid"
+- kill -TERM `head -n 1 $PIDFILE`
++ killproc iscsid
+ sleep 2
+- killall $BASEDIR/sbin/iscsid > /dev/null 2>&1
+- killall iscsid > /dev/null 2>&1
++ killproc iscsid -9
+ rm -f $PIDFILE
+ fi
+
+@@ -336,107 +228,48 @@ case $1 in
+ done
+ fi
+
+- # the install script tells us when we need to unload an old module,
+- # so that 'make install; rc.iscsi start' does what people expect.
+- if [ -d /tmp -a -e /tmp/.iscsi.unload.module ] ; then
+- rmmod iscsi_sfnet > /dev/null 2>&1
+- rm -f /tmp/.iscsi.unload.module
+- fi
+-
+- if [ -e /var/lock/subsys/iscsi ] ; then
+- rm /var/lock/subsys/iscsi
+- fi
++ rm -f /var/lock/subsys/iscsi
+
+ echo
+- ;;
+- restart)
+- # if iSCSI network boot then exit.
+- if iscsi_network_boot ; then
+- echo "Since it is an iSCSI network boot therefore, driver cannot be stopped/restarted"
+- exit 1
+- fi
++}
+
+- $0 stop
+- $0 start
+- ;;
+- reload)
+- if [ -f $PIDFILE ] ; then
+- kill -HUP `head -n 1 $PIDFILE`
+- fi
+- ;;
+- status)
+- if [ -s $PIDFILE ] && kill -0 `head -n 1 $PIDFILE` >/dev/null ; then
+- echo "iSCSI driver is loaded"
+- else
+- echo "iSCSI driver is not loaded"
++reload() {
++ if [ -f $PIDFILE ] ; then
++ kill -HUP `head -1 $PIDFILE`
+ fi
++}
++
++restart() {
++ stop
++ start
++}
++
++debug() {
++ DEBUG_ISCSI=5
++ export DEBUG_ISCSI
++ start
++ ;;
++}
++
++case "$1" in
++ start) start ;;
++ stop) stop ;;
++ reload) reload ;;
++ status) status iscsid ;;
++ restart) restart ;;
++ condrestart)
++ [ -f /var/lock/subsys/iscsi ] && restart || :
++ ;;
++ redebug)
++ stop
++ debug
+ ;;
+- debug1)
+- DEBUG_ISCSI=1
+- export DEBUG_ISCSI
+- $0 start
+- ;;
+- debug2)
+- DEBUG_ISCSI=2
+- export DEBUG_ISCSI
+- $0 start
+- ;;
+- debug3)
+- DEBUG_ISCSI=3
+- export DEBUG_ISCSI
+- $0 start
+- ;;
+- debug4)
+- DEBUG_ISCSI=4
+- export DEBUG_ISCSI
+- $0 start
+- ;;
+- debug|debug5)
+- DEBUG_ISCSI=5
+- export DEBUG_ISCSI
+- $0 start
+- ;;
+- debug6)
+- DEBUG_ISCSI=6
+- export DEBUG_ISCSI
+- $0 start
+- ;;
+- debug7)
+- DEBUG_ISCSI=7
+- export DEBUG_ISCSI
+- $0 start
+- ;;
+- redebug1)
+- $0 stop
+- $0 debug1
+- ;;
+- redebug2)
+- $0 stop
+- $0 debug2
+- ;;
+- redebug3)
+- $0 stop
+- $0 debug3
+- ;;
+- redebug4)
+- $0 stop
+- $0 debug4
+- ;;
+- redebug|redebug5)
+- $0 stop
+- $0 debug5
+- ;;
+- redebug6)
+- $0 stop
+- $0 debug6
+- ;;
+- redebug7)
+- $0 stop
+- $0 debug
++ debug) debug
+ ;;
++
+ *)
+- echo "Usage: /etc/init.d/iscsi { start | stop | restart | status | reload }"
+-
++ echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
++ exit 1
+ ;;
+ esac
+
diff --git a/sources b/sources
index e69de29..9524f5c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+8e517d223402141289847051c87366db linux-iscsi-3.6.0.2.tgz
More information about the scm-commits
mailing list