Skip to content

Commit

Permalink
fix for multiply nameservers in /var/run/NetworkManager/resolv.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
sgr authored and Obihoernchen committed Aug 15, 2024
1 parent 1534231 commit 10713bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xCAT/postscripts/configeth
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ elif [ "$1" = "-s" ];then
str_inst_gateway=`ip ro ls|grep default|awk '{print $3}'|head -1`
str_resolv_file=/var/run/NetworkManager/resolv.conf
if [ -f $str_resolv_file ];then
str_inst_dns=`grep ^nameserver $str_resolv_file | sed 's/^nameserver //g'`
str_inst_dns=`grep ^nameserver $str_resolv_file | sed 's/^nameserver //g' | sed ':a;N;$!ba;s/\n/,/g'`
str_inst_dns_search=`grep ^search $str_resolv_file | sed 's/^search //g'`
fi
fi
Expand Down

0 comments on commit 10713bf

Please sign in to comment.