File:  [ELWIX - Embedded LightWeight unIX -] / elwix / config / etc / default / rc.d / 014.lagg.stop
Revision 1.2.14.1: download - view: text, annotated - select for diffs - revision graph
Thu Mar 5 23:39:31 2015 UTC (9 years, 4 months ago) by misho
Branches: elwix2_3
Diff to: branchpoint 1.2: preferred, unified
modify scripts

    1: #!/bin/sh
    2: 
    3: IFACE="lagg0"
    4: PROTO="lacp"
    5: PORTS="fxp0 fxp1"
    6: 
    7: MEDIA="autoselect"
    8: 
    9: OPTS=""
   10: #IP="auto"
   11: IP=""
   12: ALIASES=""
   13: #IP6="auto"
   14: IP6=""
   15: ALIASES6=""
   16: 
   17: [ -z "$IFACE" ] && exit
   18: 
   19: echo "Config Ethernet-Link aggregation interface $IFACE ..."
   20: 
   21: ifconfig $IFACE create || exit
   22: ifconfig $IFACE laggproto $PROTO
   23: for p in $PORTS; do
   24: 	ifconfig $IFACE laggport $p
   25: done
   26: 
   27: if [ -n "$MEDIA" ]; then
   28: 	ifconfig $IFACE media $MEDIA
   29: fi
   30: if [ -n "$IP" ]; then
   31: 	if [ "$IP" = "auto" ]; then
   32: 		dhclient $IFACE
   33: 	else
   34: 		ifconfig $IFACE inet $IP
   35: 	fi
   36: fi
   37: for i in $ALIASES; do
   38: 	ifconfig $IFACE inet alias $i
   39: done
   40: if [ -n "$IP6" ]; then
   41: 	if [ "$IP" = "auto" ]; then
   42: 		ifconfig $IFACE accept_rtadv
   43: 	else
   44: 		ifconfig $IFACE inet6 $IP6
   45: 	fi
   46: fi
   47: for i in $ALIASES6; do
   48: 	ifconfig $IFACE inet6 alias $i
   49: done
   50: 
   51: ifconfig $IFACE $OPTS up

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>