mchristi a3c1930
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8 open-iscsi-2.0-872-rc4-bnx2i.work/doc/iscsiadm.8
mchristi a3c1930
--- open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8	2011-01-31 02:32:51.000000000 -0600
mchristi a3c1930
+++ open-iscsi-2.0-872-rc4-bnx2i.work/doc/iscsiadm.8	2011-01-31 02:33:29.000000000 -0600
mchristi a3c1930
@@ -57,7 +57,7 @@ scsi layer.
mchristi f8d692d
 .TP
mchristi a3c1930
 \fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
mchristi f8d692d
 The interface argument specifies the iSCSI interface to use for the operation.
mchristi f8d692d
-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
mchristi f8d692d
+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
mchristi f8d692d
 iSCSI (qla4xxx) the iface config must have the hardware address
mchristi f8d692d
 (iface.hwaddress = port's MAC address)
mchristi f8d692d
 and the driver/transport_name (iface.transport_name). The iface's name is
mchristi a3c1930
@@ -134,7 +134,7 @@ If no other options are specified: for \
mchristi f8d692d
 of their respective records are displayed; for \fIsession\fR, all active
mchristi f8d692d
 sessions and connections are displayed; for \fIfw\fR, all boot firmware
mchristi f8d692d
 values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and
mchristi f8d692d
-for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
mchristi f8d692d
+for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
mchristi f8d692d
 
mchristi f8d692d
 .TP
mchristi f8d692d
 \fB\-n\fR, \fB\-\-name=\fIname\fR
mchristi a3c1930
@@ -488,10 +488,10 @@ The configuration file read by \fBiscsid
mchristi f8d692d
 The file containing the iSCSI InitiatorName and InitiatorAlias read by
mchristi f8d692d
 \fBiscsid\fR and \fBiscsiadm\fR on startup.
mchristi f8d692d
 .TP
mchristi f8d692d
-/etc/iscsi/nodes/
mchristi f8d692d
+/var/lib/iscsi/nodes/
mchristi f8d692d
 This directory contains the nodes with their targets.
mchristi f8d692d
 .TP
mchristi f8d692d
-/etc/iscsi/send_targets
mchristi f8d692d
+/var/lib/iscsi/send_targets
mchristi f8d692d
 This directory contains the portals.
mchristi f8d692d
 
mchristi f8d692d
 .SH "SEE ALSO"
mchristi a3c1930
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work/README
mchristi a3c1930
--- open-iscsi-2.0-872-rc4-bnx2i/README	2011-01-31 02:32:57.000000000 -0600
mchristi a3c1930
+++ open-iscsi-2.0-872-rc4-bnx2i.work/README	2011-01-31 02:33:29.000000000 -0600
mchristi aadf696
@@ -144,10 +144,10 @@ available on all Linux installations.
dgregor 2628f30
 
dgregor 2628f30
 The database contains two tables:
dgregor 2628f30
 
dgregor 2628f30
-- Discovery table (/etc/iscsi/send_targets);
dgregor 2628f30
-- Node table (/etc/iscsi/nodes).
dgregor 2628f30
+- Discovery table (/var/lib/iscsi/send_targets);
dgregor 2628f30
+- Node table (/var/lib/iscsi/nodes).
dgregor 2628f30
 
dgregor 2628f30
-The regular place for iSCSI database files: /etc/iscsi/nodes
dgregor 2628f30
+The regular place for iSCSI database files: /var/lib/iscsi/nodes
dgregor 2628f30
 
dgregor 2628f30
 The iscsiadm utility is a command-line tool to manage (update, delete,
dgregor 2628f30
 insert, query) the persistent database.
mchristi f8d692d
@@ -420,7 +420,7 @@ a scsi_host per HBA port).
dgregor 2628f30
 To manage both types of initiator stacks, iscsiadm uses the interface (iface)
dgregor 2628f30
 structure. For each HBA port or for software iscsi for each network
dgregor 2628f30
 device (ethX) or NIC, that you wish to bind sessions to you must create
