a4c8b3
diff -aurp open-iscsi-2.0-870-rc1/doc/iscsiadm.8 open-iscsi-2.0-870-rc1.work/doc/iscsiadm.8
a4c8b3
--- open-iscsi-2.0-870-rc1/doc/iscsiadm.8	2008-06-30 20:14:03.000000000 -0500
a4c8b3
+++ open-iscsi-2.0-870-rc1.work/doc/iscsiadm.8	2008-06-30 21:36:44.000000000 -0500
5a3872
@@ -47,7 +47,7 @@ display help text and exit
5a3872
 .TP
5a3872
 \fB\-I\fR, \fB\-\-interface\fI[iface]\fR
5a3872
 The interface argument specifies the iSCSI interface to use for the operation.
5a3872
-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
5a3872
+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
a4c8b3
 or the iface config must have the hardware address (iface.hwaddress)
5a3872
 and the driver/transport_name (iface.transport_name). The iface's name is
5a3872
 then the filename of the iface config. For software iSCSI, the iface config
a4c8b3
@@ -317,10 +317,10 @@ The configuration file read by \fBiscsid
5a3872
 The file containing the iSCSI InitiatorName and InitiatorAlias read by
5a3872
 \fBiscsid\fR and \fBiscsiadm\fR on startup.
5a3872
 .TP
5a3872
-/etc/iscsi/nodes/
5a3872
+/var/lib/iscsi/nodes/
5a3872
 This directory contains the nodes with their targets.
5a3872
 .TP
5a3872
-/etc/iscsi/send_targets
5a3872
+/var/lib/iscsi/send_targets
5a3872
 This directory contains the portals.
5a3872
 
5a3872
 .SH "SEE ALSO"
a4c8b3
diff -aurp open-iscsi-2.0-870-rc1/README open-iscsi-2.0-870-rc1.work/README
a4c8b3
--- open-iscsi-2.0-870-rc1/README	2008-06-30 21:37:05.000000000 -0500
a4c8b3
+++ open-iscsi-2.0-870-rc1.work/README	2008-06-30 21:36:44.000000000 -0500
a4c8b3
@@ -148,10 +148,10 @@ available on all Linux installations.
5a3872
 
5a3872
 The database contains two tables:
5a3872
 
5a3872
-- Discovery table (/etc/iscsi/send_targets);
5a3872
-- Node table (/etc/iscsi/nodes).
5a3872
+- Discovery table (/var/lib/iscsi/send_targets);
5a3872
+- Node table (/var/lib/iscsi/nodes).
5a3872
 
5a3872
-The regular place for iSCSI database files: /etc/iscsi/nodes
5a3872
+The regular place for iSCSI database files: /var/lib/iscsi/nodes
5a3872
 
5a3872
 The iscsiadm utility is a command-line tool to manage (update, delete,
5a3872
 insert, query) the persistent database.
a4c8b3
@@ -327,7 +327,7 @@ a scsi_host per HBA port).
5a3872
 To manage both types of initiator stacks, iscsiadm uses the interface (iface)
5a3872
 structure. For each HBA port or for software iscsi for each network
5a3872
 device (ethX) or NIC, that you wish to bind sessions to you must create
5a3872
-a iface config /etc/iscsi/ifaces.
5a3872
+a iface config /var/lib/iscsi/ifaces.
5a3872
 
5a3872
 When you run iscsiadm the first time a hardware iscsi driver like qla4xxx is
5a3872
 loaded, iscsiadm will create default iface configs for you. The config created
a4c8b3
@@ -340,29 +340,29 @@ Running:
5a3872
 iface0 qla4xxx,00:c0:dd:08:63:e8,default
5a3872
 iface1 qla4xxx,00:c0:dd:08:63:ea,default
5a3872
 
5a3872
-Will report iface configurations that are setup in /etc/iscsi/ifaces.
5a3872
+Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
5a3872
 The format is:
5a3872
 
5a3872
 iface_name transport_name,hwaddress,net_ifacename
5a3872
 
