# Not start wlan on boot

## lyallp

I have a laptop on which I turn off the wireless network switch.

However, when I boot, linux still tries to start WLAN and generates lots of untidy messages.

How do I stop the automatic start attempt on wlan and leave it to udev, when I turn the switch on/off.

Any suggestions?

Edit: I forgot to mention, I am using baselayout-2 and openrc.

----------

## maxime1986

Maybe you should have a look on : rfkill

If rfkill work on your computer, a modification of the init script should do the job.

----------

## lyallp

What I really want is that /etc/init.d/wlan0 not be started, except by my manual intervention.

I don't want it to attempt to start automatically.

----------

## maxime1986

Well, it seams to simple to be the solution (I had never run wireless interface on gentoo) but :

```
% sudo rc-update del wlan0 default
```

??

----------

## lyallp

Problem is, net.wlan0 is not one of my enabled services. Nor, for that matter is eth0 or lo.

It forms a part of 'network', which includes /etc/init.d/net.*

Network startup tries to start everything that matches the above pattern. This includes local, eth0 and wlan0.

I don't want wlan0 to start. I have an 'enable/disable' switch and a button on the keyboard to do that (via udev).

I can't simply delete /etc/init.d/wlan0 as the udev script requires it to exist, although, on that line of thought, I could simply remove the symlink and create it dynamically, in the udev rule.

Now that's an idea...

----------

## cach0rr0

not sure if you've already tried:

```

RC_PLUG_SERVICES="!net.*" 

```

(for baselayout-1, in /etc/conf.d/rc)

For baselayout-2/openrc, you'd be looking at this in /etc/rc.conf

```

# Do we allow any started service in the runlevel to satisfy the dependency

# or do we want all of them regardless of state? For example, if net.eth0

# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"

# both will be started, but services that depend on 'net' will work if either

# one comes up. With rc_depend_strict="YES" we would require them both to

# come up.

rc_depend_strict="NO"

```

Which would mean you only need net.lo in the default runlevel in order for 'net' to be provided, and not net.eth0 or net.wlan0

There's a hotplug setting in rc.conf you might fiddle with as well, though it says that hotplugging is disabled for all by default

----------

## lyallp

What I am trying to do is prevent the attempted startup of wlan0, with all the attendant error diagnostics.

I have no problems with eth0 or lo, as the diagnostics on eth0 if I am not connected are much less dramatic.

----------

