]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - iscsi-initiator-utils/patches/0052-use-var-for-config.patch
iscsi-initiator-utils: Various improvements.
[people/ms/ipfire-3.x.git] / iscsi-initiator-utils / patches / 0052-use-var-for-config.patch
similarity index 70%
rename from iscsi-initiator-utils/patches/iscsi-initiator-utils-use-var-for-config.patch
rename to iscsi-initiator-utils/patches/0052-use-var-for-config.patch
index 6ed53e5816589d2eeb891e509d047928cfd97125..1a76c11f49220984ede93df2f3afc12c7edd86f6 100644 (file)
@@ -1,65 +1,40 @@
-diff -aurp open-iscsi-2.0-872-rc3-bnx2i/doc/iscsiadm.8 open-iscsi-2.0-872-rc3-bnx2i.diff/doc/iscsiadm.8
---- open-iscsi-2.0-872-rc3-bnx2i/doc/iscsiadm.8        2010-07-11 03:45:50.000000000 -0500
-+++ open-iscsi-2.0-872-rc3-bnx2i.diff/doc/iscsiadm.8   2010-07-11 04:00:35.000000000 -0500
-@@ -51,7 +51,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
- iSCSI (qla4xxx) the iface config must have the hardware address
- (iface.hwaddress = port's MAC address)
- and the driver/transport_name (iface.transport_name). The iface's name is
-@@ -128,7 +128,7 @@ If no other options are specified: for \
- of their respective records are displayed; for \fIsession\fR, all active
- sessions and connections are displayed; for \fIfw\fR, all boot firmware
- values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and
--for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
-+for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
- .TP
- \fB\-n\fR, \fB\-\-name=\fIname\fR
-@@ -336,10 +336,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
--/etc/iscsi/nodes/
-+/var/lib/iscsi/nodes/
- This directory contains the nodes with their targets.
- .TP
--/etc/iscsi/send_targets
-+/var/lib/iscsi/send_targets
- This directory contains the portals.
- .SH "SEE ALSO"
-Only in open-iscsi-2.0-872-rc3-bnx2i.diff/doc: iscsiadm.8.orig
-diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff/README
---- open-iscsi-2.0-872-rc3-bnx2i/README        2010-07-11 03:58:50.000000000 -0500
-+++ open-iscsi-2.0-872-rc3-bnx2i.diff/README   2010-07-11 03:59:00.000000000 -0500
-@@ -144,10 +144,10 @@ available on all Linux installations.
- The database contains two tables:
--- Discovery table (/etc/iscsi/send_targets);
--- Node table (/etc/iscsi/nodes).
-+- Discovery table (/var/lib/iscsi/send_targets);
-+- Node table (/var/lib/iscsi/nodes).
--The regular place for iSCSI database files: /etc/iscsi/nodes
-+The regular place for iSCSI database files: /var/lib/iscsi/nodes
- The iscsiadm utility is a command-line tool to manage (update, delete,
- insert, query) the persistent database.
-@@ -420,7 +420,7 @@ a scsi_host per HBA port).
+From aaf2b26eae472e5fd596f9bd23f9bf5886b1eb98 Mon Sep 17 00:00:00 2001
+From: Chris Leech <cleech@redhat.com>
+Date: Mon, 19 Nov 2012 16:38:45 -0800
+Subject: use var for config
+
+---
+ README         | 33 ++++++++++++++++-----------------
+ doc/iscsiadm.8 |  8 ++++----
+ usr/idbm.c     |  6 +++---
+ usr/idbm.h     | 15 +++++++++------
+ usr/iface.h    |  4 +++-
+ 5 files changed, 35 insertions(+), 31 deletions(-)
+
+diff --git a/README b/README
+index 2a8319a..e5ae2c1 100644
+--- a/README
++++ b/README
+@@ -156,8 +156,7 @@ Usage: iscsid [OPTION]
+ Open-iSCSI persistent configuration is stored in a number of
+ directories under a configuration root directory, using a flat-file
+-format. This configuration root directory is /etc/iscsi by default,
+-but may also commonly be in /var/lib/iscsi.
++format. This configuration root directory is /var/lib/iscsi by default.
+ Configuration is contained in directories for:
+@@ -444,7 +443,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
 -a iface config /etc/iscsi/ifaces.
 +a iface config /var/lib/iscsi/ifaces.
  
