From c0b4b19486aaa6e277c3344c40419225e085bd69 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Tue, 11 Aug 2009 08:04:52 -0400 Subject: Everyone use i/o functions from globals/hooks Signed-off-by: Jim Pryor --- src-wireless/netcfg-auto-wireless | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src-wireless/netcfg-auto-wireless') diff --git a/src-wireless/netcfg-auto-wireless b/src-wireless/netcfg-auto-wireless index e77eb0e..50d49be 100644 --- a/src-wireless/netcfg-auto-wireless +++ b/src-wireless/netcfg-auto-wireless @@ -3,8 +3,6 @@ . /usr/lib/network/network . /usr/lib/network/wireless -. /etc/rc.conf -. /etc/rc.d/functions # wifi_auto # autoconnect wireless interface @@ -12,15 +10,13 @@ wifi_auto() { interface=$1; - stat_busy "Scanning for networks" + report_try "Scanning for networks" ifconfig $interface up networks="$(list_networks $interface)" if [[ ! "$networks" ]]; then - stat_append "- No networks available." - stat_fail - exit 1 + exit_fail "- No networks available." fi # Loop through all the found essid's, then find a matching profile. @@ -42,18 +38,14 @@ wifi_auto() exit $? fi - stat_append "- No profiles matched the found networks" - stat_fail - exit 1 + exit_fail "- No profiles matched the found networks" } if [[ $(id -u) -ne 0 ]]; then - err "This script needs to be run with root priviledges" - exit 1 + exit_stderr "This script needs to be run with root privileges" fi if [[ -z $1 ]]; then - err "Please supply an interface to connect" - exit 1 + exit_stderr "Please supply an interface to connect" fi wifi_auto $1 -- cgit v1.2.3-24-g4f1b