forked from pool/open-iscsi
36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
|
From 96de3656d3eb10dedcee1d9b31156f35bf519d17 Mon Sep 17 00:00:00 2001
|
||
|
From: Hannes Reinecke <hare@suse.de>
|
||
|
Date: Wed, 12 Nov 2008 15:28:46 +0100
|
||
|
Subject: [PATCH] Allow LOCK_DIR to be set via CFLAGS
|
||
|
|
||
|
For root on iSCSI we have to move idbm's LOCK_DIR to eg /etc/iscsi,
|
||
|
as the /var directory might not be available. So make it configurable
|
||
|
during compile-time.
|
||
|
|
||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||
|
---
|
||
|
usr/initiator.h | 6 ++++--
|
||
|
1 files changed, 4 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/usr/initiator.h b/usr/initiator.h
|
||
|
index 682ebfc..033cce9 100644
|
||
|
--- a/usr/initiator.h
|
||
|
+++ b/usr/initiator.h
|
||
|
@@ -39,9 +39,11 @@
|
||
|
#define INITIATOR_NAME_FILE ISCSI_CONFIG_ROOT"initiatorname.iscsi"
|
||
|
|
||
|
#define PID_FILE "/var/run/iscsid.pid"
|
||
|
+#ifndef LOCK_DIR
|
||
|
#define LOCK_DIR "/var/lock/iscsi"
|
||
|
-#define LOCK_FILE "/var/lock/iscsi/lock"
|
||
|
-#define LOCK_WRITE_FILE "/var/lock/iscsi/lock.write"
|
||
|
+#endif
|
||
|
+#define LOCK_FILE LOCK_DIR"/lock"
|
||
|
+#define LOCK_WRITE_FILE LOCK_DIR"/lock.write"
|
||
|
|
||
|
typedef enum iscsi_conn_state_e {
|
||
|
STATE_FREE,
|
||
|
--
|
||
|
1.6.0.2
|
||
|
|