5a3872e
diff -aurp open-iscsi-2.0-868-test1/doc/iscsiadm.8 open-iscsi-2.0-868-test1.tmp/doc/iscsiadm.8
5a3872e
--- open-iscsi-2.0-868-test1/doc/iscsiadm.8	2008-01-03 14:07:04.000000000 -0600
5a3872e
+++ open-iscsi-2.0-868-test1.tmp/doc/iscsiadm.8	2008-01-03 14:08:44.000000000 -0600
5a3872e
@@ -47,7 +47,7 @@ display help text and exit
5a3872e
 .TP
5a3872e
 \fB\-I\fR, \fB\-\-interface\fI[iface]\fR
5a3872e
 The interface argument specifies the iSCSI interface to use for the operation.
5a3872e
-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
5a3872e
+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
5a3872e
 or offload, the iface config must have the hardware address (iface.hwaddress)
5a3872e
 and the driver/transport_name (iface.transport_name). The iface's name is
5a3872e
 then the filename of the iface config. For software iSCSI, the iface config
5a3872e
@@ -310,10 +310,10 @@ The configuration file read by \fBiscsid
5a3872e
 The file containing the iSCSI InitiatorName and InitiatorAlias read by
5a3872e
 \fBiscsid\fR and \fBiscsiadm\fR on startup.
5a3872e
 .TP
5a3872e
-/etc/iscsi/nodes/
5a3872e
+/var/lib/iscsi/nodes/
5a3872e
 This directory contains the nodes with their targets.
5a3872e
 .TP
5a3872e
-/etc/iscsi/send_targets
5a3872e
+/var/lib/iscsi/send_targets
5a3872e
 This directory contains the portals.
5a3872e
 
5a3872e
 .SH "SEE ALSO"
5a3872e
diff -aurp open-iscsi-2.0-868-test1/README open-iscsi-2.0-868-test1.tmp/README
5a3872e
--- open-iscsi-2.0-868-test1/README	2008-01-03 14:07:04.000000000 -0600
5a3872e
+++ open-iscsi-2.0-868-test1.tmp/README	2008-01-03 14:05:35.000000000 -0600
5a3872e
@@ -138,10 +138,10 @@ available on all Linux installations.
5a3872e
 
5a3872e
 The database contains two tables:
5a3872e
 
5a3872e
-- Discovery table (/etc/iscsi/send_targets);
5a3872e
-- Node table (/etc/iscsi/nodes).
5a3872e
+- Discovery table (/var/lib/iscsi/send_targets);
5a3872e
+- Node table (/var/lib/iscsi/nodes).
5a3872e
 
5a3872e
-The regular place for iSCSI database files: /etc/iscsi/nodes
5a3872e
+The regular place for iSCSI database files: /var/lib/iscsi/nodes
5a3872e
 
5a3872e
 The iscsiadm utility is a command-line tool to manage (update, delete,
5a3872e
 insert, query) the persistent database.
5a3872e
@@ -288,7 +288,7 @@ a scsi_host per HBA port).
5a3872e
 To manage both types of initiator stacks, iscsiadm uses the interface (iface)
5a3872e
 structure. For each HBA port or for software iscsi for each network
5a3872e
 device (ethX) or NIC, that you wish to bind sessions to you must create
5a3872e
-a iface config /etc/iscsi/ifaces.
5a3872e
+a iface config /var/lib/iscsi/ifaces.
5a3872e
 
5a3872e
 When you run iscsiadm the first time a hardware iscsi driver like qla4xxx is
5a3872e
 loaded, iscsiadm will create default iface configs for you. The config created
5a3872e
@@ -301,29 +301,29 @@ Running:
5a3872e
 iface0 qla4xxx,00:c0:dd:08:63:e8,default
5a3872e
 iface1 qla4xxx,00:c0:dd:08:63:ea,default
5a3872e
 
5a3872e
-Will report iface configurations that are setup in /etc/iscsi/ifaces.
5a3872e
+Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
5a3872e
 The format is:
5a3872e
 
5a3872e
 iface_name transport_name,hwaddress,net_ifacename
5a3872e
 
5a3872e
 For software iscsi, you can create the iface configs by hand, but it is
5a3872e
 reccomended that you use iscsiadm's iface mode. There is a iface.example in
5a3872e
-/etc/iscsi/ifaces which can be used as a template for the daring.
5a3872e
+/var/lib/iscsi/ifaces which can be used as a template for the daring.
5a3872e
 
5a3872e
 For each network object you wish to bind a session to you must create
5a3872e
-a seperate iface config in /etc/iscsi/ifaces and each iface config file
5a3872e
+a seperate iface config in /var/lib/iscsi/ifaces and each iface config file
5a3872e
 must have a unique name which is less than or equal to 64 characters.
5a3872e
 
5a3872e
 Example:
5a3872e
 
5a3872e
 If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with
5a3872e
 MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over
5a3872e
-TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter:
5a3872e
+TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter:
5a3872e
 
5a3872e
 iface.transport_name = tcp
5a3872e
 iface.hwaddress = 00:0F:1F:92:6B:BF
5a3872e
 
5a3872e
-and in /etc/iscsi/ifaces/iface1 you would enter:
5a3872e
+and in /var/lib/iscsi/ifaces/iface1 you would enter:
5a3872e
 
5a3872e
 iface.transport_name = tcp
