rpms/iscsi-initiator-utils/devel iscsi-initiator-utils-idbm-lock-error-handling.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 iscsi-initiator-utils-ibft-sysfs.patch, 1.1, 1.2 iscsi-initiator-utils-update-initscripts-and-docs.patch, 1.3, 1.4 iscsi-initiator-utils-use-var-for-config.patch, 1.5, 1.6 iscsi-initiator-utils.spec, 1.32, 1.33 iscsid.init, 1.5, 1.6 iscsidevs.init, 1.5, 1.6 sources, 1.15, 1.16 iscsi-initiator-utils-Fix-connection-cleanup-when-iscsid-is-restarted.patch, 1.1, NONE iscsi-initiator-utils-add-fw-login.patch, 1.1, NONE iscsi-initiator-utils-add-iscsi-iname.patch, 1.1, NONE iscsi-initiator-utils-fix-compile-err-include-limits.patch, 1.2, NONE iscsi-initiator-utils-fix-segment-len-check.patch, 1.1, NONE iscsi-initiator-utils-fix-sync-up.patch, 1.1, NONE iscsi-initiator-utils-handle-ipv6-compat-addrs.patch, 1.1, NONE iscsi-initiator-utils-update-startup-doc.patch, 1.1, NONE iscsi-initiator-utils-use-new-tpgt.patch, 1.1, NONE iscsi.init, 1.8, NONE iscsistart-static.patch, 1.2, NONE

Hans de Goede jwrdegoede at fedoraproject.org
Tue Sep 30 12:22:18 UTC 2008


Author: jwrdegoede

Update of /cvs/pkgs/rpms/iscsi-initiator-utils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12768

Modified Files:
	.cvsignore iscsi-initiator-utils-ibft-sysfs.patch 
	iscsi-initiator-utils-update-initscripts-and-docs.patch 
	iscsi-initiator-utils-use-var-for-config.patch 
	iscsi-initiator-utils.spec iscsid.init iscsidevs.init sources 
Added Files:
	iscsi-initiator-utils-idbm-lock-error-handling.patch 
Removed Files:
	iscsi-initiator-utils-Fix-connection-cleanup-when-iscsid-is-restarted.patch 
	iscsi-initiator-utils-add-fw-login.patch 
	iscsi-initiator-utils-add-iscsi-iname.patch 
	iscsi-initiator-utils-fix-compile-err-include-limits.patch 
	iscsi-initiator-utils-fix-segment-len-check.patch 
	iscsi-initiator-utils-fix-sync-up.patch 
	iscsi-initiator-utils-handle-ipv6-compat-addrs.patch 
	iscsi-initiator-utils-update-startup-doc.patch 
	iscsi-initiator-utils-use-new-tpgt.patch iscsi.init 
	iscsistart-static.patch 
Log Message:
* Tue Sep 30 2008 Hans de Goede <hdegoede at redhat.com> 6.2.0.870-0.1.rc1
- Rewrite SysV initscripts, fixes rh 441290, 246960, 282001, 436175, 430791
- Add patch to make iscsiadm complain and exit when run as user instead
  of hang spinning for the database lock
- Add patch to make iscsiadm start iscsid when needed (rh 436175 related)
- Don't start iscsi service when network not yet up (in case of using NM)
  add NM dispatcher script to start iscsi service once network is up


iscsi-initiator-utils-idbm-lock-error-handling.patch:

--- NEW FILE iscsi-initiator-utils-idbm-lock-error-handling.patch ---
diff -up open-iscsi-2.0-870-rc1/usr/idbm.c~ open-iscsi-2.0-870-rc1/usr/idbm.c
--- open-iscsi-2.0-870-rc1/usr/idbm.c~	2008-09-29 13:01:48.000000000 +0200
+++ open-iscsi-2.0-870-rc1/usr/idbm.c	2008-09-29 13:01:48.000000000 +0200
@@ -849,6 +849,14 @@ int idbm_lock(void)
 		ret = link(LOCK_FILE, LOCK_WRITE_FILE);
 		if (ret == 0)
 			break;
+
+		if (errno != EEXIST) {
+			log_error("Could not lock discovery DB: %s: %s",
+					LOCK_WRITE_FILE, strerror(errno));
+			log_error("Maybe you are not root?");
+			exit(-1);
+		} else if (i == 0) 
+			log_warning("Waiting for discovery DB lock");
 
 		usleep(10000);
 	}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/.cvsignore,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- .cvsignore	6 Feb 2008 21:02:29 -0000	1.15
+++ .cvsignore	30 Sep 2008 12:21:47 -0000	1.16
@@ -10,3 +10,4 @@
 open-iscsi-2.0-865.2.tar.gz
 open-iscsi-2.0-865.13.tar.gz
 open-iscsi-2.0-868-test1.tar.gz
+open-iscsi-2.0-870-rc1.tar.gz

iscsi-initiator-utils-ibft-sysfs.patch:

Index: iscsi-initiator-utils-ibft-sysfs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/iscsi-initiator-utils-ibft-sysfs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- iscsi-initiator-utils-ibft-sysfs.patch	6 Feb 2008 21:02:29 -0000	1.1
+++ iscsi-initiator-utils-ibft-sysfs.patch	30 Sep 2008 12:21:47 -0000	1.2
@@ -1,6 +1,6 @@
-diff -Naurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fw_entry.c open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fw_entry.c
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fw_entry.c	2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fw_entry.c	2008-01-23 12:07:52.000000000 -0600
+diff -Naurp open-iscsi-2.0-870-rc1/utils/fwparam_ibft/fw_entry.c open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/fw_entry.c
+--- open-iscsi-2.0-870-rc1/utils/fwparam_ibft/fw_entry.c	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/fw_entry.c	2008-06-30 21:21:57.000000000 -0500
 @@ -29,7 +29,8 @@ int fw_get_entry(struct boot_context *co
  
  	ret = fwparam_ppc(context, filepath);
@@ -11,9 +11,9 @@
  	return ret;
  }
  
