33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
diff -aurp open-iscsi-6.2.0.695/usr/idbm.c open-iscsi-6.2.0.695.work/usr/idbm.c
|
|
--- open-iscsi-6.2.0.695/usr/idbm.c 2006-09-15 12:06:23.000000000 -0500
|
|
+++ open-iscsi-6.2.0.695.work/usr/idbm.c 2006-10-02 15:10:42.000000000 -0500
|
|
@@ -710,6 +710,13 @@ static int idbm_lock(idbm_t *db)
|
|
return 0;
|
|
}
|
|
|
|
+ if (access(LOCK_DIR, F_OK) != 0) {
|
|
+ if (mkdir(LOCK_DIR, 0660) != 0) {
|
|
+ log_error("Could not open %s. Exiting\n", LOCK_DIR);
|
|
+ exit(-1);
|
|
+ }
|
|
+ }
|
|
+
|
|
fd = open(LOCK_FILE, O_RDWR | O_CREAT, 0666);
|
|
if (fd >= 0)
|
|
close(fd);
|
|
diff -aurp open-iscsi-6.2.0.695/usr/initiator.h open-iscsi-6.2.0.695.work/usr/initiator.h
|
|
--- open-iscsi-6.2.0.695/usr/initiator.h 2006-10-02 15:13:17.000000000 -0500
|
|
+++ open-iscsi-6.2.0.695.work/usr/initiator.h 2006-10-02 14:06:15.000000000 -0500
|
|
@@ -36,8 +36,9 @@
|
|
#define CONFIG_FILE "/etc/iscsi/iscsid.conf"
|
|
#define PID_FILE "/var/run/iscsid.pid"
|
|
#define INITIATOR_NAME_FILE "/etc/iscsi/initiatorname.iscsi"
|
|
-#define LOCK_FILE "/etc/iscsi/lock"
|
|
-#define LOCK_WRITE_FILE "/etc/iscsi/lock.write"
|
|
+#define LOCK_DIR "/var/lock/iscsi"
|
|
+#define LOCK_FILE "/var/lock/iscsi/lock"
|
|
+#define LOCK_WRITE_FILE "/var/lock/iscsi/lock.write"
|
|
|
|
#define DEF_ISCSI_PORT 3260
|
|
|