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, 4 months ago) by misho
Branches: elwix2_3
Diff to: branchpoint 1.1.1.1: preferred, unified
redesigned lan scripts

#!/bin/sh

IFACE="em0"

MEDIA="autoselect"

OPTS=""
#IP="auto"
IP="192.168.1.1/24"
#IP6="auto"
IP6=""

[ -z "$IFACE" ] && exit

echo "Config Ethernet network interface $IFACE ..."

if [ -n "$MEDIA" ]; then
	ifconfig $IFACE media $MEDIA
fi
if [ -n "$IP" ]; then
	if [ "$IP" = "auto" ]; then
		dhclient $IFACE
	else
		ifconfig $IFACE inet $IP
	fi
fi
if [ -n "$IP6" ]; then
	if [ "$IP" = "auto" ]; then
		ifconfig $IFACE accept_rtadv
	else
		ifconfig $IFACE inet6 $IP6
	fi
fi
ifconfig $IFACE $OPTS up

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