base-files/functions.sh: use grep -q instead of []
authorRosen Penev <rosenp@gmail.com>
Fri, 17 Jan 2020 22:36:29 +0000 (14:36 -0800)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 17 Jan 2020 23:24:06 +0000 (00:24 +0100)
commit8df14c229c02a3b9329afc6e3ebf4f8aec5b59ed
tree1575b44a4ec6002d6eae3015c61dd8d6f3559b98
parent26105974e7f9758cd4bc443ce0322983f818acd5
base-files/functions.sh: use grep -q instead of []

It's cleaner and faster as it does not need to do extra work.

Also removed $() to avoid executing the output. The shell can handle it.

https://github.com/koalaman/shellcheck/wiki/SC2143

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[correct || to && for one conversion]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
package/base-files/files/lib/functions.sh