How can I wait for a USB Ethernet adapter to appear to configure lagg on startup?
Masachika ISHIZUKA
ish at amail.plala.or.jp
Sat May 19 00:05:35 UTC 2018
>> As this machine has no internal nic, I use a USB ethernet adapter(ue0).
>> I want to configure lagg0 of ue0 and iwm0, but I must wait to start
>> /etc/rc.d/netif until appearing the ue0.
>> I'm using patched netif as follows, but I must keep it whenever
>> 'mergemaster -Ui' is run.
>> Is there a more elegant way?
>>
> Your situation is pretty much the entire reason for the existence of
> /etc/rc.d/netwait Read through the comments in that script for more
> information. And the comments in /etc/defaults/rc.conf for netwait.
>
> Something along these lines in /etc/rc.conf is what you want (along with
> your normal ifconfig_* and wpa_* entries):
>
> netwait_if="ue0 iwm0"
>
> That will cause the boot process to pause and wait for those two interfaces
> to appear before continuing on with the network configuration.
>
> There are various other netwait_* configuration entries that can used as
> well.
Thank you for reply, Freddie.
'lagg0' is created in 'netif', but 'netwait' is invoked after 'netif',
so 'netwait' is not suitable to this case. My patched 'netif' of first
mail is created referring to 'netwait'.
--
Masachika ISHIZUKA
More information about the freebsd-hackers
mailing list