[ Next-in-Thread ]  [ Next Message ] 

Idea: Problem and Workaround with dhcpcd 

Forum: PCMCIA Network Adapter Issues
Date: 2000, Jan 12
From: uffti

I've just upgrade to pcmcia-cs-3.1.8 in conjuction with dhcpcd-1.3.18-pl3. I've encountered two flaws :

1. dhcpcd seems to be called wrong
   in /etc/pcmcia/network dhcpcd is called with -V
   with the assumption that it's only displays the
   version information. But it print the version info
   AND makes a dhcp request (I've checked source code
   too).
2. No possibility to set hostname
   There is no way to pass thru parameters to dhcpd

I've modified /etc/pcmcia/network the way it works for me. Maybe this should be considered in future releases :

$ diff network /etc/pcmcia/ 56,73c56,74

<           if /sbin/dhcpcd -V 2>&1 | grep -q DHCP ; then
<               /sbin/dhcpcd $DEVICE >/dev/null 2>&1 || exit 1
<           else
<               # Jump through hoops for lame 0.70-era dhcpcd
<               L=/var/run/dhcp-lock-$DEVICE
<               /bin/echo "#!/bin/sh\nrm $L" > $L ; chmod +x $L
<               /sbin/dhcpcd -c $L $DEVICE >/dev/null 2>&1
<               for t in 0 1 2 3 4 5 6 7 8 9 ; do
<                   sleep 2 ; if [ ! -e $L ] ; then break ; fi
<               done
<               rm -f $L
<               if [ -e /etc/dhcpc/resolv.conf ] ; then
<                   echo "# $DEVICE begin" > $RESOLV.N
<                   cat /etc/dhcpc/resolv.conf >> $RESOLV.N
<                   echo "# $DEVICE end" >> $RESOLV.N
<                   cat $RESOLV >> $RESOLV.N ; mv $RESOLV.N $RESOLV
<               fi
<           fi
---
>           /sbin/dhcpcd $DEVICE -h "$DHCP_HOSTNAME" || exit 1
> #         if /sbin/dhcpcd -V 2>&1 | grep -q DHCP ; then
> #             /sbin/dhcpcd $DEVICE >/dev/null 2>&1 || exit 1
> #         else
> #             # Jump through hoops for lame 0.70-era dhcpcd
> #             L=/var/run/dhcp-lock-$DEVICE
> #             /bin/echo "#!/bin/sh\nrm $L" > $L ; chmod +x $L
> #             /sbin/dhcpcd -c $L $DEVICE >/dev/null 2>&1
> #             for t in 0 1 2 3 4 5 6 7 8 9 ; do
> #                 sleep 2 ; if [ ! -e $L ] ; then break ; fi
> #             done
> #             rm -f $L
> #             if [ -e /etc/dhcpc/resolv.conf ] ; then
> #                 echo "# $DEVICE begin" > $RESOLV.N
> #                 cat /etc/dhcpc/resolv.conf >> $RESOLV.N
> #                 echo "# $DEVICE end" >> $RESOLV.N
> #                 cat $RESOLV >> $RESOLV.N ; mv $RESOLV.N $RESOLV
> #             fi
> #         fi
154,155c155,156
<               /sbin/dhcpcd -V 2>&1 | grep -q DHCP || \
<                   rm -f /var/run/dhcpcd-$DEVICE.pid
---
> #             /sbin/dhcpcd -V 2>&1 | grep -q DHCP || \
> #                 rm -f /var/run/dhcpcd-$DEVICE.pid

[ Next-in-Thread ]  [ Next Message ] 

Select this message: Problem and Workaround with dhcpcd

Messages Inline: [ 1 ]  [ All ]  Outline: [ 1 ]  [ 2 ]  [ All ] 

1. Odd changes by David Hinds, 2000, Jan 12
(_ yes it works by uffti, 2000, Jan 13

Message Administration

This form allows you to delete, move, or copy one or more messages. You can move messages by copying and deleting the original. The action will be applied to the messages you select above and all replies to those selected messages.


If you want to copy or move messages, specify the HyperNews path of a destination forum or message that all messages will be copied or moved to. The destination must already exist, so maybe create it first.

Path of Destination (a Forum or Message): (e.g. "test")

Notify Subscribers at destination
NO


If you want to delete messages (the default), specify that here. If you want to move messages, you need to delete the original messages; placeholders will be left pointing to where they were moved.

Delete Messages
NO


Caution: After deleteing messages (the default), if you have not copied them (i.e. no destination above), then the selected messages are not be recoverable.

[ Members ]  [ Subscribe ]  [ No Admin Mode ] 
[ Show Frames ]  [ Help for HyperNews at pcmcia-cs.sourceforge.net 1.10 ] 
[ Edit This Forum ]