"at1700.c" |
---|
for(i = 0; i < 3; i++) { unsigned short eeprom_val = read_eeprom(ioaddr, 4+i); printk("%04x", eeprom_val); ((unsigned short *)dev->dev_addr)[i] = ntohs(eeprom_val); } 上記のソースの後ろに以下の行を付け加える。 (?の部分は登録してあるMACアドレスを記入) { unsigned short mac[3] = { 0x????, 0x????, 0x???? }; printk(" -> fake["); for(i = 0; i < 3; i++) { unsigned short eeprom_val = mac[i]; printk("%04x", eeprom_val); ((unsigned short *)dev->dev_addr)[i] =ntohs(eeprom_val); } printk("]"); } |
"3c509.c" |
---|
/* Read in the station address. */ for (i = 0; i < 6; i++) printk(" %2.2x", dev->dev_addr[i]); printk(", IRQ %d.\n", dev->irq); 上記のソースの後ろに以下の行を付け加える。 (?の部分は登録してあるMACアドレスを記入) dev->dev_addr[0]= 0x??; dev->dev_addr[1]= 0x??; dev->dev_addr[2]= 0x??; dev->dev_addr[3]= 0x??; dev->dev_addr[4]= 0x??; dev->dev_addr[5]= 0x??; printk(" -> fake["); for (i = 0; i < 6; i++) printk(" %2.2x", dev->dev_addr[i]); printk("]"); |
ifconfig cat /etc/dhcpc/hostinfo-eth? |
mv /etc/rc2.d/S13dhcpc /etc/rcS.d/S41dhcpc |
"/etc/init.d/dhcpc" |
---|
start) if [ "$IFACE" = "none" ] ; then echo "DHCP client daemon is disabled." exit fi mv /etc/dhcpc/hostinfo-eth0 /etc/dhcpc/hostinfo-eth0.bak (中略) restart) echo -n "Restarting DHCP client daemon: " mv /etc/dhcpc/hostinfo-eth0 /etc/dhcpc/hostinfo-eth0.bak (後略) |
"/etc/init.d/dhcp_wait" |
---|
#! /bin/sh echo -n "DHCP result" T=`date +%M`; T=`expr 1 + $T` echo -n ": " while test ! -f /etc/dhcpc/hostinfo-eth0 do echo -n "." expr $T \< `date +%M` > /dev/null && echo "time out." && exit 0 done echo "." ifconfig eth0 | sed "s/ */ /g" | grep inet ifconfig lo 127.0.0.1 route add -net 127.0.0.0 #eth0 IPADDR=`grep IPADDR /etc/dhcpc/hostinfo-eth0 | cut -d= -f2` NETMASK=`grep NETMASK /etc/dhcpc/hostinfo-eth0 | cut -d= -f2` BROADCAST=`grep BROADCAST /etc/dhcpc/hostinfo-eth0 | cut -d= -f2` GATEWAY=`grep ROUTER /etc/dhcpc/hostinfo-eth0 | cut -d= -f2` NETWORK=`grep IPADDR /etc/dhcpc/hostinfo-eth0 | cut -d= -f2 | cut -d. -f1-3`".0" echo "IPADDR=$IPADDR,NETMASK=$NETMASK,BROADCAST=$BROADCAST," echo -n "GATEWAY=$GATEWAY,NETWORK=$NETWORK" route add default gw ${GATEWAY} metric 1 dev eth0 ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} route add -net ${NETWORK} netmask ${NETMASK} dev eth0 route add default gw ${GATEWAY} metric 1 dev eth0 #eth1 IN_IPADDR=192.168.0.1 IN_NETMASK=255.255.255.0 IN_NETWORK=192.168.0.0 IN_BROADCAST=192.168.0.255 IN_GATEWAY=192.168.0.1 ifconfig eth1 ${IN_IPADDR} netmask ${IN_NETMASK} broadcast ${IN_BROADCAST} route add -net ${IN_NETWORK} netmask ${IN_NETMASK} dev eth1 |
ln /etc/init.d/dhcp_wait /etc/rcS.d/S41dhcp_wait mkdir /etc/rcS.d/NoUse mv /etc/rcS.d/S40network /etc/rcS.d/NoUse/ |
御意見御感想等ありましたらtoshi's BBSまたは、toshiまでどうぞ。
最終更新日:
Jan 10 06:46