Skip to content

Commit 3871efe

Browse files
committed
Disable dhcp in prepare_pxetools script
1 parent 9235be5 commit 3871efe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hardware/raspberrypi/bootmodes/pxetools/prepare_pxetools

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sudo pip3 install tabulate
77

88
# Get network info
99
NAMESERVER=$(cat /etc/resolv.conf | grep nameserver | head -n 1 | cut -d " " -f2)
10-
GATEWAY=$(ip -4 route | grep default | cut -d " " -f3)
10+
GATEWAY=$(ip -4 route | grep default | head -n 1 | cut -d " " -f3)
1111
IP=$(ifconfig eth0 | grep "inet addr" | cut -d " " -f 12 | cut -d ":" -f 2)
1212
BRD=$(ifconfig eth0 | grep "inet addr" | cut -d " " -f 14 | cut -d ":" -f 2)
1313
NETMASK=$(ifconfig eth0 | grep "inet addr" | cut -d " " -f 16 | cut -d ":" -f 2)
@@ -32,6 +32,8 @@ iface eth0 inet static
3232
gateway $GATEWAY
3333
EOF
3434

35+
sudo systemctl stop dhcpcd
36+
sudo systemctl disable dhcpcd
3537
sudo systemctl restart networking
3638

3739
# In case it is already set

0 commit comments

Comments
 (0)