FDS/OS 1.0
This commit is contained in:
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Stage 2 is a child of native s6-svscan, never PID 1.
|
||||
set -euo pipefail
|
||||
/usr/bin/fds-boottrace adopt || printf 'Boot trace could not be initialized\n' >&2
|
||||
s6-rc-init -c /etc/s6-rc/compiled -l /run/s6-rc /run/service
|
||||
exec /etc/s6-linux-init/current/scripts/runlevel "${1:-default}"
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
# A native shutdown is irrevocable once started. Keep this hook alive on failure
|
||||
# instead of letting a nonzero script exit trigger final process killing.
|
||||
if ! /usr/bin/fds-power --shutdown-hook; then
|
||||
printf 'FDS shutdown helper failed; remaining powered on for recovery.\n' >&2
|
||||
exec /usr/bin/fds-power --hold-shutdown
|
||||
fi
|
||||
failed=()
|
||||
if [[ -d /run/s6-rc ]]; then
|
||||
if ! s6-rc -b -l /run/s6-rc -t 15000 -d -a change; then
|
||||
printf 'FDS service stop failed after verified DATA unmount; native cleanup will terminate remaining processes.\n' >&2
|
||||
failed=(failed)
|
||||
fi
|
||||
fi
|
||||
/usr/bin/fds-power --record-final "${failed[@]}"
|
||||
# s6-linux-init-shutdownd handles the final process cleanup, sync and unmount.
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/execlineb -P
|
||||
/usr/bin/true
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
case ${1:-default} in
|
||||
default|boot|2|3|4|5) exec s6-rc -l /run/s6-rc -t 15000 -u change boot ;;
|
||||
*) printf 'Unsupported FDS runlevel: %s\n' "$1" >&2; exit 100 ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user