Skip to content

Commit 8c173a2

Browse files
author
Daniel Hansson
authored
Add source + descriptions
1 parent 716a6c7 commit 8c173a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

static/ip.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ NETMASK=$($IFCONFIG | grep -w inet |grep -v 127.0.0.1| awk '{print $4}' | cut -d
99
GATEWAY=$(route -n|grep "UG"|grep -v "UGH"|cut -f 10 -d " ")
1010

1111
cat <<-IPCONFIG > "$INTERFACES"
12-
auto lo $IFACE
12+
source /etc/network/interfaces.d/*
1313
14+
# The loopback network interface
15+
auto lo $IFACE
1416
iface lo inet loopback
1517
18+
# The primary network interface
1619
iface $IFACE inet static
1720
pre-up /sbin/ethtool -K $IFACE tso off
1821
pre-up /sbin/ethtool -K $IFACE gso off
1922
23+
# Best practice is to change the static address
24+
# to something outside your DHCP range.
2025
address $ADDRESS
2126
netmask $NETMASK
2227
gateway $GATEWAY

0 commit comments

Comments
 (0)