Commit ccd88fb
ffffm-ath9k-broken-wifi-workaround: Avoid overlong sleeps
The ath9k workaround is using a sleep before starting a batctl ping.
The time for the sleep is calculated using awk and should be between 0-24
seconds. The duration is then tried to be stored in $RANDOM.
Unfortunately, $RANDOM is a special variable in bash/ksh/... which always
returns a "different" random value when read. This behavior is also enabled
in ash when CONFIG_ASH_RANDOM_SUPPORT is enabled - which is the case since
OpenWrt commit 8f427f1a058d ("busybox: turn on
BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT for having $RANDOM").
The script is therefore creating sleep durations of 0-32767s since OpenWrt
23.05. As result, the script either:
* for versions without the LOCK: the number of sleep processes (and related
ash processes) increase steadily and after some time use up all memory on
the system.
* for versions with the LOCK: the script will not do anything (besides
logging "Another instance is still running, aborting.") for a long
time
Just rename the variable to avoid this problem.
Signed-off-by: Sven Eckelmann <sven@narfation.org>1 parent 3405179 commit ccd88fb
1 file changed
Lines changed: 2 additions & 2 deletions
File tree
- ffffm-ath9k-broken-wifi-workaround/files/lib/gluon/ath9k-broken-wifi-workaround
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
| 202 | + | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
0 commit comments