a4c8b301eb
- Add patch to make iscsiadm complain and exit when run as user instead of hang spinning for the database lock - Add patch to make iscsiadm start iscsid when needed (rh 436175 related) - Don't start iscsi service when network not yet up (in case of using NM) add NM dispatcher script to start iscsi service once network is up
19 lines
614 B
Diff
19 lines
614 B
Diff
diff -up open-iscsi-2.0-870-rc1/usr/idbm.c~ open-iscsi-2.0-870-rc1/usr/idbm.c
|
|
--- open-iscsi-2.0-870-rc1/usr/idbm.c~ 2008-09-29 13:01:48.000000000 +0200
|
|
+++ open-iscsi-2.0-870-rc1/usr/idbm.c 2008-09-29 13:01:48.000000000 +0200
|
|
@@ -849,6 +849,14 @@ int idbm_lock(void)
|
|
ret = link(LOCK_FILE, LOCK_WRITE_FILE);
|
|
if (ret == 0)
|
|
break;
|
|
+
|
|
+ if (errno != EEXIST) {
|
|
+ log_error("Could not lock discovery DB: %s: %s",
|
|
+ LOCK_WRITE_FILE, strerror(errno));
|
|
+ log_error("Maybe you are not root?");
|
|
+ exit(-1);
|
|
+ } else if (i == 0)
|
|
+ log_warning("Waiting for discovery DB lock");
|
|
|
|
usleep(10000);
|
|
}
|