DHCP with DHclient and not pump or DHCPC

Hello all,

I have a standard out of the box Mandrake 7.0 Setup.  I have a cable modem and am assiged address via DHCP.  Last night I tried using
both pump and dhcpc that came installed by default.  Neither of these
worked correctly with my ISP's lease assignment.   I found another client
dhclient from ISC (http://www.isc.org/) and got it to work by just running it from the command line.  

Now my question is where do I need to put this so it will be run automatically when my system starts up.  I did find some references to
pump and dhcpc in /sbin/ifup but then I tried replacing either the pump or
dhcpc command line with the dhclient line it didn't work.  But when my
system came up I could issuse the command ifup eth0 from a command prompt and then everything worked ok.

TIA

Jason
jaalexanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
j2Connect With a Mentor Commented:
You are on the right track.

You need to do this:
0
 
j2Commented:
WHat happened to my answer? Wierd.. Give me a second here :)
0
 
j2Commented:
here is what you need to change in ifup
(the lines with # are the original instructions)

if [ -n "$PUMP" ]; then    
PUMPARGS=    
if [ -n "$DHCP_HOSTNAME" ]; then
       PUMPARGS="-h $DHCP_HOSTNAME"    fi
    echo -n "Determining IP information for $DEVICE..."

#    if /sbin/pump $PUMPARGS -i $DEVICE ; then

    if /sbin/dhclient $DEVICE ; then


and ifdown

if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
#      pump -r -i ${DEVICE}
 kill `cat /var/run/dhclient.pid`
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
j2Commented:
Gah, the formatting got messed up :-/

replace

if /sbin/pump $PUMPARGS -i $DEVICE ;then

with

if /sbin/dhclient $DEVICE ; then

In /sbin/ifup, and


pump -r -i ${DEVICE}

with

kill `cat /var/run/dhclient.pid`

in /sbin/ifdown and NOTE that the ` are BACKTICKS and NOT ´ or '
0
 
jaalexanAuthor Commented:
I will try this when I get home from work tonight

0
 
jaalexanAuthor Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.