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