summaryrefslogtreecommitdiffstats
path: root/src/connections/wireless
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-08-11 18:49:08 +0200
committerJames Rayner <james@archlinux.org>2009-09-07 12:04:04 +0200
commit6b0c686613a26541ce3164d9e995f639ef3a9b9f (patch)
tree67b2d4e8d1fa500752be8c657491afe2bb9db14b /src/connections/wireless
parent6e369d4a1e082be88c3e8132477452c2dda3cf0e (diff)
downloadnetctl-6b0c686613a26541ce3164d9e995f639ef3a9b9f.tar.gz
netctl-6b0c686613a26541ce3164d9e995f639ef3a9b9f.tar.xz
Comments, more harmless bits
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src/connections/wireless')
-rw-r--r--src/connections/wireless17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index 2951cdd..c7e54ed 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -57,8 +57,12 @@ wireless_up() {
quirk prescan && iwlist "$INTERFACE" scan &> /dev/null # bcm43xx
if quirk preessid; then # ipw3945
if [[ -n "$AP" ]]; then # JP: enable use of AP
+ # JP: Since I don't undertand why the else block below is an eval, I'm not sure
+ # if this command also needs to be eval'd
iwconfig "$INTERFACE" mode managed ap "$AP"
else
+ # JP: I don't understand why this needs to be an eval. What's wrong with just:
+ # iwconfig "$INTERFACE" mode managed essid "$ESSID"
eval "iwconfig \"$INTERFACE\" mode managed essid \"$ESSID\""
fi
fi
@@ -73,7 +77,7 @@ wireless_up() {
# but instead we explicitly pass $CONNECTION
fi
if [[ $? -gt 0 ]]; then
- report_fail "Network \"$OLDESSID\" not present."
+ report_fail "Wireless network \"$OLDESSID\" not present."
return 1
fi
fi
@@ -93,9 +97,9 @@ wireless_up() {
if [[ -z "$WEP_OPTS" ]]; then
if [[ "$SECURITY" = "wep" ]]; then
if [[ -n "$AP" ]]; then
- WEP_OPTS="ap \"$AP\" key $KEY"
+ WEP_OPTS="ap \"$AP\" key $KEY" # JP: formerly I had "...key open $KEY"; is it correct to omit the 'open'?
else
- WEP_OPTS="essid \"$ESSID\" key $KEY"
+ WEP_OPTS="essid \"$ESSID\" key $KEY" # JP: formerly I had "...key open $KEY"; is it correct to omit the 'open'?
fi
elif [[ "$SECURITY" = "none" ]]; then
if [[ -n "$AP" ]]; then
@@ -113,6 +117,8 @@ wireless_up() {
fi
report_debug wireless_up iwconfig "$INTERFACE" $WEP_OPTS
+ # JP: I don't understand why this needs to be an eval. What's wrong with just:
+ # iwconfig "$INTERFACE" $WEP_OPTS
if ! eval "iwconfig \"$INTERFACE\" $WEP_OPTS"; then
report_fail "Could not set wireless configuration."
return 1
@@ -133,8 +139,12 @@ wireless_up() {
# Quirk for broken drivers... http://bbs.archlinux.org/viewtopic.php?id=36384
if quirk "wpaessid"; then
if [[ -n "$AP" ]]; then
+ # JP: Since I don't undertand why the else block below is an eval, I'm not sure
+ # if this command also needs to be eval'd
iwconfig "$INTERFACE" ap "$AP"
else
+ # JP: I don't understand why this needs to be an eval. What's wrong with just:
+ # iwconfig "$INTERFACE" essid "$ESSID"
eval "iwconfig \"$INTERFACE\" essid \"$ESSID\""
fi
fi
@@ -195,6 +205,7 @@ wireless_up() {
fi
}
+# wireless_down PROFILE [ LEAVE ifconfig up? default no ]
wireless_down() {
local PROFILE="$1" NOETHERNETDOWN="$2"
load_profile "$PROFILE"