On Wed, 3 Mar 2021 12:13:04 +0100 Florian Zieboll via Dng <dng@lists.dyne.org> wrote:
> Sure, it is more error prone to work with enx"$mac" NIC names, but as > it's probably too late for complaining, I just made my router "future > proof": > > backup /etc/: > $ cp -a /etc /etc.bkp > > cd to /etc/: > $ cd /etc/ > > delete related custom udev rules > $ rm ./udev/rules.d/7?-persistent-net-*\.rules > > define future NIC names as variables to avoid mistakes: > $ eth0_new=`udevadm test-builtin net_id /sys/class/net/eth0 > 2>/dev/null | grep "ID_NET_NAME_MAC=" | sed 's/ID_NET_NAME_MAC=//'` $ > 2>eth1_new=`udevadm test-builtin net_id /sys/class/net/eth1 > 2>2>/dev/null | grep "ID_NET_NAME_MAC=" | sed 's/ID_NET_NAME_MAC=//'` > > test run to stdout (commented lines are excluded) > $ grep -r ^[^#]*eth[0-1] ./* | sed -e "s/eth0/$eth0_new/g" -e > "s/eth1/$eth1_new/g" > > replace NIC names "inplace" (with commented lines still excluded) > $ grep -rl ^[^#]*eth[0-1] ./* | xargs -l1 sed -i -e > "s/eth0/$eth0_new/g" -e "s/eth1/$eth1_new/g" > > reboot > > so far, everything seems to work fine -_- Ooops, that was too quick: I forgot to remove the active dhcp leases under /var/lib/dhcp/ _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng