Files
2026-09-22 13:23:34 +08:00

18 lines
922 B
Bash
Executable File

#!/bin/bash
# Local single-user console. Drop root before reading any user shell startup files.
set -euo pipefail
if [[ $(cat /usr/share/fds/image-profile) == recovery ]]; then
# Explicit recovery image only; never read shell startup files from DATA.
install -d -m 0700 /run/fds/recovery-home
cd /run/fds/recovery-home
printf '\nFDS RECOVERY — LOCAL MAINTENANCE CONSOLE\nDATA stays read-only until explicitly selected.\nUse fds recovery help for inspection and repair commands.\n'
exec /usr/bin/env -i HOME=/run/fds/recovery-home USER=root LOGNAME=root \
SHELL=/bin/bash PATH=/usr/bin:/bin:/run/fds/bin LANG=en_US.UTF-8 TERM="${TERM:-linux}" \
/bin/bash --login
fi
cd /home/fds
exec /usr/bin/s6-setuidgid fds /usr/bin/env -i \
HOME=/home/fds USER=fds LOGNAME=fds SHELL=/bin/bash \
PATH=/usr/bin:/bin:/run/fds/bin LANG=en_US.UTF-8 TERM="${TERM:-linux}" \
/bin/bash --login