Annotation of elwix/config/etc/default/rc.d/014.lagg.stop, revision 1.3

1.2       misho       1: #!/bin/sh
                      2: 
                      3: IFACE="lagg0"
                      4: PROTO="lacp"
                      5: PORTS="fxp0 fxp1"
                      6: 
                      7: MEDIA="autoselect"
                      8: 
1.3     ! misho       9: OPTS=""
        !            10: #IP="auto"
1.2       misho      11: IP=""
1.3     ! misho      12: ALIASES=""
        !            13: #IP6="auto"
        !            14: IP6=""
        !            15: ALIASES6=""
        !            16: 
        !            17: [ -z "$IFACE" ] && exit
1.2       misho      18: 
                     19: echo "Config Ethernet-Link aggregation interface $IFACE ..."
1.3     ! misho      20: 
        !            21: ifconfig $IFACE create || exit
1.2       misho      22: ifconfig $IFACE laggproto $PROTO
                     23: for p in $PORTS; do
                     24:        ifconfig $IFACE laggport $p
                     25: done
1.3     ! misho      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>