forked from ungleich-public/cdist
[explorer/init] Make shellcheck happy
This commit is contained in:
parent
0d84c91b40
commit
0d6bc8e8f8
1 changed files with 4 additions and 3 deletions
|
@ -310,7 +310,7 @@ guess_by_path() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
/sbin/procd)
|
/sbin/procd)
|
||||||
check_procd && return
|
check_procd "$1" && return
|
||||||
;;
|
;;
|
||||||
/sbin/init|*/init)
|
/sbin/init|*/init)
|
||||||
# init: it could be anything -> (explicit) no match
|
# init: it could be anything -> (explicit) no match
|
||||||
|
@ -356,7 +356,7 @@ guess_by_comm_name() {
|
||||||
|
|
||||||
check_list() (
|
check_list() (
|
||||||
# List must be a multi-line input on stdin (one name per line)
|
# List must be a multi-line input on stdin (one name per line)
|
||||||
while read init
|
while read -r init
|
||||||
do
|
do
|
||||||
"check_${init}" || continue
|
"check_${init}" || continue
|
||||||
return 0
|
return 0
|
||||||
|
@ -408,7 +408,7 @@ find_init() {
|
||||||
OpenBSD)
|
OpenBSD)
|
||||||
find_init_pgrep || find_init_ps
|
find_init_pgrep || find_init_ps
|
||||||
;;
|
;;
|
||||||
Darwin|FreeBSD|SunOS)
|
Darwin|SunOS)
|
||||||
find_init_ps
|
find_init_ps
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -424,6 +424,7 @@ init=$(find_init)
|
||||||
|
|
||||||
# If we got a path, guess by the path first (fall back to file name if no match)
|
# If we got a path, guess by the path first (fall back to file name if no match)
|
||||||
# else guess by file name directly.
|
# else guess by file name directly.
|
||||||
|
# shellcheck disable=SC2015
|
||||||
{
|
{
|
||||||
test -x "${init}" \
|
test -x "${init}" \
|
||||||
&& guess_by_path "${init}" \
|
&& guess_by_path "${init}" \
|
||||||
|
|
Loading…
Reference in a new issue