dgregor 2628f30
-a iface config /etc/iscsi/ifaces.
dgregor 2628f30
+a iface config /var/lib/iscsi/ifaces.
dgregor 2628f30
 
mchristi 05db5ec
 Running:
mchristi 05db5ec
 
mchristi f8d692d
@@ -428,29 +428,29 @@ Running:
mchristi 05db5ec
 iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax
mchristi 05db5ec
 iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax
dgregor 2628f30
 
dgregor 2628f30
-Will report iface configurations that are setup in /etc/iscsi/ifaces.
dgregor 2628f30
+Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
dgregor 2628f30
 The format is:
dgregor 2628f30
 
mchristi 05db5ec
 iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
dgregor 2628f30
 
dgregor 2628f30
 For software iscsi, you can create the iface configs by hand, but it is
dgregor 2628f30
 reccomended that you use iscsiadm's iface mode. There is a iface.example in
dgregor 2628f30
-/etc/iscsi/ifaces which can be used as a template for the daring.
dgregor 2628f30
+/var/lib/iscsi/ifaces which can be used as a template for the daring.
dgregor 2628f30
 
dgregor 2628f30
 For each network object you wish to bind a session to you must create
dgregor 2628f30
-a seperate iface config in /etc/iscsi/ifaces and each iface config file
dgregor 2628f30
+a seperate iface config in /var/lib/iscsi/ifaces and each iface config file
dgregor 2628f30
 must have a unique name which is less than or equal to 64 characters.
dgregor 2628f30
 
dgregor 2628f30
 Example:
dgregor 2628f30
 
dgregor 2628f30
 If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with
dgregor 2628f30
 MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over
dgregor 2628f30
-TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter:
dgregor 2628f30
+TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter:
dgregor 2628f30
 
dgregor 2628f30
 iface.transport_name = tcp
dgregor 2628f30
 iface.hwaddress = 00:0F:1F:92:6B:BF
mchristi 220fdb5
 
dgregor 2628f30
-and in /etc/iscsi/ifaces/iface1 you would enter:
dgregor 2628f30
+and in /var/lib/iscsi/ifaces/iface1 you would enter:
dgregor 2628f30
 
dgregor 2628f30
 iface.transport_name = tcp
dgregor 2628f30
 iface.hwaddress = 00:C0:DD:08:63:E7
mchristi f8d692d
@@ -499,7 +499,7 @@ iser iser,<empty>,<empty>,<empty>,
mchristi 05db5ec
 cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
mchristi 05db5ec
 
mchristi 05db5ec
 
mchristi 05db5ec
-Will report iface configurations that are setup in /etc/iscsi/ifaces.
mchristi 05db5ec
+Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
mchristi 05db5ec
 The format is:
mchristi 05db5ec
 
mchristi 05db5ec
 iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
mchristi f8d692d
@@ -515,7 +515,7 @@ default one in /etc/iscsi/initiatorname.
mchristi 05db5ec
 
mchristi 05db5ec
 
mchristi 05db5ec
 
mchristi 05db5ec
-To display these values in a more friendly run:
mchristi 05db5ec
+To display these values in a more friendly way run:
mchristi 05db5ec
 
mchristi 05db5ec
 iscsiadm -m iface -I cxgb3i.00:07:43:05:97:07
mchristi 05db5ec
 # BEGIN RECORD 2.0-871
mchristi f8d692d
@@ -553,7 +553,7 @@ need a seperate network connection to th
mchristi 05db5ec
 *This will be fixed in the next version of open-iscsi*
dgregor 2628f30
 
mchristi 05db5ec
 For compatibility reasons, when you run iscsiadm to do discovery, it
mchristi 05db5ec
-will check for interfaces in /etc/iscsi/iscsi/ifaces that are using
mchristi 05db5ec
+will check for interfaces in /var/lib/iscsi/ifaces that are using
mchristi 05db5ec
 tcp for the iface.transport and it will bind the portals that are discovered
