summaryrefslogtreecommitdiffstats
path: root/manpages
diff options
context:
space:
mode:
authorJakub Jankowski <shasta@toxcorp.com>2018-01-08 03:30:41 +0100
committerRobby Workman <rworkman@slackware.com>2018-05-24 01:23:40 -0500
commit63fcb919b0cdefae3ae7cd7f933c70169c454710 (patch)
tree3b88c0cbfcaf003974017c4a5bb7092d1a5b6f2f /manpages
parent8e3bacf5fe7afc125d57807858d562e05927a714 (diff)
downloadslacknetsetup-63fcb919b0cdefae3ae7cd7f933c70169c454710.tar.xz
is_wireless_device: fix UUoC and reorder
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>
Diffstat (limited to 'manpages')
0 files changed, 0 insertions, 0 deletions