#
-# $Id: functions.network,v 1.65 2001/10/11 18:49:00 baggins Exp $
+# $Id: functions.network,v 1.66 2001/11/19 13:00:56 zagrodzki Exp $
#
# This is not a shell script; it provides functions to network scripts
# that source it.
setup_ip_param ()
{
# detect network device type (ie. dummy, eth for dummy0, eth0 ..)
-DEVICETYPE=$(echo $DEVICE | awk ' { gsub(/[0-9]*\.?[0-9]*$/,NUL); print $0 } ')
+if [ -z "$DEVICETYPE" ]; then
+ DEVICETYPE=$(echo $DEVICE | awk ' { gsub(/[0-9]*\.?[0-9]*$/,NUL); print $0 } ')
+fi
+
# real name of device (ie. is eth0 for eth0,eth0:1,eth0:alias)
DEVICE=$(echo $DEVICE | awk ' { gsub(/:.*$/,NUL); print $0 } ')