-diff -Naurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft.h open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft.h
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft.h	2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft.h	2008-01-23 12:07:52.000000000 -0600
+diff -Naurp open-iscsi-2.0-870-rc1/utils/fwparam_ibft/fwparam_ibft.h open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/fwparam_ibft.h
+--- open-iscsi-2.0-870-rc1/utils/fwparam_ibft/fwparam_ibft.h	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/fwparam_ibft.h	2008-06-30 21:21:57.000000000 -0500
 @@ -153,6 +153,7 @@ extern int dev_count;
  #define TARGET		"target"
  
@@ -23,9 +23,9 @@
  extern int fwparam_ppc(struct boot_context *context, const char *filepath);
 -
  #endif /* FWPARAM_IBFT_H_ */
-diff -Naurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft_sysfs.c open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft_sysfs.c
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/fwparam_ibft_sysfs.c	1969-12-31 18:00:00.000000000 -0600
-+++ open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/fwparam_ibft_sysfs.c	2008-01-23 12:08:04.000000000 -0600
+diff -Naurp open-iscsi-2.0-870-rc1/utils/fwparam_ibft/fwparam_ibft_sysfs.c open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/fwparam_ibft_sysfs.c
+--- open-iscsi-2.0-870-rc1/utils/fwparam_ibft/fwparam_ibft_sysfs.c	1969-12-31 18:00:00.000000000 -0600
++++ open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/fwparam_ibft_sysfs.c	2008-06-30 21:21:57.000000000 -0500
 @@ -0,0 +1,271 @@
 +/*
 + * Copyright (C) IBM Corporation. 2007
@@ -298,19 +298,15 @@
 +	deallocate_lists();
 +	return rc;
 +}
-diff -Naurp open-iscsi-2.0-868-test1/utils/fwparam_ibft/Makefile open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/Makefile
---- open-iscsi-2.0-868-test1/utils/fwparam_ibft/Makefile	2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.curr/utils/fwparam_ibft/Makefile	2008-01-23 12:07:52.000000000 -0600
-@@ -21,11 +21,10 @@
- #	    "Prasanna Mumbai" <mumbai.prasanna at gmail.com>
+diff -Naurp open-iscsi-2.0-870-rc1/utils/fwparam_ibft/Makefile open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/Makefile
+--- open-iscsi-2.0-870-rc1/utils/fwparam_ibft/Makefile	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/utils/fwparam_ibft/Makefile	2008-06-30 21:22:44.000000000 -0500
+@@ -22,7 +22,7 @@
  #
  
--OBJS := fwparam_ibft.o fw_entry.o
-+OBJS := fwparam_ibft.o fw_entry.o fwparam_ibft_sysfs.o
- OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o
- GENFILES := prom_lex.c prom_parse.tab.c prom_parse.tab.h
- CLEANFILES = $(OBJS) $(GENFILES) *.output *~
--
- BISONFLAGS = -d
- FLEXFLAGS =  -t
- # turn off #line number markers
+ OBJS := fwparam_ibft.o fw_entry.o
+-OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o
++OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_ibft_sysfs.o
+ CLEANFILES = $(OBJS) *.output *~
+ 
+ OPTFLAGS ?= -O2 -g -fPIC

iscsi-initiator-utils-update-initscripts-and-docs.patch:

Index: iscsi-initiator-utils-update-initscripts-and-docs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/iscsi-initiator-utils-update-initscripts-and-docs.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- iscsi-initiator-utils-update-initscripts-and-docs.patch	6 Feb 2008 21:02:29 -0000	1.3
+++ iscsi-initiator-utils-update-initscripts-and-docs.patch	30 Sep 2008 12:21:47 -0000	1.4
@@ -1,7 +1,7 @@
-diff -aurp open-iscsi-2.0-868-test1/etc/iscsid.conf open-iscsi-2.0-868-test1.tmp/etc/iscsid.conf
---- open-iscsi-2.0-868-test1/etc/iscsid.conf	2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/etc/iscsid.conf	2008-01-03 13:55:59.000000000 -0600
-@@ -27,8 +20,8 @@
+diff -aurp open-iscsi-2.0-870-rc1/etc/iscsid.conf open-iscsi-2.0-870-rc1.work/etc/iscsid.conf
+--- open-iscsi-2.0-870-rc1/etc/iscsid.conf	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/etc/iscsid.conf	2008-06-30 21:08:29.000000000 -0500
+@@ -27,8 +27,8 @@
  # To request that the iscsi initd scripts startup a session set to "automatic".
  # node.startup = automatic
  #
@@ -12,75 +12,9 @@
  
  # *************
  # CHAP Settings
-@@ -92,17 +85,6 @@ node.conn[0].timeo.noop_out_interval = 5
- # this will cause the IO to be failed to the multipath layer.
- node.conn[0].timeo.noop_out_timeout = 5
- 
--# To specify the time to wait for abort response before
--# failing the operation and trying a logical unit reset edit the line.
--# The value is in seconds and the default is 15 seconds.
--node.session.err_timeo.abort_timeout = 15
--
--# To specify the time to wait for a logical unit response
--# before failing the operation and trying session re-establishment
--# edit the line.
--# The value is in seconds and the default is 30 seconds.
--node.session.err_timeo.lu_reset_timeout = 20
--
- #******
- # Retry
- #******
-@@ -188,41 +170,24 @@ node.conn[0].iscsi.MaxRecvDataSegmentLen
- discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
- 
- # To allow the targets to control the setting of the digest checking,
--# with the initiator requesting a preference of enabling the checking, uncomment# one or both of the following lines:
-+# with the initiator requesting a preference of enabling the checking, uncommen
-+# the following lines (Data digests are not supported and on ppc/ppc64
-+# both header and data digests are not supported.):
- #node.conn[0].iscsi.HeaderDigest = CRC32C,None
--#node.conn[0].iscsi.DataDigest = CRC32C,None
- #
- # To allow the targets to control the setting of the digest checking,
- # with the initiator requesting a preference of disabling the checking,
--# uncomment one or both of the following lines:
-+# uncomment the following lines:
- #node.conn[0].iscsi.HeaderDigest = None,CRC32C
--#node.conn[0].iscsi.DataDigest = None,CRC32C
- #
- # To enable CRC32C digest checking for the header and/or data part of
--# iSCSI PDUs, uncomment one or both of the following lines:
-+# iSCSI PDUs, uncomment the following lines:
- #node.conn[0].iscsi.HeaderDigest = CRC32C
--#node.conn[0].iscsi.DataDigest = CRC32C
- #
- # To disable digest checking for the header and/or data part of
--# iSCSI PDUs, uncomment one or both of the following lines:
-+# iSCSI PDUs, uncomment the following lines:
- #node.conn[0].iscsi.HeaderDigest = None
--#node.conn[0].iscsi.DataDigest = None
- #
- # The default is to never use DataDigests and to allow the target to control
- # the setting of the HeaderDigest checking with the initiator requesting
- # a preference of disabling the checking.
--
--#************
--# Workarounds
--#************
--
--# Some targets like IET prefer after an initiator has sent a task
--# management function like an ABORT TASK or LOGICAL UNIT RESET, that
--# it does not respond to PDUs like R2Ts. To enable this behavior uncomment
--# the following line (The default behavior is Yes):
--node.session.iscsi.FastAbort = Yes
--
--# Some targets like Equalogic prefer that after an initiator has sent
--# a task management function like an ABORT TASK or LOGICAL UNIT RESET, that
--# it continue to respond to R2Ts. To enable this uncomment this line
--# node.session.iscsi.FastAbort = No
-diff -aurp open-iscsi-2.0-868-test1/README open-iscsi-2.0-868-test1.tmp/README
---- open-iscsi-2.0-868-test1/README	2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/README	2008-01-03 13:53:11.000000000 -0600
+diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
+--- open-iscsi-2.0-870-rc1/README	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/README	2008-06-30 21:08:29.000000000 -0500
 @@ -78,11 +78,6 @@ the cache sync command will fail.
  - iscsiadm's -P 3 option will not print out scsi devices.
  - iscsid will not automatically online devices.
@@ -93,7 +27,7 @@
  By default the kernel source found at
  /lib/modules/`uname -a`/build
  will be used to compile the open-iscsi modules. To specify a different
-@@ -613,7 +608,7 @@ Red Hat or Fedora:
+@@ -694,7 +689,7 @@ Red Hat or Fedora:
  -----------------
  To start open-iscsi in Red Hat/Fedora you can do:
  
@@ -102,7 +36,7 @@
  
  To get open-iscsi to automatically start at run time you may have to
  run:
-@@ -792,6 +778,8 @@ To login to all the automated nodes, sim
+@@ -873,6 +868,8 @@ To login to all the automated nodes, sim
  e.g /etc/init.d/open-iscsi restart. On your next startup the nodes will
  be logged into autmotically.
  
@@ -111,21 +45,3 @@
  
  8. Advanced Configuration
  =========================
-diff -aurp open-iscsi-2.0-868-test1/usr/idbm.c open-iscsi-2.0-868-test1.tmp/usr/idbm.c
---- open-iscsi-2.0-868-test1/usr/idbm.c	2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.c	2008-01-03 13:52:01.000000000 -0600
-@@ -364,10 +364,14 @@ idbm_recinfo_node(node_rec_t *r, recinfo
- 		__recinfo_int_o4(key, ri, r, conn[i].iscsi.HeaderDigest,
- 				 IDBM_SHOW, "None", "CRC32C", "CRC32C,None",
- 				 "None,CRC32C", num);
-+/*
-+	We only support data digests
-+
- 		sprintf(key, "node.conn[%d].iscsi.DataDigest", i);
- 		__recinfo_int_o4(key, ri, r, conn[i].iscsi.DataDigest, IDBM_SHOW,
- 				 "None", "CRC32C", "CRC32C,None",
- 				 "None,CRC32C", num);
-+*/
- 		sprintf(key, "node.conn[%d].iscsi.IFMarker", i);
- 		__recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW,
- 				"No", "Yes", num);

