Skip to main content
Topic: Openrc error (Read 750 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Openrc error

When I start my system openrc gives me thiis error
Quote
Bringing up interface wlan0
    Caching network module dependencies
    ERROR: interface wlan0 doesn't exist
    Ensure that you have loaded the correct kernel module for your hardware
ERROR: net.wlan0 failed to start
ERROR: cannot start netmount as net.wlan0 would not start
Starting local...

If i login and manually start /etc/init.d/net.wlan0 everything works fine

Re: Openrc error

Reply #1
Apparently my wlan is being soft-blocked by rfkill, so I wrote an openrc service
Code: [Select]
#!/usr/bin/openrc-run
name=$RC_SVCNAME
description=""
command="/usr/bin/rfkill"
command_args="unblock all"

depend() {
    before net.wlan0
}

And enabled it but wlan still is blocked by rfkill after this scripts runs. But if I run it myself it unblocks everything.

 

Re: Openrc error

Reply #2
Maybe set the depend in your rule to be conditional to a later point in the init cycle similar to the user state when you can manually run the service successfully.
Then change the net.wlan0 service to wait for the <name of the "rfkill unblock all" service>.

Re: Openrc error

Reply #3
Maybe set the depend in your rule to be conditional to a later point in the init cycle similar to the user state when you can manually run the service successfully.
Then change the net.wlan0 service to wait for the <name of the "rfkill unblock all" service>.
The net.* services are symlinks to net.lo. At first I thought a start_pre() with the rfkill command would be the optimal approach, but net.lo is quite complicated as it serves as a template of sorts to any/all interfaces. The OP's solution is the better one in this case.

Re: Openrc error

Reply #4
Okay my error. I forgot that it was a symlink.

Maybe I misread this but my take is that the OP wants this to be all automatically started by the init which at this point they stated that it only worked manually. So my take is the setup needs to modified to allow the automatic starting of the wlan without any manual intervention.

The best solution would be to figure out why rfkill is automatically killing a desired wlan link and to stop it from doing the initial block. This is puzzling to me as to why this would occur automatically without some type of configuration to make the block happen in the first place.

Or create a custom service that replicates the net.wlan0 symlink does to start the wlan link with the condition to start after rfkill unblock all service. While the rfkill waits further into the init process that mimics the point in time went the rfkill service successfully starts manually.