# Startup scripts with wpa_supplicant + dhcpcd do not work

## valentas

/etc/conf.d/net:

```
modules=( "wpa_supplicant" "dhcpcd" )

wpa_supplicant_eth1="-Dwext"

wpa_timeout_eth1=30

config_eth1=( "dhcp" )

dhcpcd_eth1="-HD -t 0"
```

/etc/conf.d/wireless:

```

modules=( "wpa_supplicant" )

modules=( "!iwconfig" )
```

/etc/init.d/net.eth1 outputs the following:

```
 * Caching service dependencies ...                                       [ ok ]

 * Starting eth1

 *   Starting wpa_supplicant on eth1 ...                                  [ ok ]

 *   Starting wpa_cli on eth1 ...                                         [ ok ]

 *     Backgrounding ...
```

wpa_supplicant connects and authenticates, but dhcpcd never obtains an IP, hostname, etc..

On the contrary, if I start it manually:

```
wpa_supplicant -ieth1 -B -c/etc/wpa_supplicant/wpa_supplicant.conf -Dwext &

dhcpcd -t 0 -HD eth1 &
```

everything works fine.

What's wrong with configs? How to disable this backgrounding to see what's actually happening?

----------

## UberLord

associate_timeout_eth1="60"

----------

## valentas

No luck.

----------

## UberLord

What does `wpa_cli status` say?

----------

## valentas

```
wpa_cli status

Selected interface 'eth1'

bssid=00:15:e9:e0:ad:8f

ssid=Namas

pairwise_cipher=WEP-40

group_cipher=WEP-40

key_mgmt=NONE

wpa_state=COMPLETED
```

The problem is dhcp as I said.

----------

## <chillum>

you can disable backgrounding with  

```
RC_PARALLEL_STARTUP="no"
```

 in /etc/conf.d/rc

----------

## valentas

 *Quote:*   

> you can disable backgrounding with
> 
> Code:
> 
> RC_PARALLEL_STARTUP="no"
> ...

 

this one doesn't disable wpa_supplicant's backgrounding... 

```
* Starting eth1

 *   Starting wpa_supplicant on eth1 ...                                  [ ok ]

 *   Starting wpa_cli on eth1 ...                                         [ ok ]

// waits associate_timeout_eth1 seconds

 *     Failed to configure eth1 in the background                         [ !! ]
```

I guess that dhcpcd is not called at all. Why?

----------

