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