[Networkmanager] Accessing connection.type in dispatcher scripts

Thomas Haller thaller at redhat.com
Fri Apr 21 11:58:30 UTC 2023


Hi,

On Fri, 2023-04-21 at 13:40 +0200, Farblos wrote:
> I'd like to use the connection type to distinguish "physical" (802-3-
> ethernet|802-11-wireless) connections from others in dispatcher
> scripts.
> 
> Is there anything more canonical then
> 
>   type=$( nmcli -g connection.type connection show uuid
> $CONNECTION_UUID )
> 
> to determine the connection type in dispatcher scripts?

I think that is the way.

> 
> The environment does not seem to provide it, unfortunately.

Patch welcome to expose the type as environment variable.



Thomas



More information about the Networkmanager mailing list