Re: trunk(4) driver with optional interface?

2020-03-13 Thread David Demelier

Le 13/03/2020 à 13:23, Raf Czlonka a écrit :> Hi David,


hotplugd(8) might help here.


Thanks, I've heard of it in the past. Can't understand how I did forget 
it. That will help me a lot!


Regards,

--
David




Re: trunk(4) driver with optional interface?

2020-03-13 Thread Raf Czlonka
On Fri, Mar 13, 2020 at 12:13:45PM GMT, David Demelier wrote:
> Hello,
> 
> I'm using trunk(4) pseudo device to aggregate my wireless iwm(4) and my
> dock ethernet interface ure(4) together.
> 
> Since my laptop is not always connected to my dock, when booting I get a
> trunk error if the interface is not available:
> 
> ifconfig: SIOCTRUNKPORT: Invalid argument
> 
> Hopefully, this is not a big deal as my iwm(4) is still available and
> used nevertheless.
> 
> Do you have any other recommandations or advises in my case? Because if
> I plug my laptop into the dock after the creation of the trunk interface
> I must use ifconfig by hand to attach it. If there is a way to detect
> the attachment of a new interface, I could create an automatic script
> too.

Hi David,

hotplugd(8) might help here.

Regards,

Raf

> Content of my /etc/hostname.trunk0, /etc/hostname.iwm0 and
> /etc/hostname.ure0:
> 
> # /etc/hostname.trunk0
> trunkproto failover trunkport ure0
> trunkport iwm0
> dhcp
> 
> # /etc/hostname.iwm0
> join myssid wpakey p
> up
> 
> # /etc/hostname.ure0
> up
> 
> I'm using OpenBSD-current at the moment.
> 
> Regards,
> 
> -- 
> David
> 



trunk(4) driver with optional interface?

2020-03-13 Thread David Demelier

Hello,

I'm using trunk(4) pseudo device to aggregate my wireless iwm(4) and my
dock ethernet interface ure(4) together.

Since my laptop is not always connected to my dock, when booting I get a
trunk error if the interface is not available:

ifconfig: SIOCTRUNKPORT: Invalid argument

Hopefully, this is not a big deal as my iwm(4) is still available and
used nevertheless.

Do you have any other recommandations or advises in my case? Because if
I plug my laptop into the dock after the creation of the trunk interface
I must use ifconfig by hand to attach it. If there is a way to detect
the attachment of a new interface, I could create an automatic script
too.

Content of my /etc/hostname.trunk0, /etc/hostname.iwm0 and
/etc/hostname.ure0:

# /etc/hostname.trunk0
trunkproto failover trunkport ure0
trunkport iwm0
dhcp

# /etc/hostname.iwm0
join myssid wpakey p
up

# /etc/hostname.ure0
up

I'm using OpenBSD-current at the moment.

Regards,

--
David