File:  [ELWIX - Embedded LightWeight unIX -] / elwix / config / etc / default / rc.d / 013.vlan0.stop
Revision 1.1.1.1.22.1: download - view: text, annotated - select for diffs - revision graph
Thu Mar 5 22:58:33 2015 UTC (9 years, 4 months ago) by misho
Branches: elwix2_3
Diff to: branchpoint 1.1.1.1: preferred, unified
rework vlan scripts

    1: #!/bin/sh
    2: 
    3: IFACE="vlan0"
    4: 
    5: VLAN="1"
    6: VLANDEV="em0"
    7: 
    8: OPTS=""
    9: #IP="auto"
   10: IP="192.168.0.1/24"
   11: #IP6="auto"
   12: IP6=""
   13: 
   14: [ -z "$IFACE" -o -z "$VLANDEV" ] && exit
   15: 
   16: echo "Config VLAN #$VLAN network interface $IFACE ..."
   17: 
   18: ifconfig $IFACE create vlan $VLAN vlandev $VLANDEV || exit
   19: if [ -n "$IP" ]; then
   20: 	if [ "$IP" = "auto" ]; then
   21: 		dhclient $IFACE
   22: 	else
   23: 		ifconfig $IFACE inet $IP
   24: 	fi
   25: fi
   26: if [ -n "$IP6" ]; then
   27: 	if [ "$IP" = "auto" ]; then
   28: 		ifconfig $IFACE accept_rtadv
   29: 	else
   30: 		ifconfig $IFACE inet6 $IP6
   31: 	fi
   32: fi
   33: ifconfig $IFACE $OPTS up

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