Running:
Prep:
  
-@@ -428,29 +428,29 @@ Running:
+@@ -478,29 +477,29 @@ Running:
  iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax
  iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax
  
@@ -94,8 +69,8 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
  
  iface.transport_name = tcp
  iface.hwaddress = 00:C0:DD:08:63:E7
-@@ -499,7 +499,7 @@ iser iser,<empty>,<empty>,<empty>,<empty
cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
+@@ -550,7 +549,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,<empty>,<empty>,<empty>
  
  
 -Will report iface configurations that are setup in /etc/iscsi/ifaces.
@@ -103,16 +78,7 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
  The format is:
  
  iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
-@@ -515,7 +515,7 @@ default one in /etc/iscsi/initiatorname.
--To display these values in a more friendly run:
-+To display these values in a more friendly way run:
- iscsiadm -m iface -I cxgb3i.00:07:43:05:97:07
- # BEGIN RECORD 2.0-871
-@@ -553,7 +553,7 @@ need a seperate network connection to th
+@@ -636,7 +635,7 @@ need a seperate network connection to the target for discovery purposes.
  *This will be fixed in the next version of open-iscsi*
  
  For compatibility reasons, when you run iscsiadm to do discovery, it
@@ -121,7 +87,7 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
  tcp for the iface.transport and it will bind the portals that are discovered
  so that they will be logged in through those ifaces. This behavior can also
  be overriden by passing in the interfaces you want to use. For the case
-@@ -571,7 +571,7 @@ we do not bind a session to a iface, the
+@@ -654,7 +653,7 @@ we do not bind a session to a iface, then you can use the special iface
  
  iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1
  
@@ -130,7 +96,7 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
  not pass anything into iscsiadm, running iscsiadm will do the default
  behavior, where we allow the network subsystem to decide which
  device to use.
-@@ -613,13 +613,13 @@ To now log into targets it is the same a
+@@ -696,7 +695,7 @@ To now log into targets it is the same as with sofware iscsi. See section
  
            ./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover
  
@@ -139,14 +105,16 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
        ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it
        will perform discovery using the settings stored in the record.
        If a record does not exist, it will be created using the iscsid.conf
-       discovery settings.
+@@ -705,7 +704,7 @@ To now log into targets it is the same as with sofware iscsi. See section
+       The argument to -p may also be a hostname instead of an address.
+           ./iscsiadm -m discoverydb -t st -p smoehost --discover
  
 -      For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for
 +      For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for
        interfaces using software iscsi. If any are found then nodes found
        during discovery will be setup so that they can logged in through
        those interfaces. To specify a specific iface, pass the
-@@ -675,7 +675,7 @@ To now log into targets it is the same a
+@@ -761,7 +760,7 @@ To now log into targets it is the same as with sofware iscsi. See section
        This command will perform discovery, but not manipulate the node DB.
  
    - SendTargets iSCSI Discovery with a specific interface. If you
@@ -155,7 +123,7 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
        then you can pass them in during discovery:
  
             ./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \
-@@ -982,8 +982,8 @@ where targetname is the name of the targ
+@@ -1072,8 +1071,8 @@ where targetname is the name of the target and ip_address:port is the address
  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
@@ -166,7 +134,7 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
  Default here is iscsi_tcp/tcp to be used over which ever NIC the
  network layer decides is best.
  
-@@ -1098,7 +1098,7 @@ If set, iscsid will perform discovery to
+@@ -1188,7 +1187,7 @@ If set, iscsid will perform discovery to the address every
  discovery.isns.discoveryd_poll_inval or
  discovery.sendtargets.discoveryd_poll_inval seconds,
  and it will log into any portals found from the discovery source using
@@ -175,11 +143,46 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
  
  Note that for iSNS the poll_interval does not have to be set. If not set,
  iscsid will only perform rediscovery when it gets a SCN from the server.