iscsi-initiator-utils-use-var-for-config.patch:

Index: iscsi-initiator-utils-use-var-for-config.patch
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/iscsi-initiator-utils-use-var-for-config.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- iscsi-initiator-utils-use-var-for-config.patch	6 Feb 2008 21:02:29 -0000	1.5
+++ iscsi-initiator-utils-use-var-for-config.patch	30 Sep 2008 12:21:47 -0000	1.6
@@ -1,16 +1,16 @@
-diff -aurp open-iscsi-2.0-868-test1/doc/iscsiadm.8 open-iscsi-2.0-868-test1.tmp/doc/iscsiadm.8
---- open-iscsi-2.0-868-test1/doc/iscsiadm.8	2008-01-03 14:07:04.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/doc/iscsiadm.8	2008-01-03 14:08:44.000000000 -0600
+diff -aurp open-iscsi-2.0-870-rc1/doc/iscsiadm.8 open-iscsi-2.0-870-rc1.work/doc/iscsiadm.8
+--- open-iscsi-2.0-870-rc1/doc/iscsiadm.8	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/doc/iscsiadm.8	2008-06-30 21:36:44.000000000 -0500
 @@ -47,7 +47,7 @@ display help text and exit
  .TP
  \fB\-I\fR, \fB\-\-interface\fI[iface]\fR
  The interface argument specifies the iSCSI interface to use for the operation.
 -iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
 +iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
