Annotation of elwix/config/etc/uboot/rc.d/013.vlan0.stop, revision 1.3
1.2 misho 1: #!/bin/sh
2:
3: IFACE="vlan0"
4:
5: VLAN="1"
1.3 ! misho 6: VLANDEV="em0"
1.2 misho 7:
1.3 ! misho 8: OPTS=""
! 9: #IP="auto"
1.2 misho 10: IP="192.168.0.1/24"
1.3 ! misho 11: ALIASES=""
! 12: #IP6="auto"
! 13: IP6=""
! 14: ALIASES6=""
1.2 misho 15:
1.3 ! misho 16: [ -z "$IFACE" -o -z "$VLANDEV" ] && exit
! 17:
! 18: echo "Config VLAN #$VLAN network interface $IFACE ..."
! 19:
! 20: ifconfig $IFACE create vlan $VLAN vlandev $VLANDEV || exit
! 21: if [ -n "$IP" ]; then
! 22: if [ "$IP" = "auto" ]; then
! 23: dhclient $IFACE
! 24: else
! 25: ifconfig $IFACE inet $IP
! 26: fi
! 27: fi
! 28: for i in $ALIASES; do
! 29: ifconfig $IFACE inet alias $i
! 30: done
! 31: if [ -n "$IP6" ]; then
! 32: if [ "$IP" = "auto" ]; then
! 33: ifconfig $IFACE accept_rtadv
! 34: else
! 35: ifconfig $IFACE inet6 $IP6
! 36: fi
! 37: fi
! 38: for i in $ALIASES6; do
! 39: ifconfig $IFACE inet6 alias $i
! 40: done
! 41: ifconfig $IFACE $OPTS up
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>