From 0bbee180dd96c688d5aa16519e25da21cf0b237a Mon Sep 17 00:00:00 2001 From: cxhong Date: Fri, 28 Feb 2020 21:33:53 -0500 Subject: [PATCH] modify sed statement --- xCAT/postscripts/nicutils.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/nicutils.sh b/xCAT/postscripts/nicutils.sh index eb877310a..b4c6a6b6d 100755 --- a/xCAT/postscripts/nicutils.sh +++ b/xCAT/postscripts/nicutils.sh @@ -1822,7 +1822,8 @@ function add_extra_params_nmcli { if [ -n "$name" -a -n "$value" ]; then grep $name $str_conf_file >/dev/null 2>/dev/null if [ $? -eq 0 ]; then - sed -i 's/^$name.*/$name=\"$vlaue\"/g' $str_conf_file + replacevalue="$name=$value" + sed -i "s/^$name=.*/$replacevalue/" $str_conf_file else echo "$name="$value"" >> $str_conf_file fi