- or offload, the iface config must have the hardware address (iface.hwaddress)
+ or the iface config must have the hardware address (iface.hwaddress)
  and the driver/transport_name (iface.transport_name). The iface's name is
  then the filename of the iface config. For software iSCSI, the iface config
-@@ -310,10 +310,10 @@ The configuration file read by \fBiscsid
+@@ -317,10 +317,10 @@ The configuration file read by \fBiscsid
  The file containing the iSCSI InitiatorName and InitiatorAlias read by
  \fBiscsid\fR and \fBiscsiadm\fR on startup.
  .TP
@@ -23,10 +23,10 @@
  This directory contains the portals.
  
  .SH "SEE ALSO"
-diff -aurp open-iscsi-2.0-868-test1/README open-iscsi-2.0-868-test1.tmp/README
---- open-iscsi-2.0-868-test1/README	2008-01-03 14:07:04.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/README	2008-01-03 14:05:35.000000000 -0600
-@@ -138,10 +138,10 @@ available on all Linux installations.
+diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
+--- open-iscsi-2.0-870-rc1/README	2008-06-30 21:37:05.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/README	2008-06-30 21:36:44.000000000 -0500
+@@ -148,10 +148,10 @@ available on all Linux installations.
  
  The database contains two tables:
  
@@ -40,7 +40,7 @@
  
  The iscsiadm utility is a command-line tool to manage (update, delete,
  insert, query) the persistent database.
-@@ -288,7 +288,7 @@ a scsi_host per HBA port).
+@@ -327,7 +327,7 @@ a scsi_host per HBA port).
  To manage both types of initiator stacks, iscsiadm uses the interface (iface)
  structure. For each HBA port or for software iscsi for each network
  device (ethX) or NIC, that you wish to bind sessions to you must create
@@ -49,7 +49,7 @@
  
  When you run iscsiadm the first time a hardware iscsi driver like qla4xxx is
  loaded, iscsiadm will create default iface configs for you. The config created
-@@ -301,29 +301,29 @@ Running:
+@@ -340,29 +340,29 @@ Running:
  iface0 qla4xxx,00:c0:dd:08:63:e8,default
  iface1 qla4xxx,00:c0:dd:08:63:ea,default
  
@@ -84,7 +84,7 @@
  
  iface.transport_name = tcp
  iface.hwaddress = 00:C0:DD:08:63:E7
-@@ -347,7 +347,7 @@ but you have not logged in then, iscsiad
+@@ -386,7 +386,7 @@ but you have not logged in then, iscsiad
  all existing bindings.
  
  When you then run iscsiadm to do discovery, it will check for interfaces
@@ -93,7 +93,7 @@
  they will be logged in through each iface. This behavior can also be overriden
  by passing in the interfaces you want to use. For example if you had defined
  two interface but only wanted to use one you can use the
-@@ -361,7 +361,7 @@ we do not bind a session to a iface, the
+@@ -400,7 +400,7 @@ we do not bind a session to a iface, the
  
  iscsiadm -m discovery -t st -p ip:port -I default -P 1
  
@@ -102,7 +102,7 @@
  not pass anything into iscsiadm, running iscsiadm will do the default
  behavior, where we allow the network subsystem to decide which
  device to use.
-@@ -396,13 +396,13 @@ iscsiadm -m node -p ip:port -I iface0 --
+@@ -435,7 +435,7 @@ iscsiadm -m node -p ip:port -I iface0 --
  
  	    ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260
  
@@ -111,19 +111,32 @@
  	using software iscsi. If any are found then nodes found during
  	discovery will be setup so that they can logged in through
  	those interfaces.
+@@ -483,7 +483,7 @@ iscsiadm -m node -p ip:port -I iface0 --
+ 	existing portals.
  
-     - SendTargets iSCSI Discovery with a specific interface. If you
+   - SendTargets iSCSI Discovery with a specific interface. If you
 -	wish to only use a subset of the interfaces in /etc/iscsi/ifaces
 +	wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces
  	then you can pass them in during discovery:
  
  	     ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260 \
