From 598a75fb8643394a07f6ff143e6b7e3a12d41d76 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 12 May 2020 13:17:48 +0200 Subject: [PATCH] Properly reset nic extra params The global variables were not reset for bonds. Therefore, the nic extra params from the first bond interface were used if the second one had no nic extra params. --- xCAT/postscripts/nicutils.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/nicutils.sh b/xCAT/postscripts/nicutils.sh index b4c6a6b6d..d142cc663 100755 --- a/xCAT/postscripts/nicutils.sh +++ b/xCAT/postscripts/nicutils.sh @@ -289,6 +289,10 @@ function load_kmod { # ################################################################# function query_extra_params { + # reset global variables + unset array_nic_params + unset array_extra_param_names + unset array_extra_param_values nic=$1 if [ -z "$nic" ]; then @@ -479,9 +483,6 @@ function create_persistent_ifcfg { local _netmask="" local _mtu="" local inattrs="" - unset array_nic_params - unset array_extra_param_names - unset array_extra_param_values # parser input arguments while [ -n "$1" ];