3888c9
From 032129d0eb47d08eff7bd8b4c82a835a8929e9d3 Mon Sep 17 00:00:00 2001
3888c9
From: Martin Wilck <mwilck@suse.de>
3888c9
Date: Thu, 4 Apr 2019 15:29:04 +0200
3888c9
Subject: [PATCH] iscsiroot: parse_iscsi_root overwrites command line args
3888c9
3888c9
iscsi_target_name, iscsi_target_ip, iscsi_target_port are
3888c9
unconditionally overwritten by parse_iscsi_root. Don't set
3888c9
them here, for code clarity.
3888c9
---
3888c9
 modules.d/95iscsi/iscsiroot.sh | 8 ++------
3888c9
 1 file changed, 2 insertions(+), 6 deletions(-)
3888c9
3888c9
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
3888c9
index f3f88259..45db89c1 100755
3888c9
--- a/modules.d/95iscsi/iscsiroot.sh
3888c9
+++ b/modules.d/95iscsi/iscsiroot.sh
3888c9
@@ -92,12 +92,6 @@ handle_netroot()
3888c9
     # override conf settings by command line options
3888c9
     arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=)
3888c9
     [ -n "$arg" ] && iscsi_initiator=$arg
3888c9
-    arg=$(getargs rd.iscsi.target.name -d iscsi_target_name=)
3888c9
-    [ -n "$arg" ] && iscsi_target_name=$arg
3888c9
-    arg=$(getarg rd.iscsi.target.ip -d iscsi_target_ip)
3888c9
-    [ -n "$arg" ] && iscsi_target_ip=$arg
3888c9
-    arg=$(getarg rd.iscsi.target.port -d iscsi_target_port=)
3888c9
-    [ -n "$arg" ] && iscsi_target_port=$arg
3888c9
     arg=$(getarg rd.iscsi.target.group -d iscsi_target_group=)
3888c9
     [ -n "$arg" ] && iscsi_target_group=$arg
3888c9
     arg=$(getarg rd.iscsi.username -d iscsi_username=)
3888c9
@@ -112,6 +106,8 @@ handle_netroot()
3888c9
         iscsi_param="$iscsi_param $p"
3888c9
     done
3888c9
 
3888c9
+    # this sets iscsi_target_name and possibly overwrites most
3888c9
+    # parameters read from the command line above
3888c9
     parse_iscsi_root "$1" || return 1
3888c9
 
3888c9
     # Bail out early, if there is no route to the destination
3888c9