You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CURRENTIFACE1=$(cat /etc/network/interfaces | sed -n '/lo/,/iface/p'| awk '{print $3}'| sed "3d"| sed "1d")
26
-
CURRENTIFACE2=$(cat /etc/network/interfaces | sed -n '/iface/,/inet/p'| awk '{print $2}'| sed "1d"| sed "2d"| sed "1d")
27
-
sed -i "s|$CURRENTIFACE1|$IFACE|g" /etc/network/interfaces
28
-
sed -i "s|$CURRENTIFACE2|$IFACE|g" /etc/network/interfaces
25
+
# Set correct interface
26
+
{ sed '/# The primary network interface/q' /etc/network/interfaces;printf'auto %s\niface %s inet dhcp\n# This is an autoconfigured IPv6 interface\niface %s inet6 auto\n'"$IFACE""$IFACE""$IFACE"; } > /etc/network/interfaces.new
0 commit comments