Initial Commit
- initial default booting image
This commit is contained in:
31
package/openrc/sysv-rcs
Executable file
31
package/openrc/sysv-rcs
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
}
|
||||
Reference in New Issue
Block a user