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