-diff -aurp open-iscsi-2.0-868-test1/usr/idbm.c open-iscsi-2.0-868-test1.tmp/usr/idbm.c
---- open-iscsi-2.0-868-test1/usr/idbm.c	2008-01-03 14:07:04.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.c	2008-01-03 14:03:36.000000000 -0600
-@@ -2582,9 +2582,9 @@ idbm_init(idbm_get_config_file_fn *fn)
- 	idbm_t *db;
- 
+@@ -768,8 +768,8 @@ where targetname is the name of the targ
+ and port of the portal. tpgt, is the portal group tag of
+ the portal, and is not used in iscsiadm commands except for static
+ record creation. And iface name is the name of the iscsi interface
+-defined in /etc/iscsi/ifaces. If no interface was defined in
+-/etc/iscsi/ifaces or passed in, the default behavior is used.
++defined in /var/lib/iscsi/ifaces. If no interface was defined in
++/var/lib/iscsi/ifaces or passed in, the default behavior is used.
+ Default here is iscsi_tcp/tcp to be used over which ever NIC the
+ network layer decides is best.
+ 
+diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.c open-iscsi-2.0-870-rc1.work/usr/idbm.c
+--- open-iscsi-2.0-870-rc1/usr/idbm.c	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/usr/idbm.c	2008-06-30 21:36:44.000000000 -0500
+@@ -2137,9 +2137,9 @@ free_info:
+ int idbm_init(idbm_get_config_file_fn *fn)
+ {
  	/* make sure root db dir is there */
 -	if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
 -		if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
@@ -132,26 +145,22 @@
 +		if (mkdir(ISCSIVAR, 0660) != 0) {
 +			log_error("Could not make %s %d\n", ISCSIVAR,
  				   errno);
- 			return NULL;
+ 			return errno;
  		}
-Only in open-iscsi-2.0-868-test1.tmp/usr: idbm.c.orig
-diff -aurp open-iscsi-2.0-868-test1/usr/idbm.h open-iscsi-2.0-868-test1.tmp/usr/idbm.h
---- open-iscsi-2.0-868-test1/usr/idbm.h	2008-01-03 13:23:36.000000000 -0600
-+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.h	2008-01-03 14:03:36.000000000 -0600
-@@ -26,12 +26,14 @@
+diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.h open-iscsi-2.0-870-rc1.work/usr/idbm.h
+--- open-iscsi-2.0-870-rc1/usr/idbm.h	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/usr/idbm.h	2008-06-30 21:36:58.000000000 -0500
+@@ -26,11 +26,12 @@
  #include "initiator.h"
  #include "config.h"
  
 -#define NODE_CONFIG_DIR		ISCSI_CONFIG_ROOT"nodes"
--#define IFACE_CONFIG_DIR	ISCSI_CONFIG_ROOT"ifaces"
 -#define SLP_CONFIG_DIR		ISCSI_CONFIG_ROOT"slp"
 -#define ISNS_CONFIG_DIR		ISCSI_CONFIG_ROOT"isns"
 -#define STATIC_CONFIG_DIR	ISCSI_CONFIG_ROOT"static"
 -#define ST_CONFIG_DIR		ISCSI_CONFIG_ROOT"send_targets"
 +#define ISCSIVAR		"/var/lib/iscsi/"
-+
 +#define NODE_CONFIG_DIR		ISCSIVAR"nodes"
-+#define IFACE_CONFIG_DIR	ISCSIVAR"ifaces"
 +#define SLP_CONFIG_DIR		ISCSIVAR"slp"
 +#define ISNS_CONFIG_DIR		ISCSIVAR"isns"
 +#define STATIC_CONFIG_DIR	ISCSIVAR"static"
@@ -159,3 +168,15 @@
  #define ST_CONFIG_NAME		"st_config"
  
  #define TYPE_INT	0
+diff -aurp open-iscsi-2.0-870-rc1/usr/iface.h open-iscsi-2.0-870-rc1.work/usr/iface.h
+--- open-iscsi-2.0-870-rc1/usr/iface.h	2008-06-30 20:14:03.000000000 -0500
++++ open-iscsi-2.0-870-rc1.work/usr/iface.h	2008-06-30 21:36:44.000000000 -0500
+@@ -20,7 +20,7 @@
+ #ifndef ISCSI_IFACE_H
+ #define ISCSI_IFACE_H
+ 
+-#define IFACE_CONFIG_DIR	ISCSI_CONFIG_ROOT"ifaces"
++#define IFACE_CONFIG_DIR	"/var/lib/iscsi/ifaces"
+ 
+ struct iface_rec;
+ struct list_head;


Index: iscsi-initiator-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/iscsi-initiator-utils.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- iscsi-initiator-utils.spec	6 Apr 2008 06:44:04 -0000	1.32
+++ iscsi-initiator-utils.spec	30 Sep 2008 12:21:47 -0000	1.33
@@ -1,23 +1,18 @@
 Summary: iSCSI daemon and utility programs
 Name: iscsi-initiator-utils
-Version: 6.2.0.868
-Release: 0.6%{?dist}
-Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-868-test1.tar.gz
+Version: 6.2.0.870
+Release: 0.1.rc1%{?dist}
+Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-870-rc1.tar.gz
 Source1: iscsid.init
 Source2: iscsidevs.init
+Source3: 04-iscsi
 Patch0: iscsi-initiator-utils-update-initscripts-and-docs.patch
 Patch1: iscsi-initiator-utils-use-var-for-config.patch
 Patch2: iscsi-initiator-utils-use-red-hat-for-name.patch
 Patch3: iscsi-initiator-utils-ibft-sysfs.patch
-Patch4: iscsi-initiator-utils-add-fw-login.patch
-Patch5: iscsi-initiator-utils-use-new-tpgt.patch
-Patch6: iscsi-initiator-utils-fix-compile-err-include-limits.patch
-Patch7: iscsi-initiator-utils-handle-ipv6-compat-addrs.patch
-Patch8: iscsi-initiator-utils-Fix-connection-cleanup-when-iscsid-is-restarted.patch
-Patch9: iscsi-initiator-utils-fix-sync-up.patch
-Patch10: iscsi-initiator-utils-update-startup-doc.patch
-Patch11: iscsi-initiator-utils-fix-segment-len-check.patch
-Patch12: iscsi-initiator-utils-print-ibft-net-info.patch
+Patch4: iscsi-initiator-utils-print-ibft-net-info.patch
+Patch5: iscsi-initiator-utils-only-root-use.patch
+Patch6: iscsi-initiator-utils-start-iscsid.patch
 
 Group: System Environment/Daemons
 License: GPLv2+
@@ -35,20 +30,14 @@
 Protocol networks.
 
 %prep
-%setup -q -n open-iscsi-2.0-868-test1
+%setup -q -n open-iscsi-2.0-870-rc1
 %patch0 -p1 -b .update-initscripts-and-docs
 %patch1 -p1 -b .use-var-for-config
 %patch2 -p1 -b .use-red-hat-for-name
 %patch3 -p1 -b .ibft-sysfs
-%patch4 -p1 -b .add-fw-login
-%patch5 -p1 -b .use-new-tpgt
-%patch6 -p1 -b .fix-compile-err-include-limits
-%patch7 -p1 -b .handle-ipv6-compat-addrs
-%patch8 -p1 -b .Fix-connection-cleanup-when-iscsid-is-restarted
-%patch9 -p1 -b .fix-sync-up
-%patch10 -p1 -b .update-startup-doc
-%patch11 -p1 -b .fix-segment-len-check
-%patch12 -p1 -b .print-ibft-net-info
+%patch4 -p1 -b .print-ibft-net-info
+%patch5 -p1 -b .only-root
+%patch6 -p1 -b .start-iscsid
 
 
 %build
@@ -62,6 +51,7 @@
 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/NetworkManager/dispatcher.d
 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
@@ -80,6 +70,8 @@
 
 install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/iscsid
 install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/iscsi
+install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -118,12 +110,28 @@
 %dir %{_var}/lock/iscsi
 %{_initrddir}/iscsi
 %{_initrddir}/iscsid
+%{_sysconfdir}/NetworkManager
 %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
 /sbin/*
 %{_mandir}/man8/*
 
 
 %changelog
+* Tue Sep 30 2008 Hans de Goede <hdegoede at redhat.com> 6.2.0.870-0.1.rc1
+- Rewrite SysV initscripts, fixes rh 441290, 246960, 282001, 436175, 430791
+- Add patch to make iscsiadm complain and exit when run as user instead
+  of hang spinning for the database lock
+- Add patch to make iscsiadm start iscsid when needed (rh 436175 related)
+- Don't start iscsi service when network not yet up (in case of using NM)
+  add NM dispatcher script to start iscsi service once network is up
+
+* Mon Jun 30 2008 Mike Christie <mchristie at redhat.com> - 6.2.0.870
+- Rebase to open-iscsi-2-870
+- 453282 Handle sysfs changes.
+
+* Fri Apr 25 2008 Mike Christie <mchristie at redhat.com> - 6.2.0.868-0.7
+- 437522 log out sessions that are not used for root during "iscsi stop".
+
 * Fri Apr 4 2008 Mike Christie <mchristie at redhat.com> - 6.2.0.868-0.6
 - Rebase to RHEL5 to bring in bug fixes.
 - 437522 iscsi startup does not need to modify with network startup.


Index: iscsid.init
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/iscsid.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- iscsid.init	6 Apr 2008 06:44:04 -0000	1.5
+++ iscsid.init	30 Sep 2008 12:21:47 -0000	1.6
@@ -1,124 +1,131 @@
 #!/bin/sh
 #
+# iscsid iSCSI daemon
+#
 # chkconfig: 345 7 89
 # description: Starts and stops the iSCSI daemon.
 #
 # processname: iscsid
 # pidfile: /var/run/iscsid.pid
 # config:  /etc/iscsi/iscsid.conf
-#
+
 ### BEGIN INIT INFO
 # Provides:          iscsid
-# Required-Start:    $network
-# Required-Stop:     $network
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
 # Short-Description: Starts and stops login iSCSI daemon.
 # Description: iscsid provides the iSCSI session and connection state machine
 #              for software iscsi/iser (iscsi_tcp/ib_iser) and partialy
 #              offloaded hardware (bnx2i).
 ### END INIT INFO
-#
-# Source function library.
-. /etc/init.d/functions
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-RETVAL=0
+# Source function library.
+. /etc/rc.d/init.d/functions
 
-start()
-{
-	if [ -f /var/lock/subsys/iscsid ] ; then
-		echo
-		success
-		return
-	fi
+exec=/sbin/iscsid
+prog=iscsid
+config=/etc/iscsi/iscsid.conf
+lockfile=/var/lock/subsys/$prog
+
+# FIXME this has a false positive for root on nfs
+root_is_iscsi() {
+    rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
+    [[ "$rootopts" =~ "_netdev" ]]
+}
 
-	echo -n $"Starting iSCSI daemon: "
+start() {
+    [ -x $exec ] || exit 5
+    [ -f $config ] || exit 6
+
+    # only start if nodes are setup to startup automatically or root is iscsi
+    grep -qrs "node.startup = automatic" /var/lib/iscsi/nodes
+    if [ $? -eq 0 ] || root_is_iscsi; then
+        echo -n $"Starting $prog: "
 	modprobe -q iscsi_tcp
 	modprobe -q ib_iser
-	daemon iscsid
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] || return
-
-	touch /var/lock/subsys/iscsid
-
-	success
-	echo
-}
-
-stop_iscsid()
-{
-	killproc iscsid
-	echo
-        RETVAL=$?
-        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/iscsid
-
-	modprobe -r ib_iser 2>/dev/null
-	modprobe -r iscsi_tcp 2>/dev/null
-}
-
-stop()
-{
-	if [ ! -f /var/lock/subsys/iscsid ]; then
-		echo
-		success
-		return
-	fi
-
-	declare -a iparams=( $(iscsiadm -m session 2>/dev/null | egrep "tcp|iser") )
-	if [[ -z "${iparams[*]}" ]]; then
-		# no sessions so we can just quit
-		stop_iscsid
-		return
-	fi
-
-        # If this is a final shutdown/halt, do nothing since
-        # we may need iscsid for as long as possible (halt script kills
-	# us at the last second)
-        if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
-		rm -f /var/lock/subsys/iscsid
-                success
-                return
-        fi
-
-        # don't turn off iscsi if root is possibly on a iscsi disk
-        rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
-        if [[ "$rootopts" =~ "_netdev" ]] ; then
-                echo $"Can not shutdown iSCSI. Root is on a iSCSI disk."
-                exit 1
-        fi
-
-	echo -n $"Stopping iSCSI daemon: "
-	stop_iscsid
-}
-
-restart()
-{
-	stop
-	start
+	daemon $prog
+        retval=$?
+        echo
+        [ $retval -eq 0 ] || return 1 
+        touch $lockfile
+    fi
+
+    return 0
+}
+
+stop() {
+    declare -a iparams=( $(iscsiadm -m session 2>/dev/null | egrep "tcp|iser") )
+    if [[ -n "${iparams[*]}" ]]; then
+        # We have active sessions, so don't stop iscsid!!
+        echo -n $"Not stopping $prog: iscsi sessions still active"
+        warning $"Not stopping $prog: iscsi sessions still active"
+        echo
+        return 0
+    fi
+
+    echo -n $"Stopping $prog: "
+    killproc $prog
+    retval=$?
+    echo
+
+    modprobe -r ib_iser 2>/dev/null
+    modprobe -r iscsi_tcp 2>/dev/null
+
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
 }
 
+restart() {
+    stop
+    start
+}
+
+reload() {
+    return 3
+}
+
+force_reload() {
+    restart
+}
+
+rh_status() {
+    status $prog
+}
+
+rh_status_q() {
+    rh_status >/dev/null 2>&1
+}
+
+
 case "$1" in
-	start)
-		start
-		;;
-	stop)
-		stop
-		;;
-	restart)
-	        stop
-		start
-		;;
-	status)
-		status iscsid
-		RETVAL=$?
-		;;
-        condrestart)
-	        [ -f /var/lock/subsys/iscsid ] && restart
-		;;
-	*)
-		echo $"Usage: $0 {start|stop|restart|status|condrestart}"
-		exit 1
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0
+{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
 esac
-
-exit $RETVAL
+exit $?


Index: iscsidevs.init
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/iscsidevs.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- iscsidevs.init	6 Apr 2008 06:44:04 -0000	1.5
+++ iscsidevs.init	30 Sep 2008 12:21:47 -0000	1.6
@@ -1,116 +1,146 @@
 #!/bin/sh
 #
+# iscsi: log into iSCSI targets
+#
 # chkconfig: 345 13 89
 # description: Logs into iSCSI targets needed at system startup
-#
+
+# Note we should have $network in Required-Start/Stop but we don't because if
+# we would require network chkconfig will put us directly after NetworkManager
+# when using NM, which will make our see if the network is up test succeed
+# while NM is actually still configuring the network. By not requiring network
+# chkconfig will use the chkconfig header to determine our start prio, starting
+# us after the old network service, but before NM (netfs does this the same).
+
 ### BEGIN INIT INFO
 # Provides:          iscsi
-# Required-Start:    $network $iscsid
-# Required-Stop:     $network $iscsid
+# Required-Start:    iscsid
+# Required-Stop:     iscsid
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
 # Short-Description: Starts and stops login and scanning of iSCSI devices.
 # Description: iscsi provides the iSCSI state machine for software iscsi/iser
 #              and partial offloaded hardware. iscsi logs into and scans
 #              for iSCSI devices, and shuts them down when stopped.
 ### END INIT INFO
-#
+
 # Source function library.
-. /etc/init.d/functions
+. /etc/rc.d/init.d/functions
+
+exec="/sbin/iscsiadm"
+prog="iscsi"
+config="/etc/iscsi/initiatorname.iscsi"
+lockfile=/var/lock/subsys/$prog
+iscsid_lockfile=/var/lock/subsys/${prog}_iscsid
+
+start() {
+    [ -x $exec ] || exit 5
+    [ -f $config ] || exit 6
+
+    # if the network isn't up yet exit cleanly, NetworkManager will call us
+    # again when the network is up
+    [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0
+
+    # if no nodes are setup to startup automatically exit cleanly
+    grep -qrs "node.startup = automatic" /var/lib/iscsi/nodes
+    [ $? -eq 0 ] || exit 0
+
+    # this script is normally called from startup so log into
+    # nodes marked node.startup=automatic
+    echo -n $"Starting $prog: "
+    $exec -m node --loginall=automatic 2>&1 > /dev/null | grep iscsiadm
+
+    # <sigh> iscsiadm does not always give a non 0 exit status in case of
+    # error so we grep for any messages to stderr and see those as errors too
+    if [ ${PIPESTATUS[0]} -ne 0 -o ${PIPESTATUS[1]} -eq 0 ]; then
+        failure $"Starting $prog"
+        echo
+        return 1
+    fi
+
+    success $"Starting $prog"
+    touch $lockfile
+    echo
+    return 0
+}
+
+stop() {
+    echo -n $"Stopping $prog: "
+    $exec -m node --logoutall=automatic 2>&1 > /dev/null | grep iscsiadm
+
+    # <sigh> iscsiadm does not always give a non 0 exit status in case of
+    # error so we grep for any messages to stderr and see those as errors too
+    if [ ${PIPESTATUS[0]} -ne 0 -o ${PIPESTATUS[1]} -eq 0 ]; then
+        failure $"Stopping $prog"
+        echo
+        return 1
+    fi
+
+    success $"Stopping $prog"
+    rm -f $lockfile
+    echo
+    return 0
+}
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+restart() {
+    stop
+    start
+}
 
-RETVAL=0
+reload() {
+    return 3
+}
+
+force_reload() {
+    restart
+}
 
-start()
-{
-	if [ -f /var/lock/subsys/iscsi ] ; then
-		echo
-		success
-		return
-	fi
-
-	# Not sure if this is ok.
-	# It was done for compatiblity where users were used to
-	# just starting the iscsi service, but for root boot we
-	# need need iscsid start earlier than the devices we
-	# log into below.
-	status iscsid
-	RETVAL=$?
-
-	if [ $RETVAL -ne 0 ]; then
-		/etc/init.d/iscsid start
-	fi
-
-	# this script is normally called from startup so log into
-	# nodes marked node.startup=automatic
-	iscsiadm -m node --loginall=automatic
-	touch /var/lock/subsys/iscsi
-	success
-	echo
-}
-
-cleanup_iscsi()
-{
-	/etc/init.d/iscsid stop
-	rm -f /var/lock/subsys/iscsi
-	success
-}
-
-stop()
-{
-	if [ ! -f /var/lock/subsys/iscsi ]; then
-		echo
-		success
-		return
-	fi
-
-	declare -a iparams=( $(iscsiadm -m session 2>/dev/null | egrep "tcp|iser") )
-	if [[ -z "${iparams[*]}" ]]; then
-		# no sessions so we can just quit
-		cleanup_iscsi
-		return
-	fi
-
-	# If this is a final shutdown/halt, do nothing since
-	# lvm/dm, md, power path, etc do not always handle this nicely.
-	# The kernel will do the right thing and shutdown devices (send
-	# cache syncs, start_stops, etc) that need it.
-	if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
-		rm -f /var/lock/subsys/iscsi
-		success
-		return
-	fi
-
-	# don't turn off iscsi if root is possibly on a iscsi disk
-	rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
-	if [[ "$rootopts" =~ "_netdev" ]] ; then
-		echo $"Can not shutdown iSCSI. Root is on a iSCSI disk."
-		exit 1
-	fi
+rh_status() {
+    [ -f $lockfile ] || return 3
 
-	iscsiadm -m node --logoutall=all
-	cleanup_iscsi
+    declare -a iparams=( $(iscsiadm -m session 2>/dev/null | egrep "tcp|iser") )
+    if [[ -z "${iparams[*]}" ]]; then
+        # no sessions
+        return 2
+    fi
+
+    return 0
+}
+
+rh_status_q() {
+    rh_status >/dev/null 2>&1
 }
 
+
 case "$1" in
-	start)
-		start
-		;;
-	stop)
-		stop
-		;;
-	restart)
-		stop
-		start
-		;;
-	status)
-		status iscsid
-		RETVAL=$?
-		;;
-	condrestart)
-		[ -f /var/lock/subsys/iscsi ] && restart
-		;;
-	*)
-		echo $"Usage: $0 {start|stop|restart|status|condrestart}"
-		exit 1
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0
+{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
 esac
-exit $RETVAL
+exit $?


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/iscsi-initiator-utils/devel/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- sources	6 Feb 2008 21:02:29 -0000	1.15
+++ sources	30 Sep 2008 12:21:47 -0000	1.16
@@ -1 +1 @@
-e453be2213e60cb463353d896a9c3a78  open-iscsi-2.0-868-test1.tar.gz
+2740f55611d3ea59a21ec08b25853c55  open-iscsi-2.0-870-rc1.tar.gz


--- iscsi-initiator-utils-Fix-connection-cleanup-when-iscsid-is-restarted.patch DELETED ---


--- iscsi-initiator-utils-add-fw-login.patch DELETED ---


--- iscsi-initiator-utils-add-iscsi-iname.patch DELETED ---


--- iscsi-initiator-utils-fix-compile-err-include-limits.patch DELETED ---


--- iscsi-initiator-utils-fix-segment-len-check.patch DELETED ---


--- iscsi-initiator-utils-fix-sync-up.patch DELETED ---


--- iscsi-initiator-utils-handle-ipv6-compat-addrs.patch DELETED ---


--- iscsi-initiator-utils-update-startup-doc.patch DELETED ---


--- iscsi-initiator-utils-use-new-tpgt.patch DELETED ---


--- iscsi.init DELETED ---


--- iscsistart-static.patch DELETED ---




More information about the fedora-extras-commits mailing list