diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2018-09-29 01:09:34 +0200 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2018-09-29 02:09:34 +0300 |
commit | a1b6a7f5328974aaddd7f631135c58e1d620c820 (patch) | |
tree | f834274490755daeddc0b445e9c75d18b71b88e1 /installer | |
parent | 986e32a03b2f01ac09b23d7f1be28a2799d7fd3b (diff) |
[cleanup crusade] Shellcheck (#4261)
* lint libreswan module
* disable linting obsolete shell modules
* shellcheck more shell modules
* fix review; lint helper scripts
* more shellcheck
* fix SC2235 in apache.chart.sh
* shellcheck last portion of charts.d scripts
* final shellcheck; make travis blocking
* fix cppcheck
* fix indents; fix expansion
* fix local var assignments
Diffstat (limited to 'installer')
-rw-r--r-- | installer/functions.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/installer/functions.sh b/installer/functions.sh index bc29d3e92f..6fe9e368c1 100644 --- a/installer/functions.sh +++ b/installer/functions.sh @@ -10,8 +10,8 @@ # checking the availability of commands which_cmd() { - which "${1}" 2>/dev/null || \ - command -v "${1}" 2>/dev/null + # shellcheck disable=SC2230 + which "${1}" 2>/dev/null || command -v "${1}" 2>/dev/null } check_cmd() { @@ -312,6 +312,7 @@ portable_add_user() { echo >&2 "Adding ${username} user account with home ${homedir} ..." + # shellcheck disable=SC2230 local nologin="$(which nologin 2>/dev/null || command -v nologin 2>/dev/null || echo '/bin/false')" # Linux @@ -444,6 +445,7 @@ issystemd() { [ ! -d /lib/systemd/system ] && return 1 # if there is no systemctl command, it is not systemd + # shellcheck disable=SC2230 systemctl=$(which systemctl 2>/dev/null || command -v systemctl 2>/dev/null) [ -z "${systemctl}" -o ! -x "${systemctl}" ] && return 1 |