configure.sh: allow root and non-root execution

- install.sh: pre-create ks.cfg with o+w after permission setup so
  non-root users can overwrite it (OEMDRV root itself stays o=rX)
- install.sh: restore su drop to $SUDO_USER when it is set and not
  root; fall back to direct root execution otherwise
- configure.sh: remove the hard root check so both cases work
- configure.md: update docs to reflect root/non-root support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel unbrot Pätzold
2026-05-03 13:43:09 +02:00
parent 9264ca8e92
commit 94e857f340
3 changed files with 9 additions and 10 deletions
-5
View File
@@ -8,11 +8,6 @@ SCRIPTDIR="$(cd "$(dirname "$0")" && pwd)"
CONF_DIST="${SCRIPTDIR}/config.dist/setup_system.conf.dist"
CONF_FILE="${SCRIPTDIR}/../config.d/configure.conf"
if [[ "$EUID" -eq 0 ]]; then
echo "ERROR: This script must not be run as root." >&2
exit 1
fi
# Prompt for a single value; returns the old value unchanged if the user presses Enter.
prompt_value() {
local name="$1" current="$2" new_val