From: <kr...@us...> - 2007-04-18 18:24:10
|
Revision: 847 http://svn.sourceforge.net/astlinux/?rev=847&view=rev Author: krisk84 Date: 2007-04-18 11:24:10 -0700 (Wed, 18 Apr 2007) Log Message: ----------- include interface renaming support Modified Paths: -------------- trunk/package/wireless-tools/wireless-tools.mk trunk/target/generic/target_skeleton/etc/init.d/network trunk/target/generic/target_skeleton/stat/etc/rc.conf Modified: trunk/package/wireless-tools/wireless-tools.mk =================================================================== --- trunk/package/wireless-tools/wireless-tools.mk 2007-04-18 15:23:00 UTC (rev 846) +++ trunk/package/wireless-tools/wireless-tools.mk 2007-04-18 18:24:10 UTC (rev 847) @@ -39,6 +39,8 @@ $(INSTALL) -D -m 0755 $(WIRELESS_TOOLS_BUILD_DIR)/ifrename $(TARGET_DIR)/usr/sbin/ifrename $(INSTALL) -D -m 0644 $(WIRELESS_TOOLS_BUILD_DIR)/libiw.so.$(WIRELESS_TOOLS_VER) \ $(TARGET_DIR)/usr/lib/libiw.so.$(WIRELESS_TOOLS_VER) + ln -s /tmp/etc/iftab $(TARGET_DIR)/etc/iftab + ln -s /tmp/etc/iftab.init $(TARGET_DIR)/etc/iftab.init wireless-tools: $(TARGET_DIR)/sbin/iwconfig Modified: trunk/target/generic/target_skeleton/etc/init.d/network =================================================================== --- trunk/target/generic/target_skeleton/etc/init.d/network 2007-04-18 15:23:00 UTC (rev 846) +++ trunk/target/generic/target_skeleton/etc/init.d/network 2007-04-18 18:24:10 UTC (rev 847) @@ -3,6 +3,39 @@ . /etc/rc.conf init () { +if [ "$IFRENAME" ] +then + +#clear existing iftabs +echo -n > /tmp/etc/iftab +echo -n > /tmp/etc/iftab.init + +#set COUNT +COUNT=10 + +for i in $IFRENAME +do +IF=`echo $i | cut -d: -f1` +DRIVER=`echo $i | cut -d: -f2` +ID=`echo $i | cut -d: -f3` + +COUNT=`expr $COUNT - 1` + +if `echo $ID | grep -q i` +then +RID=`echo $ID | tr -d i` +echo "eth"$COUNT" driver $DRIVER interrupt $RID" >> /tmp/etc/iftab.init +fi + +if `echo $ID | grep -q i` +then +RID=`echo $ID | tr -d i` +echo "$IF driver $DRIVER interrupt $RID" >> /tmp/etc/iftab +fi + +done +fi + if [ -r /etc/iftab.init ] then echo "Remapping interfaces (init)..." Modified: trunk/target/generic/target_skeleton/stat/etc/rc.conf =================================================================== --- trunk/target/generic/target_skeleton/stat/etc/rc.conf 2007-04-18 15:23:00 UTC (rev 846) +++ trunk/target/generic/target_skeleton/stat/etc/rc.conf 2007-04-18 18:24:10 UTC (rev 847) @@ -27,6 +27,12 @@ ###Interfaces +##IFRENAME Support +##If for some reason you need to move your interfaces around before +##they are configured, you can do that here if you built your system +##with wireless-tools enabled (it's included by default. +#IFRENAME="eth0:8139too:i10 eth1:8139too:i12 eth2:8139too:i11" + ##VLANS ##Configure vlans here. These will be created on boot BEFORE INTIF, etc are ##brought up. You can then use these values for INTIF, EXTIF, etc. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |