mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
package/openrc/sysv-rcs: fix shellcheck 0.10 warnings
* Explicitly set shell type. Shellcheck doesn't know OpenRC, but the script as such is POSIX shell. * Override warnings not applicable in context. Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
This commit is contained in:
committed by
Marcus Hoffmann
parent
b4884a2937
commit
3e2cc4e46f
@@ -1,5 +1,7 @@
|
|||||||
#!/sbin/openrc-run
|
#!/sbin/openrc-run
|
||||||
|
# shellcheck shell=sh
|
||||||
|
|
||||||
|
# shellcheck disable=SC2034 # definition for OpenRC
|
||||||
description="start or stop sysv rc[S,K] scripts"
|
description="start or stop sysv rc[S,K] scripts"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
@@ -17,6 +19,8 @@ start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
# we need to reverse the order here, sort -r would be no less fragile
|
||||||
|
# shellcheck disable=SC2045
|
||||||
for i in $(ls -r /etc/init.d/S??*); do
|
for i in $(ls -r /etc/init.d/S??*); do
|
||||||
# Ignore dangling symlinks (if any).
|
# Ignore dangling symlinks (if any).
|
||||||
[ -e "$i" ] || continue
|
[ -e "$i" ] || continue
|
||||||
|
|||||||
Reference in New Issue
Block a user