package/initscripts: fix check-package warnings & indent

No functional change. Add package-level .editorconfig so indentation
matches what other init scripts use.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 3a488674b5)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Fiona Klute
2026-04-28 11:50:56 +02:00
committed by Thomas Perale
parent 593c050f4d
commit c5a0a71d7c
4 changed files with 43 additions and 42 deletions

View File

@@ -448,8 +448,6 @@ package/ifupdown/0001-dont-use-dpkg-architecture.patch lib_patch.Upstream
package/igd2-for-linux/S99upnpd Shellcheck lib_sysv.Indent lib_sysv.Variables
package/imx-mkimage/0001-Add-unused-fake-version.patch lib_patch.Upstream
package/inadyn/S70inadyn NotExecutable lib_sysv.Indent
package/initscripts/init.d/rcK Shellcheck lib_shellscript.ConsecutiveEmptyLines lib_shellscript.EmptyLastLine
package/initscripts/init.d/rcS Shellcheck lib_shellscript.ConsecutiveEmptyLines lib_shellscript.EmptyLastLine
package/input-event-daemon/S99input-event-daemon lib_sysv.ConsecutiveEmptyLines lib_sysv.Indent lib_sysv.Variables
package/intel-gmmlib/0001-Drop-hardening-related-flags.patch lib_patch.Upstream
package/intel-mediasdk/0001-Don-t-force-fstack-protector.patch lib_patch.Upstream

View File

@@ -0,0 +1,3 @@
[rc?]
indent_style = tab
indent_size = tab

View File

@@ -1,27 +1,28 @@
#!/bin/sh
#
# Stop all init scripts in /etc/init.d
# executing them in reversed numerical order.
#
for i in $(ls -r /etc/init.d/S??*) ;do
# 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).
[ ! -f "$i" ] && continue
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set stop
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i stop
;;
esac
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set stop
# shellcheck source=/dev/null
. "$i"
)
;;
*)
# No sh extension, so fork subprocess.
"$i" stop
;;
esac
done

View File

@@ -1,27 +1,26 @@
#!/bin/sh
#
# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for i in /etc/init.d/S??* ;do
for i in /etc/init.d/S??*; do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
# shellcheck source=/dev/null
. "$i"
)
;;
*)
# No sh extension, so fork subprocess.
"$i" start
;;
esac
done