From b7ab3f2a18df7ed729739cc49d95e4db7260244a Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Sat, 6 Jun 2026 20:20:32 +0200 Subject: [PATCH] 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 Signed-off-by: Marcus Hoffmann (cherry picked from commit 3e2cc4e46ffd0d3a6a3ffa14bbe0645e7336933f) Signed-off-by: Thomas Perale --- package/openrc/sysv-rcs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/openrc/sysv-rcs b/package/openrc/sysv-rcs index 1564cbe603..1b24cc3e1a 100755 --- a/package/openrc/sysv-rcs +++ b/package/openrc/sysv-rcs @@ -1,5 +1,7 @@ #!/sbin/openrc-run +# shellcheck shell=sh +# shellcheck disable=SC2034 # definition for OpenRC description="start or stop sysv rc[S,K] scripts" depend() { @@ -17,6 +19,8 @@ start() { } 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 # Ignore dangling symlinks (if any). [ -e "$i" ] || continue