Rpi4 < $(community_build)

preface

a while ago (pretty much official build) I had a pegasusII that I was using as a trunk line to a cisco-gs... it probed earlier (sometimes?) and took over eth1(wan)...

so I had to use a custom script to rename it to 'mgmt9' ... ( could have manually modprobed from the end of rc.local or later etc. I suppose )

in all honesty splitting a single eth1 into vlans over a managed switch is probably the most reliable short term fix...

switching to the official build and tackle this in a general forum thread or within upstream codebase... may yeild more input / faster more extensible solutions...

usage-notes

build-based interface reassign is likely to be touch and go depending on demand or the number of testers / what they expect from the feature / and any long term complexities or interactions with typical / common use of the build (i.e. some 'build' scripts statically rely on eth1 being a wan interface not having one may lead to unusual results regarding some build features );

  1. assumes medium/advanced pre-existing skills for its usage
  2. will have to be first tested manually ( curl @ github/utilities > hotplug ) probably fairly extensively... so you'd have to manually put that in sysupgrade.conf etc. etc.

the initial testing code will operate as follows...

  1. uses /etc/config/network 'option macmatch'
  2. for initial testing you should use some whack interface name in that section... i.e. ifname 'mgmt9' or ifname 'eth9'... this hopefully limits the need to switch out two wrongly conflicting assigned names during the initial script testing...
  3. prefferably should be used on interfaces that spring up early and take over 'eth1' etc. but it may work well re-assigning all to whackyer non system assigned names
  4. you will(should) not be able to assign alternate official 'macaddr' during the initial testing of the script... ( edit: there is a second 'w-macaddr' variant @ github )

here is my config section that takes a second UE300 and moves it from the system detected 'eth2' to something likely free @ ifname 'eth9||mgmt11'

config interface 'mgmt'
	option ifname 'mgmt11'
	option proto 'static'
	option ipaddr '192.168.9.1'
	option netmask '255.255.255.0'
	option macmatch '11:22:33:1a:23:f1'
curl -sSL "https://raw.github.com/wulfy23/rpi4/master/utilities/000-nicmove" > /etc/hotplug.d/net/000-nicmove
##########################################iface-probably-uneeded but put one there too whilst in beta
curl -sSL "https://raw.github.com/wulfy23/rpi4/master/utilities/000-nicmove" > /etc/hotplug.d/iface/000-nicmove

edit: related

1 Like