We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9235be5 commit 3871efeCopy full SHA for 3871efe
hardware/raspberrypi/bootmodes/pxetools/prepare_pxetools
@@ -7,7 +7,7 @@ sudo pip3 install tabulate
7
8
# Get network info
9
NAMESERVER=$(cat /etc/resolv.conf | grep nameserver | head -n 1 | cut -d " " -f2)
10
-GATEWAY=$(ip -4 route | grep default | cut -d " " -f3)
+GATEWAY=$(ip -4 route | grep default | head -n 1 | cut -d " " -f3)
11
IP=$(ifconfig eth0 | grep "inet addr" | cut -d " " -f 12 | cut -d ":" -f 2)
12
BRD=$(ifconfig eth0 | grep "inet addr" | cut -d " " -f 14 | cut -d ":" -f 2)
13
NETMASK=$(ifconfig eth0 | grep "inet addr" | cut -d " " -f 16 | cut -d ":" -f 2)
@@ -32,6 +32,8 @@ iface eth0 inet static
32
gateway $GATEWAY
33
EOF
34
35
+sudo systemctl stop dhcpcd
36
+sudo systemctl disable dhcpcd
37
sudo systemctl restart networking
38
39
# In case it is already set
0 commit comments