mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
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:
committed by
Thomas Perale
parent
593c050f4d
commit
c5a0a71d7c
@@ -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/igd2-for-linux/S99upnpd Shellcheck lib_sysv.Indent lib_sysv.Variables
|
||||||
package/imx-mkimage/0001-Add-unused-fake-version.patch lib_patch.Upstream
|
package/imx-mkimage/0001-Add-unused-fake-version.patch lib_patch.Upstream
|
||||||
package/inadyn/S70inadyn NotExecutable lib_sysv.Indent
|
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/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-gmmlib/0001-Drop-hardening-related-flags.patch lib_patch.Upstream
|
||||||
package/intel-mediasdk/0001-Don-t-force-fstack-protector.patch lib_patch.Upstream
|
package/intel-mediasdk/0001-Don-t-force-fstack-protector.patch lib_patch.Upstream
|
||||||
|
|||||||
3
package/initscripts/.editorconfig
Normal file
3
package/initscripts/.editorconfig
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[rc?]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = tab
|
||||||
@@ -1,27 +1,28 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
|
||||||
# Stop all init scripts in /etc/init.d
|
# Stop all init scripts in /etc/init.d
|
||||||
# executing them in reversed numerical order.
|
# 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).
|
# Ignore dangling symlinks (if any).
|
||||||
[ ! -f "$i" ] && continue
|
[ ! -f "$i" ] && continue
|
||||||
|
|
||||||
case "$i" in
|
case "$i" in
|
||||||
*.sh)
|
*.sh)
|
||||||
# Source shell script for speed.
|
# Source shell script for speed.
|
||||||
(
|
(
|
||||||
trap - INT QUIT TSTP
|
trap - INT QUIT TSTP
|
||||||
set stop
|
set stop
|
||||||
. $i
|
# shellcheck source=/dev/null
|
||||||
)
|
. "$i"
|
||||||
;;
|
)
|
||||||
*)
|
;;
|
||||||
# No sh extension, so fork subprocess.
|
*)
|
||||||
$i stop
|
# No sh extension, so fork subprocess.
|
||||||
;;
|
"$i" stop
|
||||||
esac
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
|
||||||
# Start all init scripts in /etc/init.d
|
# Start all init scripts in /etc/init.d
|
||||||
# executing them in numerical order.
|
# 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).
|
# Ignore dangling symlinks (if any).
|
||||||
[ ! -f "$i" ] && continue
|
[ ! -f "$i" ] && continue
|
||||||
|
|
||||||
case "$i" in
|
case "$i" in
|
||||||
*.sh)
|
*.sh)
|
||||||
# Source shell script for speed.
|
# Source shell script for speed.
|
||||||
(
|
(
|
||||||
trap - INT QUIT TSTP
|
trap - INT QUIT TSTP
|
||||||
set start
|
set start
|
||||||
. $i
|
# shellcheck source=/dev/null
|
||||||
)
|
. "$i"
|
||||||
;;
|
)
|
||||||
*)
|
;;
|
||||||
# No sh extension, so fork subprocess.
|
*)
|
||||||
$i start
|
# No sh extension, so fork subprocess.
|
||||||
;;
|
"$i" start
|
||||||
esac
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user