Add no-GUI boot mode and quieter boot diagnostics
This commit is contained in:
27
iso/overlay/usr/local/bin/bee-gui-gate
Executable file
27
iso/overlay/usr/local/bin/bee-gui-gate
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# bee-gui-gate — skip starting the local GUI when bee.gui=off is set.
|
||||
|
||||
set -eu
|
||||
|
||||
cmdline_param() {
|
||||
key="$1"
|
||||
for token in $(cat /proc/cmdline 2>/dev/null); do
|
||||
case "$token" in
|
||||
"$key"=*)
|
||||
echo "${token#*=}"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
mode="$(cmdline_param bee.gui || true)"
|
||||
case "${mode}" in
|
||||
off|false|0|tty|console|text|nogui)
|
||||
echo "bee-gui-gate: bee.gui=${mode}; skipping lightdm"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user