#!/bin/sh
#
-# $Id: ifup-routes,v 1.8.2.1 2000/10/18 20:10:55 misiek Exp $
+# $Id: ifup-routes,v 1.8.2.2 2000/10/27 10:34:24 misiek Exp $
#
# adds static routes which go through device $DEVICE
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network-scripts/.functions
-if [ "$1" = "" ]; then
+DEV=$1
+
+if [ -z "$DEV" ]; then
nls "usage: %s <device name>" "ifup-routes" >&2
exit 1
fi
exit 0
fi
-cd /etc/sysconfig/network-scripts
-
-CONFIG=$1
+if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
+ CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
+else
+ CONFIG="$DEV"
+fi
+
source_config
# set all major variables