-Only in open-iscsi-2.0-872-rc3-bnx2i.diff/: README.orig
-diff -aurp open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc3-bnx2i.diff/usr/idbm.c
---- open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.c    2010-07-11 03:58:50.000000000 -0500
-+++ open-iscsi-2.0-872-rc3-bnx2i.diff/usr/idbm.c       2010-07-11 03:59:00.000000000 -0500
-@@ -2235,9 +2235,9 @@ free_info:
+diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
+index 7c209f6..e94cca0 100644
+--- a/doc/iscsiadm.8
++++ b/doc/iscsiadm.8
+@@ -89,7 +89,7 @@ This option is only valid for ping submode.
+ .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
+ iSCSI (qla4xxx) the iface config must have the hardware address
+ (iface.hwaddress = port's MAC address)
+ and the driver/transport_name (iface.transport_name). The iface's name is
+@@ -166,7 +166,7 @@ If no other options are specified: for \fIdiscoverydb\fR and \fInode\fR, all
+ of their respective records are displayed; for \fIsession\fR, all active
+ sessions and connections are displayed; for \fIfw\fR, all boot firmware
+ values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and
+-for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
++for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
+ .TP
+ \fB\-n\fR, \fB\-\-name=\fIname\fR
+@@ -535,10 +535,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
+ The file containing the iSCSI InitiatorName and InitiatorAlias read by
+ \fBiscsid\fR and \fBiscsiadm\fR on startup.
+ .TP
+-/etc/iscsi/nodes/
++/var/lib/iscsi/nodes/
+ This directory contains the nodes with their targets.
+ .TP
+-/etc/iscsi/send_targets
++/var/lib/iscsi/send_targets
+ This directory contains the portals.
+ .SH "SEE ALSO"
+diff --git a/usr/idbm.c b/usr/idbm.c
+index a1d7d37..806d90e 100644
+--- a/usr/idbm.c
++++ b/usr/idbm.c
+@@ -2472,9 +2472,9 @@ free_info:
  int idbm_init(idbm_get_config_file_fn *fn)
  {
        /* make sure root db dir is there */
@@ -192,13 +195,13 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc3-bnx2i.
                                   errno);
                        return errno;
                }
-Only in open-iscsi-2.0-872-rc3-bnx2i.diff/usr: idbm.c.orig
-diff -aurp open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc3-bnx2i.diff/usr/idbm.h
---- open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.h    2010-07-11 03:45:50.000000000 -0500
-+++ open-iscsi-2.0-872-rc3-bnx2i.diff/usr/idbm.h       2010-07-11 03:59:00.000000000 -0500
-@@ -27,12 +27,15 @@
- #include "initiator.h"
+diff --git a/usr/idbm.h b/usr/idbm.h
+index 245f046..5d81df7 100644
+--- a/usr/idbm.h
++++ b/usr/idbm.h
+@@ -28,12 +28,15 @@
  #include "config.h"
+ #include "list.h"
  
 -#define NODE_CONFIG_DIR               ISCSI_CONFIG_ROOT"nodes"
 -#define SLP_CONFIG_DIR                ISCSI_CONFIG_ROOT"slp"
@@ -218,9 +221,10 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc3-bnx2i.
  #define ST_CONFIG_NAME                "st_config"
  #define ISNS_CONFIG_NAME      "isns_config"
  
-diff -aurp open-iscsi-2.0-872-rc3-bnx2i/usr/iface.h open-iscsi-2.0-872-rc3-bnx2i.diff/usr/iface.h
---- open-iscsi-2.0-872-rc3-bnx2i/usr/iface.h   2010-07-11 03:45:50.000000000 -0500
-+++ open-iscsi-2.0-872-rc3-bnx2i.diff/usr/iface.h      2010-07-11 03:59:00.000000000 -0500
+diff --git a/usr/iface.h b/usr/iface.h
+index 01f7074..f396918 100644
+--- a/usr/iface.h
++++ b/usr/iface.h
 @@ -20,7 +20,9 @@
  #ifndef ISCSI_IFACE_H
  #define ISCSI_IFACE_H
@@ -232,3 +236,6 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/usr/iface.h open-iscsi-2.0-872-rc3-bnx2i
  
  struct iface_rec;
  struct list_head;
+-- 
+1.7.11.7
+