mchristi 05db5ec
 so that they will be logged in through those ifaces. This behavior can also
mchristi 05db5ec
 be overriden by passing in the interfaces you want to use. For the case
mchristi f8d692d
@@ -571,7 +571,7 @@ we do not bind a session to a iface, the
dgregor 2628f30
 
mchristi f8d692d
 iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1
dgregor 2628f30
 
dgregor 2628f30
-And if you did not define any interfaces in /etc/iscsi/ifaces and do
dgregor 2628f30
+And if you did not define any interfaces in /var/lib/iscsi/ifaces and do
dgregor 2628f30
 not pass anything into iscsiadm, running iscsiadm will do the default
dgregor 2628f30
 behavior, where we allow the network subsystem to decide which
dgregor 2628f30
 device to use.
mchristi f8d692d
@@ -613,13 +613,13 @@ To now log into targets it is the same a
mchristi f8d692d
 
mchristi f8d692d
 	    ./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover
mchristi f8d692d
 
mchristi f8d692d
-	This will search /etc/iscsi/send_targets for a record with the
mchristi f8d692d
+	This will search /var/lib/iscsi/send_targets for a record with the
mchristi f8d692d
 	ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it
mchristi f8d692d
 	will perform discovery using the settings stored in the record.
mchristi f8d692d
 	If a record does not exist, it will be created using the iscsid.conf
mchristi f8d692d
 	discovery settings.
mchristi f8d692d
 
mchristi f8d692d
-	For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for
mchristi f8d692d
+	For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for
mchristi f8d692d
 	interfaces using software iscsi. If any are found then nodes found
mchristi f8d692d
 	during discovery will be setup so that they can logged in through
mchristi f8d692d
 	those interfaces. To specify a specific iface, pass the
mchristi f8d692d
@@ -675,7 +675,7 @@ To now log into targets it is the same a
mchristi aadf696
 	This command will perform discovery, but not manipulate the node DB.
dgregor 2628f30
 
dgregor 2628f30
   - SendTargets iSCSI Discovery with a specific interface. If you
dgregor 2628f30
-	wish to only use a subset of the interfaces in /etc/iscsi/ifaces
dgregor 2628f30
+	wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces
dgregor 2628f30
 	then you can pass them in during discovery:
dgregor 2628f30
 
mchristi f8d692d
 	     ./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \
mchristi f8d692d
@@ -982,8 +982,8 @@ where targetname is the name of the targ
dgregor 2628f30
 and port of the portal. tpgt, is the portal group tag of
dgregor 2628f30
 the portal, and is not used in iscsiadm commands except for static
dgregor 2628f30
 record creation. And iface name is the name of the iscsi interface
dgregor 2628f30
-defined in /etc/iscsi/ifaces. If no interface was defined in
dgregor 2628f30
-/etc/iscsi/ifaces or passed in, the default behavior is used.
dgregor 2628f30
+defined in /var/lib/iscsi/ifaces. If no interface was defined in
dgregor 2628f30
+/var/lib/iscsi/ifaces or passed in, the default behavior is used.
dgregor 2628f30
 Default here is iscsi_tcp/tcp to be used over which ever NIC the
dgregor 2628f30
 network layer decides is best.
dgregor 2628f30
 
mchristi f8d692d
@@ -1098,7 +1098,7 @@ If set, iscsid will perform discovery to
mchristi f8d692d
 discovery.isns.discoveryd_poll_inval or
mchristi f8d692d
 discovery.sendtargets.discoveryd_poll_inval seconds,
mchristi f8d692d
 and it will log into any portals found from the discovery source using
mchristi f8d692d
-the ifaces in /etc/iscsi/ifaces.
mchristi f8d692d
+the ifaces in /var/lib/iscsi/ifaces.
mchristi f8d692d
 
mchristi f8d692d
 Note that for iSNS the poll_interval does not have to be set. If not set,
mchristi f8d692d
 iscsid will only perform rediscovery when it gets a SCN from the server.
