|
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 > # fi154,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
|
Messages