View previous topic :: View next topic |
Author |
Message |
lyallp Veteran
Joined: 15 Jul 2004 Posts: 1599 Location: Adelaide/Australia
|
Posted: Thu Nov 25, 2010 4:31 am Post subject: dhcpcd 5.2.8 provides 'net' when existing 'net' exists |
|
|
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 |
|
|
richard.scott Veteran
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Thu Nov 25, 2010 11:54 am Post subject: |
|
|
yep, that would work... also try posting a bug report too. |
|
Back to top |
|
|
lyallp Veteran
Joined: 15 Jul 2004 Posts: 1599 Location: Adelaide/Australia
|
Posted: Thu Nov 25, 2010 8:38 pm Post subject: |
|
|
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 |
|
|
lyallp Veteran
Joined: 15 Jul 2004 Posts: 1599 Location: Adelaide/Australia
|
Posted: Fri Nov 26, 2010 12:39 am Post subject: |
|
|
Bug 346805 raised. _________________ ...Lyall |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 3007 Location: Edge of marsh USA
|
Posted: Fri Nov 26, 2010 7:38 pm Post subject: |
|
|
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 |
|
|
chiefbag Guru
Joined: 01 Oct 2010 Posts: 542 Location: The Kingdom
|
Posted: Fri Nov 26, 2010 7:49 pm Post subject: |
|
|
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 |
|
|
doctork Guru
Joined: 25 Apr 2004 Posts: 370 Location: Cleveland, OH
|
Posted: Fri Nov 26, 2010 9:41 pm Post subject: |
|
|
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 |
|
|
richard.scott Veteran
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Sat Nov 27, 2010 12:50 pm Post subject: |
|
|
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 |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sat Nov 27, 2010 7:43 pm Post subject: |
|
|
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 |
|
|
lyallp Veteran
Joined: 15 Jul 2004 Posts: 1599 Location: Adelaide/Australia
|
Posted: Sun Nov 28, 2010 12:14 am Post subject: |
|
|
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 |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Sun Nov 28, 2010 9:23 am Post subject: |
|
|
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 |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Sun Nov 28, 2010 11:49 am Post subject: |
|
|
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 |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
|