Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd 5.2.8 provides 'net' when existing 'net' exists
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Thu Nov 25, 2010 4:31 am    Post subject: dhcpcd 5.2.8 provides 'net' when existing 'net' exists Reply with quote

Every time I start a service now, I see
Code:
 *  Cannot add provide 'net', as a service with the same name exists!

Suggestions as to how I go about fixing this?
I was thinking simply removing the 'provides'.
_________________
...Lyall
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Thu Nov 25, 2010 11:54 am    Post subject: Reply with quote

yep, that would work... also try posting a bug report too.
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Thu Nov 25, 2010 8:38 pm    Post subject: Reply with quote

I am never sure that I have a bug or just my screwing around with the system, hence I tend to ask in the forums first.
I will post a bug later today.
_________________
...Lyall
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Fri Nov 26, 2010 12:39 am    Post subject: Reply with quote

Bug 346805 raised.
_________________
...Lyall
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Fri Nov 26, 2010 7:38 pm    Post subject: Reply with quote

I'm not sure I'm even using the new /etc/init.d/dhcpcd When I check it's status, it's not running, although ps ax | grep dhcpcd shows that the program is running. Commenting out "provide net" does not seem to have any consequence other than elimination of the error message on starting a service.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Fri Nov 26, 2010 7:49 pm    Post subject: Reply with quote

dhcpcd is a daemon for running a dhcp server it does not need to be running if you are a client machine.
If you post the output of ifconfig you should see that your nic has picked up an ip using dhcp.
The new ip will only be renegoicated once you restart the nic.
Back to top
View user's profile Send private message
doctork
Guru
Guru


Joined: 25 Apr 2004
Posts: 370
Location: Cleveland, OH

PostPosted: Fri Nov 26, 2010 9:41 pm    Post subject: Reply with quote

chiefbag wrote:
dhcpcd is a daemon for running a dhcp server it does not need to be running if you are a client machine.
If you post the output of ifconfig you should see that your nic has picked up an ip using dhcp.
The new ip will only be renegoicated once you restart the nic.

No, dhcpcd is the dhcp CLIENT daemon (see man dhcpcd). Presumably it is started when net.eth? is started. The dhcp server is called dhcpd. I run that on my firewall/router/NAT system to provide addresses and internet access to the rest of my menagerie.
--
doc
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Sat Nov 27, 2010 12:50 pm    Post subject: Reply with quote

you don't have to be running the service for the error to show up. There is an incorrect line in /etc/init.d/dhcpcd that states "provides net" and this is conflicting with the real net provider.

Rich
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Nov 27, 2010 7:43 pm    Post subject: Reply with quote

When dhcpcd is started from init.d/dhcpcd it monitors all interfaces and configures them correctly. If wired and wireless are both connected, it will prefer wireless.
Think of networkmanager in 60k. If you install dhcpcd-ui you even get a nice GTK+ systray icon with basic configuration screens.
As such, dhcpcd providing net is the correct thing to do.

This design conflicts with the net.* init.d scripts. So if you use dhcpcd like this, remove all net.* except for net.lo (net.lo0 on BSD).
If you don't use this, simply don't add dhcpcd to any runlevels (which is the default) and OpenRC gets it right.

I suspect the OP is using baselayout-1 where this error may indeed happen.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1599
Location: Adelaide/Australia

PostPosted: Sun Nov 28, 2010 12:14 am    Post subject: Reply with quote

FYI: I do use baselayout-1.12.14-r1 - baselayout2 is ~x86 and I have a limited number of packages ~x86
_________________
...Lyall
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Sun Nov 28, 2010 9:23 am    Post subject: Reply with quote

UberLord wrote:
When dhcpcd is started from init.d/dhcpcd it monitors all interfaces and configures them correctly. If wired and wireless are both connected, it will prefer wireless.
This might work in the office, but doesn't work for a notebook plugged into a docking station connected to a simple ADSL modem at home.
UberLord wrote:
I suspect the OP is using baselayout-1 where this error may indeed happen.
Yes
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Nov 28, 2010 11:11 am    Post subject: Reply with quote

toralf wrote:
UberLord wrote:
When dhcpcd is started from init.d/dhcpcd it monitors all interfaces and configures them correctly. If wired and wireless are both connected, it will prefer wireless.
This might work in the office, but doesn't work for a notebook plugged into a docking station connected to a simple ADSL modem at home.


Why not?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Sun Nov 28, 2010 11:49 am    Post subject: Reply with quote

UberLord wrote:
Why not?
Well - good question, sI've the (working) config file:
Code:
config_eth0=( "192.168.0.254/16" )
...
config_ppp0=( "ppp" )
link_ppp0=( "eth0" )
plugins_ppp0=( "pppoe" )
...
modules=( "wpa_supplicant" )
config_wlan0=("dhcp" )
...
postup() {
        if [[ "$IFACE" = "eth0" ]]; then
                change_resolv.sh
                if [[ "$(cat /sys/bus/platform/devices/dock.0/docked)" = "1" ]]; then
                        /etc/init.d/net.ppp0  restart
                else
                        #       at office start wlan0 if no route is given to the office net
                        #
                        /sbin/route -n | grep -q -e "^9\."
                        if [[ $? -ne 0 ]]; then
                                /etc/init.d/net.wlan0 restart
                        fi
                fi
        elif [[ "$IFACE" = "ppp0" ]]; then
                change_resolv.sh
        fi
}
which satisfies my needs - I can s2ram my notebook at work, plug it at home into the docking station and wake it up (using baselayout 1). Would dhcpcd makes this configuration easier ?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Nov 28, 2010 7:09 pm    Post subject: Reply with quote

No, dhcpcd would not make that any easier.
I'm wondering why they all need restarting though. Can't you just start all of them and let them work it out?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum