Fix bug of loading wrong PDF and IDF files
[kuberef.git] / hw_config / intel / setup_network.sh
index a6ff6df..14cbb0a 100755 (executable)
@@ -1,11 +1,17 @@
+#!/bin/bash
+
+# SPDX-FileCopyrightText: 2021 Anuket contributors
+#
+# SPDX-License-Identifier: Apache-2.0
+
 # Adapt this script according to your network setup
 # TODO Get networking info from PDF & IDF
 # TODO Add support in infra engine to update nameserver, etc
 # files with correct info
-#!/bin/bash
 
 echo nameserver 8.8.8.8 > /etc/resolv.conf
-sed -i 's/NM_CONTROLLED=yes/NM_CONTROLLED=no/g' /etc/sysconfig/network-scripts/ifcfg-eth2
+sed -i '25idns=none' /etc/NetworkManager/NetworkManager.conf
+sed -i 's/NM_CONTROLLED=yes/NM_CONTROLLED=no/g' \
+/etc/sysconfig/network-scripts/ifcfg-eth2
 echo GATEWAY=10.10.190.1 >> /etc/sysconfig/network-scripts/ifcfg-eth2
 ifup eth2
-