- Timestamp:
- Sep 9, 2009, 3:35:48 PM (15 years ago)
- Branches:
- master
- Children:
- 884672b
- Parents:
- 9a6cb5a
- git-author:
- Maarten Lankhorst <mlankhorst@…> (09/09/09 15:34:11)
- git-committer:
- Maarten Lankhorst <mlankhorst@…> (09/09/09 15:35:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/bootscripts/common/network.xml
r9a6cb5a r423fe6b 42 42 43 43 # set to gateway IP address 44 GATEWAY=192.168.0.1</literal> 44 GATEWAY=192.168.0.1 45 46 # Interfaces to add to br0 bridge 47 # Leave commented to not setup a network bridge 48 # Substitute br0 for eth0 in the interface.eth0 sample below to bring up br0 49 # instead 50 # bcm47xx with vlans: 51 #BRIDGE_INTERFACES="eth0.0 eth0.1 wlan0" 52 # Other access point with a wired eth0 and a wireless wlan0 interface: 53 #BRIDGE_INTERFACES="eth0 wlan0" 54 </literal> 45 55 EOF</userinput></screen> 46 56 … … 87 97 Broadcast Address for the Subnet Mask of the IP Range being used on 88 98 this interface.</para> 99 100 </sect2> 101 102 <sect2 id="udhcpc.conf"> 103 <title>Creating the ${CLFS}/etc/udhcpc.conf File</title> 104 105 <indexterm zone="udhcpc.conf"> 106 <primary sortas="e-/etc/udhcpc.conf">/etc/udhcpc.conf</primary> 107 </indexterm> 108 109 <para>For DHCP to work properly a configuration script is needed. 110 Create a sample udhcpc.conf:</para> 111 112 <screen><userinput>mkdir ${CLFS}/etc/network.d && 113 cat > ${CLFS}/etc/network.d/interface.eth0 << "EOF" 114 <literal>#!/bin/sh 115 # udhcpc Interface Configuration 116 # Based on http://lists.debian.org/debian-boot/2002/11/msg00500.html 117 # udhcpc script edited by Tim Riker <Tim@Rikers.org> 118 119 [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 120 121 RESOLV_CONF="/etc/resolv.conf" 122 RESOLV_BAK="/etc/resolv.bak" 123 124 [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" 125 [ -n "$subnet" ] && NETMASK="netmask $subnet" 126 127 case "$1" in 128 deconfig) 129 if [ -f "$RESOLV_BAK" ]; then 130 mv "$RESOLV_BAK" "$RESOLV_CONF" 131 fi 132 /sbin/ifconfig $interface 0.0.0.0 133 ;; 134 135 renew|bound) 136 /sbin/ifconfig $interface $ip $BROADCAST $NETMASK 137 138 if [ -n "$router" ] ; then 139 while route del default gw 0.0.0.0 dev $interface ; do 140 true 141 done 142 143 for i in $router ; do 144 route add default gw $i dev $interface 145 done 146 fi 147 148 if [ ! -f "$RESOLV_BAK" ] && [ -f "$RESOLV_CONF" ]; then 149 mv "$RESOLV_CONF" "$RESOLV_BAK" 150 fi 151 152 echo -n > $RESOLV_CONF 153 [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF 154 for i in $dns ; do 155 echo nameserver $i >> $RESOLV_CONF 156 done 157 ;; 158 esac 159 160 exit 0 161 </literal>EOF 162 163 chmod +x ${CLFS}/etc/udhcpc.conf</userinput></screen> 89 164 90 165 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.