Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 284351 - net-misc/openvpn-2.1_rc19: startup of the VPN attempts to start net.eth0
Summary: net-misc/openvpn-2.1_rc19: startup of the VPN attempts to start net.eth0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Cédric Krier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-09 20:45 UTC by Martin Mokrejš
Modified: 2010-11-30 10:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2009-09-09 20:45:47 UTC
Hi,
  I have an ethernet network card onboard on my laptop. A PCMCIA wifi card as well. My problem is that when I use net.wlan0 and start openvpn.mydomain due to
some dependencies the script attempts to start net.eth0 which fails (no wire cable plugged in). How can I prevent that?


# /etc/init.d/openvpn.mydomain start
* Bringing up interface eth0
*   No configuration specified; defaulting to DHCP
*   dhcp...
*     Running dhcpcd...
dhcpcd: version 5.0.6 starting
dhcpcd: eth0: waiting for carrier
dhcpcd: timed out                                                                                                                                                                                                             [ !! ]
* ERROR: net.eth0 failed to start
* ERROR: cannot start openvpn.mydomain as net.eth0 would not start
#

The wlan0 card is managed to wpa-supplicant if that matters, defined in /etc/conf.d/net.wlan0 and /etc/wpa_supplicant/wpa_supplicant.conf.
Comment 1 Fabio Coatti 2009-10-08 12:27:11 UTC
Confirmed here. Basically, openvpn is bound to net.eth0 and will not startup even if net.wlan0 is up and running.
To me, a correct solution could be to remove any dep from network devices, as openvpn can be launched anyway and it will establish the connection when some net connection becomes available.
Comment 2 Martin Mokrejš 2009-10-08 12:31:51 UTC
(In reply to comment #1)
> Confirmed here. Basically, openvpn is bound to net.eth0 and will not startup
> even if net.wlan0 is up and running.
> To me, a correct solution could be to remove any dep from network devices, as
> openvpn can be launched anyway and it will establish the connection when some
> net connection becomes available.

I have the same impression. I believe it is legitimate to start openvpn between some network sockets, like localhost and something else on one host.

BTW, in my experience it is worth to ping the target machine on it's public IP address instead of ping-ing through the openvpn tunnel on the private IP address of the tun/tap interface of the target. That helps opnevpn to re-establish the connection. Maybe I could fiddle with some keepalive setting of the tunnel instead, true.
Comment 3 Cédric Krier gentoo-dev 2009-10-10 22:49:21 UTC
You should configure RC_NET_STRICT_CHECKING in /etc/conf.d/rc
Comment 4 Martin Mokrejš 2009-10-11 20:09:33 UTC
I did my homework to learn what is this variable about but it look this is for baselayout-1. I am on baselayout-2 ad thus nave no /etc/conf.d/rc. :( Even if I create that file with this variable it does not get reflected.

Instead, there is /etc/rc.conf:

# Do we allow any started service in the runlevel to satisfy the depedency
# 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"


Looks there is no equivalent to RC_NET_STRICT_CHECKING="lo" (/etc/conf.d/rc syntax). But as I showed I switched rc_depend_strict="YES" to rc_depend_strict="NO" and it looks it will do the trick for me, but will cannot test the wifi at the moment, though.