You are not logged in.

#1 2009-12-11 14:12:27

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Alternate DHCP client?

Haha, I don't think anyone has ever asked this before.  Ok, they probably have I'm just not able to find it at the moment.  I'd like to try another DHCP client but it looks like the /etc/rc.d/network script is hardwired to dhcpcd:

rc.d/network:
12:# dhcpcd settings
13:[ -f /etc/conf.d/dhcpcd ] && . /etc/conf.d/dhcpcd
27:     if [ "$ifcfg" = "dhcp" ]; then
29:             /bin/rm -f /var/run/dhcpcd-${1}.pid >/dev/null 2>&1
30:             /bin/rm -f /var/run/dhcpcd-${1}.cache >/dev/null 2>&1
31:             /sbin/dhcpcd $DHCPCD_ARGS ${1}
62:     if [ "$ifcfg" = "dhcp" ]; then
63:             if [ -f /var/run/dhcpcd-${1}.pid ]; then
64:                     /bin/kill $(cat /var/run/dhcpcd-${1}.pid)

I thought about using a Network Profile, but it looks like the only other options is dhclient:

network.d/ethernet-dhcp:
5:DHCLIENT=yes

So, I thought I'd ask if there was another way to do this before I start hacking the /etc/rc.d/network script.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#2 2009-12-12 12:48:58

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Alternate DHCP client?

I've been looking for this ever since I started having problems between network (dhcpcd) and dnsmasq in relation to mpd. I was hoping to get dnsmasq to become a DNS/DHCP server as well as a client but I can't seem to figure it out. There's "ifplugd" but I think it depends on settings mentioned in rc.conf (gateway?). I know there's a script in the rc.d folder about using ifplugd with netcfg but  netcfg needs dhcpcd as well. Anyway, this isn't a big deal but it got me thinking about alternatives so if anyone knows of one I'd like to hear about it, too. And Gen2ly, if you figure something out be sure to drop a line into this thread please. smile

Last edited by milomouse (2009-12-12 12:51:26)

Offline

#3 2009-12-12 13:16:17

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Alternate DHCP client?

I use KDE with wicd and dhclient - no hacking required smile


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#4 2009-12-15 20:08:43

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Alternate DHCP client?

I modified /etc/rc.d/network script and it works (wired/wireless).
I don't use extra scripts (e.g. wicd, netcfg) so I am not sure if this will work well with network wrappers.

Offline

#5 2009-12-16 08:59:24

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Alternate DHCP client?

@broch: Do you still use DHCPCD? If not, what did you modify, if you don't mind me asking.

Offline

#6 2009-12-16 14:07:18

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Alternate DHCP client?

I use dhclient (Arch repository), as OP mentioned, dhcpcd is harwdired in /etc/rc.d/network script.
To use dhclient you can:
1) install wicd (mentioned above and it works). This is a method I did not test
or
2) modify network script (and this is what I did), but keep original

It seems that option 1) is easier

If you want to modify network script and you encounter any problems, I can email you my script, but I am not taking any responsability if something will not work.

Offline

#7 2009-12-16 20:54:45

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Alternate DHCP client?

Tried to do this with udhcp, udhcp is really lightweight and connects very quickly so I was hoping that this would work.  Unfortunately, the configuration isn't well set up and the documentation is lacking.  For me, the time to set this up versus the benefit... meh, oh well neutral.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#8 2009-12-17 02:41:01

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: Alternate DHCP client?

Gen2ly wrote:

Tried to do this with udhcp, udhcp is really lightweight and connects very quickly so I was hoping that this would work.  Unfortunately, the configuration isn't well set up and the documentation is lacking.  For me, the time to set this up versus the benefit... meh, oh well neutral.

Never tried udhcp, with dhclient, it took ~5-10 min though (time spend on replacing word "dhcpcd" with word "dhclient" and removing line or two: not much to do)

Offline

Board footer

Powered by FluxBB