28 lines
541 B
Bash
Executable File
28 lines
541 B
Bash
Executable File
#!/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
|