# Network devices setup: # Skip network devices setup if the kernel command line parameter 'noip' is specified: grep -q '\' /proc/cmdline && return # If kernel command line parameters like ip=192.168.100.2 nm=255.255.255.0 netdev=eth0 gw=192.168.100.1 # were specified setup only that single network device and skip the rest: if [[ "$IPADDR" ]] ; then device=${NETDEV:-eth0} ip link set dev "$device" up netmask=${NETMASK:-255.255.255.0} ip addr add "$IPADDR"/"$netmask" dev "$device" if [[ "$GATEWAY" ]] ; then ip route add default via "$GATEWAY" fi return fi # When DHCP was used via 58-start-dhclient.sh do not change the existing networking setup here: [[ ! -z "$USE_DHCLIENT" && -z "$USE_STATIC_NETWORKING" ]] && return # The following is autogenerated code to setup network interfaces # in the recovery system which have all these on the original system: # - they are UP # - they have an IP address # - they are somehow linked to a physical device # For details see the rescue/GNU/Linux/310_network_devices.sh script. # Original interface was team0, now is enp1s0f0 ip link set dev enp1s0f0 up ip link set dev enp1s0f0 mtu 1500 ip addr add 10.144.27.168/24 dev enp1s0f0