| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Instead of heavy subshelling, use pkill/pgrep. Also, be a bit more
specific on what we're killing.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
|
|
|
|
|
| |
Conditional expression like [ test1 -a test2 ] should be avoided as it
is not well defined.
See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16
and https://github.com/koalaman/shellcheck/wiki/SC2166
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
|
|
|
| |
Instead of "ip | sed", just read the sysfs file in which hardware
address is readily presented for us.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no need to $(cat .../uevent | grep DEVTYPE) and then compare it
to what we're looking for. grep can do all of it for us ("Useless Use of
Cat").
While at it, if we have three ways of checking whether a device is
wireless, let's order them from least expensive (checking dir is only
one stat()) to most expensive (iwconfig | grep). Proof of correctness:
if "iwconfig | grep" is returning true and the other two methods are
not, we will still reach "iwconfig | grep" in the series of if/elif.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
| |
TODO: Someone fluent with sed needs to review this...
|
| |
|
|
If other files are needed, they can be added later
|