FDS/OS 1.0

This commit is contained in:
2026-09-21 22:29:23 +08:00
commit 99bc3d15c5
430 changed files with 34876 additions and 0 deletions
+17
View File
@@ -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.