From ec0fb097b62d5861d382f56ce03246a51076bdfe Mon Sep 17 00:00:00 2001 From: Tasos Latsas Date: Wed, 8 Aug 2012 11:30:05 +0300 Subject: Better error handling in automatic connect scripts Signed-off-by: Tasos Latsas --- rc.d/net-auto-wireless | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'rc.d/net-auto-wireless') diff --git a/rc.d/net-auto-wireless b/rc.d/net-auto-wireless index 79c43b0..9094232 100755 --- a/rc.d/net-auto-wireless +++ b/rc.d/net-auto-wireless @@ -6,14 +6,12 @@ . /etc/conf.d/netcfg if [[ ! -x /usr/sbin/wpa_actiond ]]; then - echo "Please install 'wpa_actiond' to use net-auto-wireless" - exit 1 + exit_stderr "Please install 'wpa_actiond' to use net-auto-wireless" fi if [[ -z "${WIRELESS_INTERFACE}" ]]; then - echo "No interface name set. Add to /etc/conf.d/netcfg a line" - echo " WIRELESS_INTERFACE=\"your_interface\"" - exit 1 + exit_stderr "No interface name set. Add to /etc/conf.d/netcfg a line"$'\n' \ + " WIRELESS_INTERFACE='your_interface'" fi case "$1" in -- cgit v1.2.3-24-g4f1b