5a3872e
 iface.hwaddress = 00:C0:DD:08:63:E7
5a3872e
@@ -347,7 +347,7 @@ but you have not logged in then, iscsiad
5a3872e
 all existing bindings.
5a3872e
 
5a3872e
 When you then run iscsiadm to do discovery, it will check for interfaces
5a3872e
-in /etc/iscsi/ifaces and bind the portals that are discovered so that
5a3872e
+in /var/lib/iscsi/ifaces and bind the portals that are discovered so that
5a3872e
 they will be logged in through each iface. This behavior can also be overriden
5a3872e
 by passing in the interfaces you want to use. For example if you had defined
5a3872e
 two interface but only wanted to use one you can use the
5a3872e
@@ -361,7 +361,7 @@ we do not bind a session to a iface, the
5a3872e
 
5a3872e
 iscsiadm -m discovery -t st -p ip:port -I default -P 1
5a3872e
 
5a3872e
-And if you did not define any interfaces in /etc/iscsi/ifaces and do
5a3872e
+And if you did not define any interfaces in /var/lib/iscsi/ifaces and do
5a3872e
 not pass anything into iscsiadm, running iscsiadm will do the default
5a3872e
 behavior, where we allow the network subsystem to decide which
5a3872e
 device to use.
5a3872e
@@ -396,13 +396,13 @@ iscsiadm -m node -p ip:port -I iface0 --
5a3872e
 
5a3872e
 	    ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260
5a3872e
 
5a3872e
-	This will first search /etc/iscsi/ifaces for interfaces
5a3872e
+	This will first search /var/lib/iscsi/ifaces for interfaces
5a3872e
 	using software iscsi. If any are found then nodes found during
5a3872e
 	discovery will be setup so that they can logged in through
5a3872e
 	those interfaces.
5a3872e
 
5a3872e
     - SendTargets iSCSI Discovery with a specific interface. If you
5a3872e
-	wish to only use a subset of the interfaces in /etc/iscsi/ifaces
5a3872e
+	wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces
5a3872e
 	then you can pass them in during discovery:
5a3872e
 
5a3872e
 	     ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260 \
5a3872e
diff -aurp open-iscsi-2.0-868-test1/usr/idbm.c open-iscsi-2.0-868-test1.tmp/usr/idbm.c
5a3872e
--- open-iscsi-2.0-868-test1/usr/idbm.c	2008-01-03 14:07:04.000000000 -0600
5a3872e
+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.c	2008-01-03 14:03:36.000000000 -0600
5a3872e
@@ -2582,9 +2582,9 @@ idbm_init(idbm_get_config_file_fn *fn)
d3d8564
 	idbm_t *db;
mchristi a7062b5
 
d3d8564
 	/* make sure root db dir is there */
d3d8564
-	if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
d3d8564
-		if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
d3d8564
-			log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
d3d8564
+	if (access(ISCSIVAR, F_OK) != 0) {
d3d8564
+		if (mkdir(ISCSIVAR, 0660) != 0) {
d3d8564
+			log_error("Could not make %s %d\n", ISCSIVAR,
d3d8564
 				   errno);
d3d8564
 			return NULL;
mchristi a7062b5
 		}
5a3872e
Only in open-iscsi-2.0-868-test1.tmp/usr: idbm.c.orig
5a3872e
diff -aurp open-iscsi-2.0-868-test1/usr/idbm.h open-iscsi-2.0-868-test1.tmp/usr/idbm.h
5a3872e
--- open-iscsi-2.0-868-test1/usr/idbm.h	2008-01-03 13:23:36.000000000 -0600
5a3872e
+++ open-iscsi-2.0-868-test1.tmp/usr/idbm.h	2008-01-03 14:03:36.000000000 -0600
d3d8564
@@ -26,12 +26,14 @@
d3d8564
 #include "initiator.h"
d3d8564
 #include "config.h"
mchristi a7062b5
 
d3d8564
-#define NODE_CONFIG_DIR		ISCSI_CONFIG_ROOT"nodes"
d3d8564
-#define IFACE_CONFIG_DIR	ISCSI_CONFIG_ROOT"ifaces"
d3d8564
-#define SLP_CONFIG_DIR		ISCSI_CONFIG_ROOT"slp"
d3d8564
-#define ISNS_CONFIG_DIR		ISCSI_CONFIG_ROOT"isns"
d3d8564
-#define STATIC_CONFIG_DIR	ISCSI_CONFIG_ROOT"static"
d3d8564
-#define ST_CONFIG_DIR		ISCSI_CONFIG_ROOT"send_targets"
d3d8564
+#define ISCSIVAR		"/var/lib/iscsi/"
mchristi a7062b5
+
d3d8564
+#define NODE_CONFIG_DIR		ISCSIVAR"nodes"
d3d8564
+#define IFACE_CONFIG_DIR	ISCSIVAR"ifaces"
d3d8564
+#define SLP_CONFIG_DIR		ISCSIVAR"slp"
d3d8564
+#define ISNS_CONFIG_DIR		ISCSIVAR"isns"
d3d8564
+#define STATIC_CONFIG_DIR	ISCSIVAR"static"
d3d8564
+#define ST_CONFIG_DIR		ISCSIVAR"send_targets"
d3d8564
 #define ST_CONFIG_NAME		"st_config"
mchristi a7062b5
 
d3d8564
 #define TYPE_INT	0