Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2018 10:08:13 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Masachika ISHIZUKA <ish@amail.plala.or.jp>, freebsd-hackers@freebsd.org
Subject:   Re: How can I wait for a USB Ethernet adapter to appear to configure lagg on startup?
Message-ID:  <5AFE439D.4000801@grosbein.net>
In-Reply-To: <20180518.113009.439302765921485452.ish@amail.plala.or.jp>
References:  <20180518.113009.439302765921485452.ish@amail.plala.or.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
18.05.2018 9:30, Masachika ISHIZUKA wrote:

> I use a nootbook machine.
> 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?

Yes. In fact, you do not need to wait but "hook" on the event of ue0 creation.
We have several ways to do that and simpliest one for network interface is
using /etc/start_if.ue0 script like this:

#!/bin/sh

ifconfig ue0 up
ifconfig lagg0 addm ue0
# EOF





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5AFE439D.4000801>