diff options
author | Lee Duncan <lduncan@suse.com> | 2021-05-11 12:43:14 -0700 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2021-05-11 12:43:14 -0700 |
commit | 9d99b50a88ef1bc74dfdbda19d89594c2cac0945 (patch) | |
tree | 24f33278ca2e94b95f3b981d89c572926b2c731c | |
parent | bb0d696b8e8563dcfb75e61dda302c721e6ce6d2 (diff) | |
download | open-iscsi-9d99b50a88ef1bc74dfdbda19d89594c2cac0945.tar.gz |
Set default 'startup' to 'onboot' for FW nodes
When "iscsiadm -m discovery -t fw" is ran, nodes are
created/updated in the node DB for each firmware target
found, but the 'startup' mode values are left as 'manual',
when in fact firmware nodes are treated as if this
value is 'onboot'. So to keep the node DB in sync with
behavior, set these to 'onboot' by default. This
should *not* effect any other functionality.
-rw-r--r-- | usr/idbm.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2458,6 +2458,12 @@ int idbm_add_node(node_rec_t *newrec, discovery_rec_t *drec, int overwrite) rc = idbm_delete_node(&rec); if (rc) goto unlock; + + if (drec->type == DISCOVERY_TYPE_FW) { + log_debug(8, "setting firmware node 'startup' to 'onboot'"); + newrec->startup = ISCSI_STARTUP_ONBOOT; + newrec->conn[0].startup = ISCSI_STARTUP_ONBOOT; + } log_debug(7, "overwriting existing record"); } else log_debug(7, "adding new DB record"); |