mchristi a3c1930
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c
mchristi a3c1930
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c	2011-01-31 02:32:57.000000000 -0600
mchristi a3c1930
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c	2011-01-31 02:33:29.000000000 -0600
mchristi a3c1930
@@ -2285,9 +2285,9 @@ free_info:
dgregor 2628f30
 int idbm_init(idbm_get_config_file_fn *fn)
mchristi 220fdb5
 {
dgregor 2628f30
 	/* make sure root db dir is there */
dgregor 2628f30
-	if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
dgregor 2628f30
-		if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
dgregor 2628f30
-			log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
dgregor 2628f30
+	if (access(ISCSIVAR, F_OK) != 0) {
dgregor 2628f30
+		if (mkdir(ISCSIVAR, 0660) != 0) {
dgregor 2628f30
+			log_error("Could not make %s %d\n", ISCSIVAR,
dgregor 2628f30
 				   errno);
dgregor 2628f30
 			return errno;
mchristi 220fdb5
 		}
mchristi a3c1930
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h
mchristi a3c1930
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h	2011-01-31 02:32:51.000000000 -0600
mchristi a3c1930
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h	2011-01-31 02:33:29.000000000 -0600
mchristi aadf696
@@ -27,12 +27,15 @@
dgregor 2628f30
 #include "initiator.h"
dgregor 2628f30
 #include "config.h"
dgregor 2628f30
 
dgregor 2628f30
-#define NODE_CONFIG_DIR		ISCSI_CONFIG_ROOT"nodes"
dgregor 2628f30
-#define SLP_CONFIG_DIR		ISCSI_CONFIG_ROOT"slp"
dgregor 2628f30
-#define ISNS_CONFIG_DIR		ISCSI_CONFIG_ROOT"isns"
dgregor 2628f30
-#define STATIC_CONFIG_DIR	ISCSI_CONFIG_ROOT"static"
mchristi 05db5ec
-#define FW_CONFIG_DIR		ISCSI_CONFIG_ROOT"fw"
dgregor 2628f30
-#define ST_CONFIG_DIR		ISCSI_CONFIG_ROOT"send_targets"
dgregor 2628f30
+#define ISCSIVAR		"/var/lib/iscsi/"
mchristi 05db5ec
+
dgregor 2628f30
+#define NODE_CONFIG_DIR		ISCSIVAR"nodes"
dgregor 2628f30
+#define SLP_CONFIG_DIR		ISCSIVAR"slp"
dgregor 2628f30
+#define ISNS_CONFIG_DIR		ISCSIVAR"isns"
dgregor 2628f30
+#define STATIC_CONFIG_DIR	ISCSIVAR"static"
dgregor 2628f30
+#define ST_CONFIG_DIR		ISCSIVAR"send_targets"
mchristi 05db5ec
+#define FW_CONFIG_DIR		ISCSIVAR"fw"
mchristi 05db5ec
+
dgregor 2628f30
 #define ST_CONFIG_NAME		"st_config"
mchristi f8d692d
 #define ISNS_CONFIG_NAME	"isns_config"
dgregor 2628f30
 
mchristi a3c1930
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iface.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.h
mchristi a3c1930
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iface.h	2010-07-11 04:05:58.000000000 -0500
mchristi a3c1930
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.h	2011-01-31 02:33:29.000000000 -0600
mchristi 05db5ec
@@ -20,7 +20,9 @@
dgregor 2628f30
 #ifndef ISCSI_IFACE_H
dgregor 2628f30
 #define ISCSI_IFACE_H
dgregor 2628f30
 
dgregor 2628f30
-#define IFACE_CONFIG_DIR	ISCSI_CONFIG_ROOT"ifaces"
mchristi 05db5ec
+#include "idbm.h"
mchristi 05db5ec
+
mchristi 05db5ec
+#define IFACE_CONFIG_DIR	ISCSIVAR"ifaces"
dgregor 2628f30
 
dgregor 2628f30
 struct iface_rec;
dgregor 2628f30
 struct list_head;