5a3872
 For software iscsi, you can create the iface configs by hand, but it is
5a3872
 reccomended that you use iscsiadm's iface mode. There is a iface.example in
5a3872
-/etc/iscsi/ifaces which can be used as a template for the daring.
5a3872
+/var/lib/iscsi/ifaces which can be used as a template for the daring.
5a3872
 
5a3872
 For each network object you wish to bind a session to you must create
5a3872
-a seperate iface config in /etc/iscsi/ifaces and each iface config file
5a3872
+a seperate iface config in /var/lib/iscsi/ifaces and each iface config file
5a3872
 must have a unique name which is less than or equal to 64 characters.
5a3872
 
5a3872
 Example:
5a3872
 
5a3872
 If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with
5a3872
 MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over
5a3872
-TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter:
5a3872
+TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter:
5a3872
 
5a3872
 iface.transport_name = tcp
5a3872
 iface.hwaddress = 00:0F:1F:92:6B:BF
5a3872
 
5a3872
-and in /etc/iscsi/ifaces/iface1 you would enter:
5a3872
+and in /var/lib/iscsi/ifaces/iface1 you would enter:
5a3872
 
5a3872
 iface.transport_name = tcp
5a3872
 iface.hwaddress = 00:C0:DD:08:63:E7
a4c8b3
@@ -386,7 +386,7 @@ but you have not logged in then, iscsiad
5a3872
 all existing bindings.
5a3872
 
5a3872
 When you then run iscsiadm to do discovery, it will check for interfaces
5a3872
-in /etc/iscsi/ifaces and bind the portals that are discovered so that
5a3872
+in /var/lib/iscsi/ifaces and bind the portals that are discovered so that
5a3872
 they will be logged in through each iface. This behavior can also be overriden
5a3872
 by passing in the interfaces you want to use. For example if you had defined
5a3872
 two interface but only wanted to use one you can use the
a4c8b3
@@ -400,7 +400,7 @@ we do not bind a session to a iface, the
5a3872
 
5a3872
 iscsiadm -m discovery -t st -p ip:port -I default -P 1
5a3872
 
5a3872
-And if you did not define any interfaces in /etc/iscsi/ifaces and do
5a3872
+And if you did not define any interfaces in /var/lib/iscsi/ifaces and do
5a3872
 not pass anything into iscsiadm, running iscsiadm will do the default
5a3872
 behavior, where we allow the network subsystem to decide which
5a3872
 device to use.
a4c8b3
@@ -435,7 +435,7 @@ iscsiadm -m node -p ip:port -I iface0 --
5a3872
 
5a3872
 	    ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260
5a3872
 
5a3872
-	This will first search /etc/iscsi/ifaces for interfaces
5a3872
+	This will first search /var/lib/iscsi/ifaces for interfaces
5a3872
 	using software iscsi. If any are found then nodes found during
5a3872
 	discovery will be setup so that they can logged in through
5a3872
 	those interfaces.
a4c8b3
@@ -483,7 +483,7 @@ iscsiadm -m node -p ip:port -I iface0 --
a4c8b3
 	existing portals.
5a3872
 
a4c8b3
   - SendTargets iSCSI Discovery with a specific interface. If you
5a3872
-	wish to only use a subset of the interfaces in /etc/iscsi/ifaces
5a3872
+	wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces
5a3872
 	then you can pass them in during discovery:
5a3872
 
5a3872
 	     ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260 \
a4c8b3
@@ -768,8 +768,8 @@ where targetname is the name of the targ
a4c8b3
 and port of the portal. tpgt, is the portal group tag of
a4c8b3
 the portal, and is not used in iscsiadm commands except for static
a4c8b3
 record creation. And iface name is the name of the iscsi interface
a4c8b3
-defined in /etc/iscsi/ifaces. If no interface was defined in
a4c8b3
-/etc/iscsi/ifaces or passed in, the default behavior is used.
a4c8b3
+defined in /var/lib/iscsi/ifaces. If no interface was defined in
a4c8b3
+/var/lib/iscsi/ifaces or passed in, the default behavior is used.
a4c8b3
 Default here is iscsi_tcp/tcp to be used over which ever NIC the
