# No, I don't want to start wlan0

## curmudgeon

```

# /etc/init.d/ntp-client start

 * Starting wlan0

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

 *   Starting wpa_supplicant on wlan0 ...

SIOCSIFFLAGS: No such device

SIOCSIFFLAGS: No such device

Could not set interface 'wlan0' UP                                                                                                                                         [ ok ]

 *   Starting wpa_cli on wlan0 ...                                                                                                                                         [ ok ]

 *     Backgrounding ...

 * WARNING:  ntp-client is scheduled to start when net.wlan0 has started.

```

My first question is why is the stript trying to start wlan0 instead of eth0, but far more important, why is it trying to start anything at all?

I have an iinternet connection through ppp:

```

# /sbin/ifconfig

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:1196 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1196 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1121147 (1.0 MiB)  TX bytes:1121147 (1.0 MiB)

ppp0      Link encap:Point-to-Point Protocol

          inet addr:a.b.c.d  P-t-P:10.64.64.64  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1

          RX packets:51199 errors:0 dropped:0 overruns:0 frame:0

          TX packets:49361 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3

          RX bytes:38659372 (36.8 MiB)  TX bytes:3747362 (3.5 MiB)

```

This seems like something people would have run into before, so I must be missing something.

----------

## Ant P.

/etc/rc.conf → rc_depend_strict is probably what you want.

----------

## Rexilion

Or just

```
rm -f /etc/init.d/net.wlan0

eselect rc delete net.wlan0
```

?

----------

## curmudgeon

Thanks for the replies.

Ant_P, I didn't know about RC_NET_STRICT_CHECKING (it is in /etc/conf.d/rc by the way, not /etc/rc.conf). I already have it set to no, but I guess if I change it to lo, that will let me muddle through (I would rather include ppp as a network interface, though).

Rexilion, your suggestion was not helpful at all. First of all, I might want to use wlan0 some other time (not now, though), but more important, the script would just try to start eth0 (which I don't have active, and is also not what I want) and fail.

I am going to ask a related question in the portage forum.

----------

## bobspencer123

 *Quote:*   

> 
> 
> Rexilion, your suggestion was not helpful at all. First of all, I might want to use wlan0 some other time (not now, though), but more important, the script would just try to start eth0 (which I don't have active, and is also not what I want) and fail.
> 
> 

 

hey go easy on people who are just trying to help. This is an open forum and some advise will be better then others but all advise (generally) is given with the hope of helping someone in need without a thought for something in return.

----------

## ochach

```
eselect rc delete net.wlan0
```

this code wont delete your wifi card (which is not present on your gentoo as far as i can see) - it just wont try to connect it to ap or whatever youve configured (if you did) on startup, thats all.

it is starting it because ntp-client need to have access to internet before syncing time. why you have it in your startup scripts if you dont know what it is?

```
depend() {

        before cron portmap

        need net

        use dns logger

}

```

i have this in my ntp-client. if youve got wrongly configured net then this is what you get

you need to look in /etc/conf.d/net  and change stuff there

cheers

----------

## curmudgeon

 *ochach wrote:*   

> 
> 
> ```
> eselect rc delete net.wlan0
> ```
> ...

 

I already have that taken care of in /etc/conf.d/rc with the following statement:

```

RC_PLUG_SERVICES='!net.wlan0'

```

which (if I understand) stops the init scripts from starting net.wlan0 until I ask for it (YES, I do have a wireless card - which I have manually disabled, NO, I do not want it to start until I manually start it).

 *ochach wrote:*   

> it is starting it because ntp-client need to have access to internet before syncing time. why you have it in your startup scripts if you dont know what it is?

 

Did you even read my question at all? I have a ppp connection to the internet.

I most certainly do know what ntp-client is and does. And I DO NOT have it starting by default (I executed it from the command line).

 *ochach wrote:*   

> if youve got wrongly configured net then this is what you get
> 
> you need to look in /etc/conf.d/net  and change stuff there

 

I don't have it wrongly configured, although perhaps going through /etc/conf.d/net instead of using kppp could avoid this problem.

----------

## dziadu

I think that 

```
rc_hotplug="!net.wlan0 net.*"
```

 from /etc/rc.conf is that what you need.

----------

## Hupf

Is your /etc/init.d/net.ppp0 a symlink to /etc/init.d/net.lo? If not, you may first want to replace all other net.* instances by such symlinks in order to avoid having different initscript versions hanging around.

Specifically, you want the

```
depend() {

provide net

}
```

line in net.ppp0.

Afterwards, dzidau should do the trick. You can modify the loading order of the init scripts with something like

```
rc_ppp0_before="net.eth0 net.wlan0"
```

in /etc/conf.d/net.

----------

## curmudgeon

 *Hupf wrote:*   

> Is your /etc/init.d/net.ppp0 a symlink to /etc/init.d/net.lo?

 

No (as I said before). I have used kppp to start the ppp connection. This is more convenient, but appears to sacrifice the interoperability provided by using the init scripts.

 *Hupf wrote:*   

> Afterwards, dzidau should do the trick. You can modify the loading order of the init scripts with something like
> 
> ```
> rc_ppp0_before="net.eth0 net.wlan0"
> ```
> ...

 

Do you know the default loading order of the init scripts?Last edited by curmudgeon on Sun Mar 21, 2010 8:17 pm; edited 1 time in total

----------

## jcTux

 *dziadu wrote:*   

> I think that 
> 
> ```
> rc_hotplug="!net.wlan0 net.*"
> ```
> ...

 

I think it's more the file /etc/conf.d/rc

[EDIT]

It is /etc/conf.d/rc if you are using baselayout-1.x.x, and /etc/rc.conf if baselayout-2.x.x

----------

## curmudgeon

 *jcTux wrote:*   

>  *dziadu wrote:*   I think that 
> 
> ```
> rc_hotplug="!net.wlan0 net.*"
> ```
> ...

 

As I already said (again), I have (to quote myself):

 *curmudgeon wrote:*   

> I already have that taken care of in /etc/conf.d/rc with the following statement:
> 
> ```
> 
> RC_PLUG_SERVICES='!net.wlan0'
> ...

 

Using RC_PLUG_SERVICES rather than RC_HOTPLUG seems better as it allows finer control.

----------

