Re: Enable virtual interface in pre.d script



On 20.11.2021 16:15, Eric wrote:
On 19.11.2021 16:36, Eric wrote:
I have a chicken/egg problem.  

I want to have wlan1 as an interface.  I have created a connection to use it.  But it doesn?t exist on 
reboot so I?d like to have a script in pre.d/ that will add the interface but NM refuses to start the 
connection because the interface does not exist.  Is there a way to get the script to execute earlier so 
that it can create the virtual interface prior to the connection check if its present?

On 19.11. 2021 17:32, Andrei wrote:
You need to explain in more details what wlan1 interface is and how it is added.

wlan0 is instantiated automatically when the driver is loaded.  I use it as an AP interface.  I want to 
have AP/STA so I need to create wlan1 for the client interface.  I do this with:

iw dev wlan0 interface add wlan1 type managed

but this interface does persist across power cycle so I need to create it every time.  I would like to have 
the interface created when networkmanager tries to bring up the connection, but the script with the above 
command (in the pre.d directory) does not get called before networkmanager tells me there is no interface 
for the connection.


I do not think it is possible. Just create startup script to add second interface.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]