# [SOLVED] hal hotplug problem

## redwood

I have a laptop with eth0, wlan0 and usbserial ethernet connections.

It used to work that when an ethernet connection was established, services which depended on a network connection, such as sshd, would automatically start. I used to have coldplug/hotplug and <baselayout-2.0 and no hal.

But that was a long time ago. Now I have baselayout-2.0 and hal, but have unemerge coldplug/hotplug.

Now when I try to start /etc/init.d/sshd I get the warning:

# /etc/init.d/sshd start

 * WARNING: sshd is scheduled to start when net.eth0 has started

And net.eth0 is inactive (because I'm connected wirelessly):

# /etc/init.d/net.eth0 status

 * status: inactive

# /etc/init.d/net.wlan0 status

 * status: started

So how do I tell Gentoo that sshd needs a network connection (either wlan0 or eth0)?

[UPDATE]

Fixed, by setting in /etc/rc.conf

rc_depend_strict="NO"Last edited by redwood on Mon Mar 01, 2010 5:49 pm; edited 1 time in total

----------

## ShadowCat8

To the best of my knowledge, it should already know that it needs net(working).  From my /etc/init.d/sshd:

```
depend() {

        use logger dns

        need net

}
```

Now, the question I have is why would your wireless connection not be seen as a network connection?  Does the /etc/init.d/net.wlan0 init script include "PROVIDES" and/or "provide()" for net?

----------

## redwood

# rc-update show|grep net

             net.eth0 |           default                         battery

             netmount |           default                         battery

               xinetd |           default

                local | nonetwork default                         battery

            net.wlan0 |           default                         battery

               net.lo |                                                   boot

# cat /etc/conf.d/net

config_eth0="dhcp"

dhcp_eth0="release nodns nontp nonis"

routes_eth0="default via 192.168.1.1"

dns_domain_lo="mydomain.net"           

dns_domain_eth0="mydomain.net"         

dns_servers_eth0="192.168.1.254"     

dns_search_eth0="192.168.1.254 71.252.0.12 68.238.112.12"

dns_servers_eth0="192.168.1.254 71.252.0.12 68.238.112.12"

modules="wpa_supplicant"                     

wpa_supplicant_wlan0="-Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf"

config_wlan0="192.168.1.97 netmask 255.255.255.0"

dns_domain_wlan0="mydomain.net"                       

dns_servers_wlan0="192.168.1.254 71.252.0.12 68.238.112.12"

routes_wlan0="default via 192.168.1.1"

----------

## ShadowCat8

What is the output you get from 'equery belongs /etc/init.d/net.wlan0'? 

And what is in the "provide()" section of /etc/init.d/net.wlan0?

HTH.

----------

## redwood

/etc/init.d/net.wlan0 is just a symlink I created per the usual instructions for setting up network interfaces:

# ls -l /etc/init.d/net.*|tr -s ' '|cut -d ' ' -f9,10,11

/etc/init.d/net.6to4 -> net.lo

/etc/init.d/net.eth0 -> net.lo

/etc/init.d/net.lo

/etc/init.d/net.ppp0 -> net.lo

/etc/init.d/net.wlan0 -> net.lo

----------

## ShadowCat8

Hmmmm....

I'm still trying to figure out why your wlan0 connection is not exporting the 'net' flag while your eth0 is, if they are using the same initscript.    :Confused: 

Have you tried removing net.eth0 from default runlevel and replacing it with net.wlan0 and tried a boot?  

HTH.  Let us know.

----------

## maxmat

Hi all,

I've got same issue here but not in the same way: net.eth0 is up, net.wlan0 is down, I start sshd and it start also net.wlan0 and claims sshd will be started only when net.wlan0 will be fully up.

I use same IP address for both interface, so they can't be up at same time.

I'm using baselayout-2.

If anyone have any clue regarding this issue, it will be great, this is boring me :/

----------

## rpx___

You can try to look in rc.conf and write something like

rc_net_wlan0_provide="net"

----------

