File:  [ELWIX - Embedded LightWeight unIX -] / elwix / config / etc / uboot / rc.d / 016.defaultroute.stop
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon Sep 15 19:06:52 2014 UTC (10 years, 3 months ago) by misho
Branches: MAIN
CVS tags: elwix2_8, elwix2_7, elwix2_6, elwix2_3, HEAD, ELWIX2_7, ELWIX2_6, ELWIX2_5, ELWIX2_2p0
elwix 2.2

#!/bin/sh

if [ -r /etc/mygate ]; then
	DEFROUTE=""
	DEFZ=`netstat -rnfinet | head -5 | tail -1 | cut -f 1 -d " "`

	echo -n "Add Default Route ... "
	if [ X"${DEFZ}" != X"default" ]; then
		echo "${DEFROUTE:=`cat /etc/mygate`}"
		route add default ${DEFROUTE:=`cat /etc/mygate`}
	else
		echo "Already Set (DHCP)"
	fi
fi

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