From b4f8c168e5947e8b62b512b2f35968a73f925633 Mon Sep 17 00:00:00 2001 From: brooks Date: Thu, 16 Jun 2005 18:08:04 +0000 Subject: Make sure we actually read the config files before testing values from them. Reported by: Darren Pilgrim PR: conf/82313 Approved by: re (network interface startup blanket) --- etc/pccard_ether | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'etc') diff --git a/etc/pccard_ether b/etc/pccard_ether index 99c3204..d752055 100755 --- a/etc/pccard_ether +++ b/etc/pccard_ether @@ -15,18 +15,6 @@ usage() err 3 'USAGE: $0 interface (start|stop)' } -ifn=$1 -shift -startstop=$1 -shift - -# Ignore interfaces not in removable_interfaces -expr "${removable_interfaces}" : ".*${ifn}" > /dev/null || exit 0 - -if [ -n "$1" ]; then - usage -fi - setup_routes() { # Add default route into $static_routes @@ -66,8 +54,20 @@ remove_routes() fi } +ifn=$1 +shift +startstop=$1 +shift + load_rc_config pccard_ether +# Ignore interfaces not in removable_interfaces +expr "${removable_interfaces}" : ".*${ifn}" > /dev/null || exit 0 + +if [ -n "$1" ]; then + usage +fi + case ${startstop} in [Ss][Tt][Aa][Rr][Tt] | '') if [ -x /usr/bin/grep ]; then -- cgit v1.1