Subject: Allow 'onboot' as loginall parameter
From: Hannes Reinecke <h...@suse.de>
Date: Fri Dec 5 08:57:29 2008 +0100:
Git: adcc1860e58d8e15720ff0c9473fda55c6144521

We are using to 'onboot' parameter to setup iscsi connections
in the initrd. Thus we should be able to use 'onboot' as a valid
parameter for loginall, too.

References: 449108

Signed-off-by: Hannes Reinecke <h...@suse.de>

diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index bac9a5a..3fa4964 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -235,15 +235,10 @@ static int print_ifaces(int info_level)
 static int
 match_startup_mode(node_rec_t *rec, char *mode)
 {
-       /*
-        * we always skip onboot because this should be handled by
-        * something else
-        */
-       if (rec->startup == ISCSI_STARTUP_ONBOOT)
-               return -1;
-
        if ((!strcmp(mode, "automatic") &&
            rec->startup == ISCSI_STARTUP_AUTOMATIC) ||
+           (!strcmp(mode, "onboot") &&
+           rec->startup == ISCSI_STARTUP_ONBOOT) ||
            (!strcmp(mode, "manual") &&
            rec->startup == ISCSI_STARTUP_MANUAL) ||
            !strcmp(mode, "all"))
@@ -252,6 +247,8 @@ match_startup_mode(node_rec_t *rec, char *mode)
        /* support conn or session startup params */
        if ((!strcmp(mode, "automatic") &&
            rec->conn[0].startup == ISCSI_STARTUP_AUTOMATIC) ||
+           (!strcmp(mode, "onboot") &&
+           rec->conn[0].startup == ISCSI_STARTUP_ONBOOT) ||
            (!strcmp(mode, "manual") &&
            rec->conn[0].startup == ISCSI_STARTUP_MANUAL) ||
            !strcmp(mode, "all"))

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to