|
From: Heiko Z. <smi...@us...> - 2010-01-09 15:54:17
|
Update of /cvsroot/devil-linux/build/config/etc/init.d In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv8250/config/etc/init.d Modified Files: network Log Message: - closed bug #53 - use "ip" instead of "ifconfig" commands in /etc/init.d/network (Roland Pabel / Heiko Zuerker) - build system: compile findutils right after glibc, because of xargs errors after updating glibc - added new dependency group to Makefile.build: GROUP_CUSTOM_BEFORE_KERNEL Index: network =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/init.d/network,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- network 13 Dec 2009 20:52:45 -0000 1.39 +++ network 9 Jan 2010 15:54:09 -0000 1.40 @@ -134,7 +134,7 @@ [ -n "$KEY" ] && OPTIONS="$OPTIONS key $KEY" echo -n "Setting wireless options for interface $DEVICE" - ifconfig $DEVICE up + ip link set $DEVICE up iwconfig $DEVICE $OPTIONS evaluate_retval @@ -221,14 +221,14 @@ # MAC spoofing only on physical interfaces if [ -n "$MAC" -a -z "$VLANID" -a -z "$BR_IF" ]; then echo -n "Spoofing MAC address on $DEVICE" - ifconfig $DEVICE hw ether $MAC + ip link set $DEVICE address $MAC evaluate_retval fi # # Bonding if [ "$BONDING_MASTER" = "yes" ]; then - ifconfig $DEVICE up + ip link set $DEVICE up ifenslave $DEVICE $BONDING_SLAVES $BONDING_OPTS fi @@ -240,22 +240,21 @@ dhcp_client_start $DEVICE else BCAST=""; test -n "$BROADCAST" && BCAST="broadcast $BROADCAST" - NMASK=""; test -n "$NETMASK" && NMASK="netmask $NETMASK" + NMASK=""; test -n "$NETMASK" && NMASK="/$NETMASK" echo -n "Starting interface $DEVICE"; ret=0 + ip link set $DEVICE up; let ret=$ret+$? if [ -n "$IP" ]; then # configure IPv4 address echo -n " [IPv4]" - ifconfig $DEVICE $IP $BCAST $NMASK up; let ret=$ret+$? - else - ifconfig $DEVICE up; let ret=$ret+$? + ip addr add $IP$NMASK $BCAST dev $DEVICE; let ret=$ret+$? fi if [ -n "$IPV6ADDR" ]; then # configure IPv6 address(es) echo -n " [IPv6]" for v6addr in $IPV6ADDR; do - ifconfig $DEVICE inet6 add $v6addr; let ret=$ret+$? + ip -6 addr add $v6addr dev $DEVICE; let ret=$ret+$? done fi @@ -354,7 +353,7 @@ [ "$DHCP" == yes ] && dhcp_client_stop echo -n "Stopping interface $DEVICE" - ifconfig $DEVICE down 2>/dev/null + ip link set $DEVICE down 2>/dev/null evaluate_retval # vlan-id's 0 and 4095 are reserved |