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

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

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