Commit fe13167 1 parent eac7dcf commit fe13167 Copy full SHA for fe13167
File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ setup_dsnmasq(){
102
102
hostName=$( hostname)
103
103
pr_info " writing Dnsmasq conf on $DNSMASQ_CONF "
104
104
cat << EOF > /etc/dnsmasq.d/crc-dnsmasq.conf
105
- listen-address=$IIP
105
+ listen-address=0.0.0.0
106
106
expand-hosts
107
107
log-queries
108
108
local=/crc.testing/
@@ -116,11 +116,13 @@ EOF
116
116
stop_if_failed $? " failed to write Dnsmasq configuration in $DNSMASQ_CONF "
117
117
pr_info " adding Dnsmasq as primary DNS"
118
118
sleep 2
119
- nmcli connection modify Wired\ connection\ 1 ipv4.dns " $IIP ,169.254.169.254"
119
+ CURRENT_NAMESERVERS=$( grep " nameserver" /etc/resolv.conf | awk ' {print $2}' | xargs | sed ' s/ /,/g' )
120
+ nmcli connection modify " Wired connection 1" ipv4.dns " $IIP ,$CURRENT_NAMESERVERS "
121
+ nmcli connection up " Wired connection 1"
120
122
stop_if_failed $? " failed to modify NetworkManager settings"
121
123
pr_info " restarting NetworkManager"
122
124
sleep 2
123
- systemctl restart NetworkManager
125
+ systemctl restart NetworkManager
124
126
stop_if_failed $? " failed to restart NetworkManager"
125
127
pr_info " enabling & starting Dnsmasq service"
126
128
systemctl enable dnsmasq.service
You can’t perform that action at this time.
0 commit comments