mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
* 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>
32 lines
698 B
Plaintext
Executable File
32 lines
698 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
# shellcheck shell=sh
|
|
|
|
# shellcheck disable=SC2034 # definition for OpenRC
|
|
description="start or stop sysv rc[S,K] scripts"
|
|
|
|
depend() {
|
|
after local
|
|
}
|
|
|
|
start() {
|
|
for i in /etc/init.d/S??*; do
|
|
# Ignore dangling symlinks (if any).
|
|
[ -e "$i" ] || continue
|
|
einfo "Starting $i"
|
|
$i start > /dev/null
|
|
eend $?
|
|
done
|
|
}
|
|
|
|
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
|
|
einfo "Stopping $i"
|
|
$i stop > /dev/null
|
|
eend $?
|
|
done
|
|
}
|