a4c8b3
 network layer decides is best.
a4c8b3
 
a4c8b3
diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.c open-iscsi-2.0-870-rc1.work/usr/idbm.c
a4c8b3
--- open-iscsi-2.0-870-rc1/usr/idbm.c	2008-06-30 20:14:03.000000000 -0500
a4c8b3
+++ open-iscsi-2.0-870-rc1.work/usr/idbm.c	2008-06-30 21:36:44.000000000 -0500
a4c8b3
@@ -2137,9 +2137,9 @@ free_info:
a4c8b3
 int idbm_init(idbm_get_config_file_fn *fn)
a4c8b3
 {
d3d856
 	/* make sure root db dir is there */
d3d856
-	if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
d3d856
-		if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
d3d856
-			log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
d3d856
+	if (access(ISCSIVAR, F_OK) != 0) {
d3d856
+		if (mkdir(ISCSIVAR, 0660) != 0) {
d3d856
+			log_error("Could not make %s %d\n", ISCSIVAR,
d3d856
 				   errno);
a4c8b3
 			return errno;
mchristi a7062b
 		}
a4c8b3
diff -aurp open-iscsi-2.0-870-rc1/usr/idbm.h open-iscsi-2.0-870-rc1.work/usr/idbm.h
a4c8b3
--- open-iscsi-2.0-870-rc1/usr/idbm.h	2008-06-30 20:14:03.000000000 -0500
a4c8b3
+++ open-iscsi-2.0-870-rc1.work/usr/idbm.h	2008-06-30 21:36:58.000000000 -0500
a4c8b3
@@ -26,11 +26,12 @@
d3d856
 #include "initiator.h"
d3d856
 #include "config.h"
mchristi a7062b
 
d3d856
-#define NODE_CONFIG_DIR		ISCSI_CONFIG_ROOT"nodes"
d3d856
-#define SLP_CONFIG_DIR		ISCSI_CONFIG_ROOT"slp"
d3d856
-#define ISNS_CONFIG_DIR		ISCSI_CONFIG_ROOT"isns"
d3d856
-#define STATIC_CONFIG_DIR	ISCSI_CONFIG_ROOT"static"
d3d856
-#define ST_CONFIG_DIR		ISCSI_CONFIG_ROOT"send_targets"
d3d856
+#define ISCSIVAR		"/var/lib/iscsi/"
d3d856
+#define NODE_CONFIG_DIR		ISCSIVAR"nodes"
d3d856
+#define SLP_CONFIG_DIR		ISCSIVAR"slp"
d3d856
+#define ISNS_CONFIG_DIR		ISCSIVAR"isns"
d3d856
+#define STATIC_CONFIG_DIR	ISCSIVAR"static"
d3d856
+#define ST_CONFIG_DIR		ISCSIVAR"send_targets"
d3d856
 #define ST_CONFIG_NAME		"st_config"
mchristi a7062b
 
d3d856
 #define TYPE_INT	0
a4c8b3
diff -aurp open-iscsi-2.0-870-rc1/usr/iface.h open-iscsi-2.0-870-rc1.work/usr/iface.h
a4c8b3
--- open-iscsi-2.0-870-rc1/usr/iface.h	2008-06-30 20:14:03.000000000 -0500
a4c8b3
+++ open-iscsi-2.0-870-rc1.work/usr/iface.h	2008-06-30 21:36:44.000000000 -0500
a4c8b3
@@ -20,7 +20,7 @@
a4c8b3
 #ifndef ISCSI_IFACE_H
a4c8b3
 #define ISCSI_IFACE_H
a4c8b3
 
a4c8b3
-#define IFACE_CONFIG_DIR	ISCSI_CONFIG_ROOT"ifaces"
a4c8b3
+#define IFACE_CONFIG_DIR	"/var/lib/iscsi/ifaces"
a4c8b3
 
a4c8b3
 struct iface_rec;
a4c8b3
 struct list_head;