summaryrefslogtreecommitdiffstats
path: root/src/netcfg
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-09-14 05:43:38 +0200
committerJames Rayner <james@archlinux.org>2009-09-14 08:23:56 +0200
commit2e0232ccf156498b81c06044890e59fb4a6b7943 (patch)
treeeb9a2fd1fc0f0b1a7d0797179368ed42b3d6db80 /src/netcfg
parentdeed4d3d3cff0fa45d0d0d5aa665db102cdc5ff3 (diff)
downloadnetctl-2e0232ccf156498b81c06044890e59fb4a6b7943.tar.gz
netctl-2e0232ccf156498b81c06044890e59fb4a6b7943.tar.xz
Returns and exits
* add some abortive returns * some exit tweaks Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src/netcfg')
-rw-r--r--src/netcfg8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/netcfg b/src/netcfg
index 91d038e..fd589b0 100644
--- a/src/netcfg
+++ b/src/netcfg
@@ -28,7 +28,6 @@ usage()
echo "-v, version Output version information and exit"
echo " all-resume Resume previously suspended profiles and reconnect them"
echo " all-suspend Store a list of current running profiles and suspend them"
- exit 1
}
# TODO: Re-add ROOT check and rewrite with getopts from BashFAQ
@@ -38,7 +37,8 @@ case "$1" in
version
exit 0;;
--help|-h|help)
- usage;;
+ usage
+ exit 0;;
list|-l)
echo "Available Profiles"
echo "------------------"
@@ -84,12 +84,14 @@ case "$1" in
all-suspend)
all_suspend;;
-*|--*)
- usage;;
+ usage
+ exit 1;;
*)
if [[ -n "$1" ]]; then
profile_up "$1"
else
usage
+ exit 1
fi
;;
esac