mchristi aadf696
diff --git a/README b/README
mchristi aadf696
index 121bd45..c863044 100644
mchristi aadf696
--- a/README
mchristi aadf696
+++ b/README
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 aadf696
@@ -352,7 +352,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 aadf696
@@ -360,29 +360,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 aadf696
@@ -431,7 +431,7 @@ iser iser,<empty>,<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 aadf696
@@ -447,7 +447,7 @@ default one in /etc/iscsi/initiatorname.iscsi.
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 aadf696
@@ -485,7 +485,7 @@ need a seperate network connection to the target for discovery purposes.
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 aadf696
@@ -503,7 +503,7 @@ we do not bind a session to a iface, then you can use the special iface
dgregor 2628f30
 
dgregor 2628f30
 iscsiadm -m discovery -t st -p ip:port -I default -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 aadf696
@@ -543,7 +543,7 @@ To now log into targets it is the same as with sofware iscsi. See section
dgregor 2628f30
 
dgregor 2628f30
 	    ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260
dgregor 2628f30
 
dgregor 2628f30
-	This will first search /etc/iscsi/ifaces for interfaces
dgregor 2628f30
+	This will first search /var/lib/iscsi/ifaces for interfaces
dgregor 2628f30
 	using software iscsi. If any are found then nodes found during
dgregor 2628f30
 	discovery will be setup so that they can logged in through
dgregor 2628f30
 	those interfaces.
mchristi aadf696
@@ -598,7 +598,7 @@ To now log into targets it is the same as with sofware iscsi. See section
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
 
dgregor 2628f30
 	     ./iscsiadm -m discovery -t sendtargets -p 192.168.1.1:3260 \
mchristi aadf696
@@ -911,8 +911,8 @@ where targetname is the name of the target and ip_address:port is the address
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 aadf696
diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
mchristi aadf696
index b2bad47..6f1bac9 100644
mchristi aadf696
--- a/doc/iscsiadm.8
mchristi aadf696
+++ b/doc/iscsiadm.8
mchristi aadf696
@@ -49,7 +49,7 @@ display help text and exit
mchristi aadf696
 .TP
mchristi aadf696
 \fB\-I\fR, \fB\-\-interface\fI[iface]\fR
mchristi aadf696
 The interface argument specifies the iSCSI interface to use for the operation.
mchristi aadf696
-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
mchristi aadf696
+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
mchristi aadf696
 iSCSI (qla4xxx) the iface config must have the hardware address
mchristi aadf696
 (iface.hwaddress = port's MAC address)
mchristi aadf696
 and the driver/transport_name (iface.transport_name). The iface's name is
mchristi aadf696
@@ -318,10 +318,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
mchristi aadf696
 The file containing the iSCSI InitiatorName and InitiatorAlias read by
mchristi aadf696
 \fBiscsid\fR and \fBiscsiadm\fR on startup.
mchristi aadf696
 .TP
mchristi aadf696
-/etc/iscsi/nodes/
mchristi aadf696
+/var/lib/iscsi/nodes/
mchristi aadf696
 This directory contains the nodes with their targets.
mchristi aadf696
 .TP
mchristi aadf696
-/etc/iscsi/send_targets
mchristi aadf696
+/var/lib/iscsi/send_targets
mchristi aadf696
 This directory contains the portals.
mchristi aadf696
 
mchristi aadf696
 .SH "SEE ALSO"
mchristi aadf696
diff --git a/usr/idbm.c b/usr/idbm.c
mchristi aadf696
index 8ad8024..f5694f3 100644
mchristi aadf696
--- a/usr/idbm.c
mchristi aadf696
+++ b/usr/idbm.c
mchristi aadf696
@@ -2078,9 +2078,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 aadf696
diff --git a/usr/idbm.h b/usr/idbm.h
mchristi aadf696
index 57b9295..44cb976 100644
mchristi aadf696
--- a/usr/idbm.h
mchristi aadf696
+++ b/usr/idbm.h
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"
dgregor 2628f30
 
dgregor 2628f30
 #define TYPE_INT	0
mchristi aadf696
diff --git a/usr/iface.h b/usr/iface.h
mchristi aadf696
index 9f6d47e..f7624ea 100644
mchristi aadf696
--- a/usr/iface.h
mchristi aadf696
+++ b/usr/iface.h
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;
mchristi aadf696
-- 
mchristi aadf696
1.6.6.1
mchristi aadf696