diff options
author | brooks <brooks@FreeBSD.org> | 2005-06-16 18:08:04 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-06-16 18:08:04 +0000 |
commit | b4f8c168e5947e8b62b512b2f35968a73f925633 (patch) | |
tree | 29135e73e1ac84c80cf9bc9128b63ed91b77b408 | |
parent | bf3a36a69556e94c9c7baca4c054ea6b0f511453 (diff) | |
download | FreeBSD-src-b4f8c168e5947e8b62b512b2f35968a73f925633.zip FreeBSD-src-b4f8c168e5947e8b62b512b2f35968a73f925633.tar.gz |
Make sure we actually read the config files before testing values from
them.
Reported by: Darren Pilgrim <dmp at bitfreak dot org>
PR: conf/82313
Approved by: re (network interface startup blanket)
-rwxr-xr-x | etc/pccard_ether | 24 |
1 files changed, 12 insertions, 12 deletions
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 |