[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:17638] dhcpcd & kernel-2.2.10
- From: Satoru Tadokoro <jordi@xxxxxxxxxxxxxxxx>
- Subject: [debian-users:17638] dhcpcd & kernel-2.2.10
- Date: Thu, 2 Sep 1999 16:22:35 +0900
- Organization: Division of Mathematics, Graduate School of Science, Hokkaido University
- X-accept-language: ja
- X-ml-info: If you have a question, send a mail with the body "# help" (without quotes) to the address debian-users-ctl@debian.or.jp; help=<mailto:debian-users-ctl@debian.or.jp?body=help>
- X-ml-name: debian-users
- X-mlserver: fml [fml 2.2]; post only (only members can post)
- Message-id: <37CE2531.815090A2@xxxxxxxxxxxxxxxx>
- X-mail-count: 17638
- X-mailer: Mozilla 4.6 [ja] (Win95; I)
こんにちは、田所です。
以下のような環境でブート時にdhcpcdがIPアドレスを
貰ってくれなくなってしまいました。
マシン:IBM Thinkpad560E
Debianのバージョン:slink
kernelのバージョン:2.0.36 -> 2.2.10
pcmcia-csのバージョン:3.0.14
dhcpcdのバージョン:1.3.17-pl9
ブート後に
/etc/init.d/dhcpcd start
とやると、きちんとIPアドレスを貰ってくれます。
また、kernelが2.0.36の場合はブート時にIPアドレスを
貰ってくれます。
dhcpcd1.3.17-pl9には、従来のdhcpcdとkernel-2.1以降で
動作するdhcpcd-svが入っているということなので、試しに
/etc/pcmcia/networkの中の dhcpcdをdhcpcd-svに書き換えて
ブートしてみたけどダメでした。これ以外になにか
書き換えるべき事があるのでしょうか?以下に
/etc/pcmcia/networkを載せますので何かアドバイスが
ありましたら、お願いいたします。
それから、この問題と関係あるかどうか分からないのですが、
ブート時に
SIOCADDRT:Invalid argument
というメッセージが出ます(kernel-2.0.36の場合は出ない)。
---------------------- /etc/pcmcia/network ---------------
#! /bin/sh
#
if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi
# Get device attributes
get_info $DEVICE
HWADDR=`/sbin/ifconfig $DEVICE | sed -n -e 's/.*addr \([^ ]*\) */\1/p'`
# Load site-specific settings
ADDRESS="$SCHEME,$SOCKET,$INSTANCE,$HWADDR"
start_fn () { return; }
stop_fn () { return; }
. $0.opts
RESOLV=/etc/resolv.conf
case "$ACTION" in
'start')
test "$IF_PORT" && /sbin/ifport $DEVICE $IF_PORT
if is_true $BOOTP ; then
/sbin/ifconfig $DEVICE up 0.0.0.0
/sbin/route add default dev $DEVICE
eval `/sbin/bootpc --bootfile '' --returniffail \
--timeoutwait 10 --dev $DEVICE`
/sbin/route del default
/sbin/ifconfig $DEVICE down
if [ "$GATEWAYS" ] ; then
set - $GATEWAYS ; GATEWAY=$1
fi
fi
if is_true $DHCP ; then
/sbin/ifconfig $DEVICE up 0.0.0.0
/sbin/route add default dev $DEVICE
if /usr/sbin/dhcpcd-sv -V 2>&1 | grep -q DHCP ; then
/usr/sbin/dhcpcd-sv $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
/usr/sbin/dhcpcd-sv -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
fi
if [ "$IPADDR" ] ; then
# Basic network setup
BC=${BROADCAST:+broadcast $BROADCAST}
/sbin/ifconfig $DEVICE up $IPADDR netmask $NETMASK $BC
if [ "$NETWORK" ] ; then
/sbin/ifuser $DEVICE $NETWORK || \
/sbin/route add -net $NETWORK netmask $NETMASK dev $DEVICE
elif [ "$GATEWAY" ] ; then
/sbin/ifuser $DEVICE $GATEWAY || \
/sbin/route add $GATEWAY $DEVICE
fi
test "$GATEWAY" && /sbin/route add default gw $GATEWAY metric 1
# Update DNS stuff
if [ "$DOMAIN$SEARCH$DNSSRVS$DNS_1$DNS_2$DNS_3" ] ; then
echo "# $DEVICE begin" > $RESOLV.N
test "$DOMAIN" && echo "domain $DOMAIN" >> $RESOLV.N
test "$SEARCH" && echo "search $SEARCH" >> $RESOLV.N
for DNS in $DNSSRVS $DNS_1 $DNS_2 $DNS_3 ; do
echo "nameserver $DNS" >> $RESOLV.N
done
echo "# $DEVICE end" >> $RESOLV.N
sed -e "/# $DEVICE begin/,/# $DEVICE end/d" $RESOLV >> $RESOLV.N
mv $RESOLV.N $RESOLV
fi
# Handle NFS mounts
if [ "$MOUNTS" ] ; then
for MT in $MOUNTS ; do mount -v $MT ; done
fi
fi
if [ "$IPX_NETNUM" ] ; then
ipx_interface add $DEVICE $IPX_FRAME $IPX_NETNUM
fi
start_fn $DEVICE
;;
'stop')
stop_fn $DEVICE
if is_true $BOOTP || is_true $DHCP || [ "$IPADDR" ] ; then
# Shut down all NFS mounts on this interface
nfsstop ()
{
while read HOST MT ; do
nfsstop
if /sbin/ifuser $DEVICE $HOST ; then
fuser -s -k -m $MT
umount -v $MT
fi
done
}
mount -t nfs | sed -e 's/:.* on \(.*\) type .*/ \1/' | nfsstop
test "$IPX_NETNUM" && ipx_interface del $DEVICE $IPX_FRAME
# Remove nameservers
if fgrep -q "# $DEVICE begin" $RESOLV ; then
sed -e "/# $DEVICE begin/,/# $DEVICE end/d" $RESOLV > $RESOLV.N
mv $RESOLV.N $RESOLV
fi
if is_true $DHCP ; then
kill -TERM `cat /var/run/dhcpcd-$DEVICE.pid`
sleep 2
/usr/sbin/dhcpcd-sv -V 2>&1 | grep -q DHCP || \
rm -f /var/run/dhcpcd-$DEVICE.pid
fi
fi
/sbin/ifconfig $DEVICE down
;;
'check')
/sbin/ifconfig $DEVICE | grep -q RUNNING || exit 0
# Check for any in-use NFS mounts
nfscheck ()
{
while read HOST MT ; do
/sbin/ifuser $DEVICE $HOST && fuser -sm $MT && exit 1
done
}
mount -t nfs | sed -e 's/:.* on \(.*\) type .*/ \1/' | nfscheck
# Check for active TCP or UDP connections
getdests ()
{
IFS=" :" ; read A ; read A
while read A B C D E HOST PORT STATE ; do
if [ "$STATE" != "FIN_WAIT1" -a "$STATE" != "FIN_WAIT2" \
-a "$STATE" != "CLOSE_WAIT" -a "$STATE" != "TIME_WAIT" \
-a "$HOST" != "127.0.0.1" -a "$HOST" != "0.0.0.0" \
-a "$PORT" != "*" ] ; then
echo $HOST
fi
done
}
DESTS=`netstat -ntuw | getdests`
/sbin/ifuser $DEVICE $DESTS && exit 1
;;
'cksum')
chk_simple "$3,$SOCKET,$INSTANCE,$HWADDR" || exit 1
;;
'restart')
test "$IPADDR" && /sbin/ifconfig $DEVICE down up
;;
'suspend'|'resume')
;;
*)
usage
;;
esac
exit 0
---------------------- /etc/pcmcia/network 終わり------------
--
Satoru Tadokoro
田所 智
Division Of Mathematics
Graduate School Of Science
Hokkaido University
jordi@xxxxxxxxxxxxxxxx
tadokoro@xxxxxxxxxxxxxxxxxxxxxx