blob: 4050e29bb3c8d71848dc961a45c950ff95a22949 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
Index: lib/rcscripts/net/iwconfig.sh
===================================================================
--- lib/rcscripts/net/iwconfig.sh (revision 2186)
+++ lib/rcscripts/net/iwconfig.sh (working copy)
@@ -222,14 +222,6 @@
iwconfig_set_mode "${iface}" "${mode}"
- channel="channel_${ifvar}"
- # We default the channel to 3
- channel="${!channel:-3}"
- if ! iwconfig "${iface}" channel "${channel}" ; then
- ewarn "${iface} does not support setting the channel to \"${channel}\""
- return 1
- fi
-
# Now set the key
if ! iwconfig "${iface}" key ${key} ; then
if [[ ${key} != "off" ]]; then
@@ -244,6 +236,13 @@
return 1
fi
+ channel="channel_${ifvar}"
+ # We default the channel to 3
+ if ! iwconfig "${iface}" channel "${!channel:-3}" ; then
+ ewarn "${iface} does not support setting the channel to \"${!channel:-3}\""
+ return 1
+ fi
+
# Finally apply the user Config
iwconfig_user_config "${iface}" "${ESSIDVAR}"
@@ -378,6 +377,12 @@
[[ ${key} != "off" ]] && w=$(iwconfig_get_wep_status "${iface}")
fi
+ if ! iwconfig "${iface}" essid "${ESSID}" ; then
+ if [[ ${ESSID} != "any" ]]; then
+ ewarn "${iface} does not support setting ESSID to \"${dessid}\""
+ fi
+ fi
+
# Only use channel or frequency
if [[ -n ${chan} ]] ; then
iwconfig "${iface}" channel "${chan}"
@@ -385,13 +390,7 @@
iwconfig "${iface}" freq "${freq}"
fi
[[ -n ${mac} ]] && iwconfig "${iface}" ap "${mac}"
-
- if ! iwconfig "${iface}" essid "${ESSID}" ; then
- if [[ ${ESSID} != "any" ]]; then
- ewarn "${iface} does not support setting ESSID to \"${dessid}\""
- fi
- fi
-
+
# Finally apply the user Config
iwconfig_user_config "${iface}" "${ESSIDVAR}"
@@ -481,7 +480,8 @@
;;
*Frequency:*)
freq[i]="${line#*:}"
- freq[i]="${freq[i]%% *}"
+ x="${freq[i]#* }"
+ freq[i]="${freq[i]%% *}${x:0:1}"
;;
*Channel:*)
chan[i]="${line#*:}"
Index: sbin/rc-daemon.sh
===================================================================
--- sbin/rc-daemon.sh (revision 2186)
+++ sbin/rc-daemon.sh (working copy)
@@ -155,7 +155,7 @@
${e} || return 0
fi
else
- kill -s "${signal}" "${pid}" 2>/dev/null
+ [[ ${i} == "0" ]] && kill -s "${signal}" "${pid}" 2>/dev/null
[[ ! -d "/proc/${pid}" ]] && return 0
fi
LC_ALL=C /bin/sleep "${s}"
|