Drat. I forgot to include the patch...
Here it is...
--Jason
On Wed, 2003-11-19 at 12:02, Jason A. Pfeil wrote:
> Good Afternoon to all.
>
> Does anyone have any way to set up static routes using the standard
> gentoo /etc/conf.d/net system instead of having to use the local.start
> configuration method of issuing commands myself?
>
> I looked in the /etc/init.d/net.eth0 rc script and didn't find a way to
> do it so I quickly hacked in a method that seems to work for me. Please
> let me know your thoughts/comments and whether or not I should send this
> to gentoo-dev.
>
> The patch against /etc/init.d/net.eth0 is attached.
>
> Have a great day!
>
> --Jason
--
Jason A. Pfeil [EMAIL PROTECTED]
Senior Open Systems Engineer http://www.10East.com
10East, Inc. (904)220-DOCS
--- /etc/init.d/net.eth0.20031119.1200 2003-11-19 07:26:54.000000000 -0500
+++ /etc/init.d/net.eth0 2003-11-19 06:45:32.000000000 -0500
@@ -33,6 +33,7 @@
inet6_IFACE="$(eval echo \$\{inet6_${iface}\})"
alias_IFACE="$(eval echo \$\{alias_${iface}\})"
status_IFACE="$(ifconfig | gawk -v IFACE="${iface}" '/Link/ { if ($1 == IFACE) print "up" }')"
+ routes_IFACE="$(eval echo \$\{routes_${iface}\})"
vlans="$(eval echo \$\{iface_${IFACE}_vlans\})"
}
@@ -113,7 +114,28 @@
done
save_options "inet6" "${inet6_IFACE}"
fi
-
+
+ if [ -n "${routes_IFACE}" ]
+ then
+ ebegin "Setting up static routes"
+ ROUTE_EXE=/sbin/route
+ ROUTE_CMD=""
+ for element in $routes_IFACE; do
+ if [ "$element" = "host" -o "$element" = "net" ]
+ then
+ if [ "x$ROUTE_CMD" != "x" ]
+ then
+ `$ROUTE_CMD`
+ fi
+ ROUTE_CMD="$ROUTE_EXE add -$element"
+ else
+ ROUTE_CMD="$ROUTE_CMD $element"
+ fi
+ done
+ `$ROUTE_CMD`
+ eend 0
+ fi
+
if [ -n "${gateway}" ] && [ "${gateway%/*}" = "${IFACE}" ]
then
ebegin " Setting default gateway"
--
[EMAIL PROTECTED] mailing list