[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7
Mike Christie
michaelc at cs.wisc.edu
Sat Apr 7 15:43:23 UTC 2012
The following commit has been merged in the upstream-mnc branch:
commit 1a8d7036d0f923ae0a6a4947f7db5104db4fcaa0
Author: Hannes Reinecke <hare at suse.de>
Date: Tue Jun 21 11:23:06 2011 +0200
Allow 'onboot' as loginall parameter
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 <hare at suse.de>
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 5972d01..e3a6b81 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -265,15 +265,10 @@ static int print_ifaces(struct iface_rec *iface, 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"))
@@ -282,6 +277,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"))
@@ -385,12 +382,6 @@ static int
__login_by_startup(void *data, struct list_head *list, struct node_rec *rec)
{
char *mode = data;
- /*
- * we always skip onboot because this should be handled by
- * something else
- */
- if (rec->startup == ISCSI_STARTUP_ONBOOT)
- return -1;
if (match_startup_mode(rec, mode))
return -1;
@@ -405,7 +396,7 @@ login_by_startup(char *mode)
struct list_head rec_list;
if (!mode || !(!strcmp(mode, "automatic") || !strcmp(mode, "all") ||
- !strcmp(mode,"manual"))) {
+ !strcmp(mode,"manual") || !strcmp(mode, "onboot"))) {
log_error("Invalid loginall option %s.", mode);
usage(ISCSI_ERR_INVAL);
return ISCSI_ERR_INVAL;
--
Debian Open-iSCSI Packaging
More information about the Pkg-iscsi-maintainers
mailing list