summaryrefslogtreecommitdiffstats
path: root/scripts/netcfg
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-03-12 16:01:43 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2012-03-12 16:01:43 +0100
commit94ae8b1ccd08b7d0b2408db5b2054dee53413166 (patch)
tree534008d264f6c2b15b2431d5d20ca56f0e4b8c07 /scripts/netcfg
parent1a6cc347550cfde03be9f3155240b8d0e60e3e39 (diff)
downloadnetctl-94ae8b1ccd08b7d0b2408db5b2054dee53413166.tar.gz
netctl-94ae8b1ccd08b7d0b2408db5b2054dee53413166.tar.xz
Rename -i parameter to -D
-i is not a very cool parameter for downing an interface. Change it to -D so that it mirrors -R in the sense that a capital is used for interface-based actions. The old behaviour is kept (undocumented) for backward compatibility. Also a typo (iface-recont should have been iface-recon) is fixed. Lastly some restrictions on profile naming are included in the documentation. The "should not start with '@'" is only for usage with net-profiles.
Diffstat (limited to 'scripts/netcfg')
-rwxr-xr-xscripts/netcfg23
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/netcfg b/scripts/netcfg
index e6de3bd..f286796 100755
--- a/scripts/netcfg
+++ b/scripts/netcfg
@@ -20,8 +20,8 @@ usage()
echo "-a, all-down Take all active profiles down"
echo "-c, check-iface Do not start profile if interface is already up"
echo "-d, down Take specified profile down"
+ echo "-D, iface-down Take down profile active on specified interface"
echo "-h, help This help message"
- echo "-i, iface-down Take down profile active on specified interface"
echo "-l, list List all available profiles"
echo "-r, reconnect Disconnect and reconnect specified profile"
echo "-R, iface-recon Reconnect profile active on specified interface"
@@ -60,33 +60,32 @@ fi
cd /
case "$1" in
-
-c|check-iface|-u|up)
CHECK="YES"
profile_up "$2";;
- clean)
- rm "$STATE_DIR/interfaces"/* 2> /dev/null
- rm "$STATE_DIR/profiles"/* 2> /dev/null
- rm "$STATE_DIR/suspend"/* 2> /dev/null
- rm "$STATE_DIR/last_profile" 2> /dev/null
- killall wpa_supplicant 2> /dev/null
- killall dhcpcd 2> /dev/null
- ;;
-d|down)
profile_down "$2";;
- -i|iface-down)
+ -D|iface-down|-i) # -i is there for backward compatibility (pre 2.7)
interface_down "$2";;
-a|all-down)
all_down;;
-r|reconnect)
profile_down "$2"
profile_up "$2";;
- -R|iface-recont)
+ -R|iface-recon)
interface_reconnect "$2";;
all-resume)
all_resume;;
all-suspend)
all_suspend;;
+ clean)
+ rm "$STATE_DIR/interfaces"/* 2> /dev/null
+ rm "$STATE_DIR/profiles"/* 2> /dev/null
+ rm "$STATE_DIR/suspend"/* 2> /dev/null
+ rm "$STATE_DIR/last_profile" 2> /dev/null
+ killall wpa_supplicant 2> /dev/null
+ killall dhcpcd 2> /dev/null
+ ;;
-*|--*)
usage
exit 1;;