example network script will misname interface if installing stretch

andrew bezella abezella at archive.org
Sun Jul 17 02:59:02 CEST 2016


On Sat, 2016-07-16 at 14:18 -0700, Ian Kelling wrote: 
> Using jessie as the base os to install stretch.
> 
> 30-interface will setup /etc/network/interfaces with
> something like eth0, and if you upgrade to stretch,
> it will reboot and eth0 is now named something like
> enp3s0f1.

for installing ubuntu's new lts (xenial has systemd's predictable
network device names vs precise/trusty) i have modified
scripts/DEBIAN/30-interface: 
4a5,18
> if [ $FAI_ACTION = "install" ] ; then
>   if ifclass -o PRECISE TRUSTY ; then
>     :
>   else
>     NIC1="$(udevadm test /sys/class/net/$NIC1 2>/dev/null | fgrep ID_NET_NAME_PATH | cut -d= -f2)"
>   fi
> elif [ $FAI_ACTION = "dirinstall" ] ; then
>   if ifclass -o PRECISE TRUSTY ; then
>     NIC1="eth0"
>   else
>     NIC1="ens4"
>   fi
> fi
> 

so far so good, but limited deployment atm.

-- 
andrew bezella <abezella at archive.org>
Internet Archive


More information about the linux-fai mailing list