autodetect SXMO_DISABLE_LEDS
The new sxmo_status_led program can tell us if it finds a suitable led on the system. We can use this to set the SXMO_DISABLE_LEDS env variable. Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This commit is contained in:

committed by
Willow Barraco

parent
ec78d3b95b
commit
86dbca1502
@@ -25,6 +25,12 @@ finish() {
|
||||
exit
|
||||
}
|
||||
|
||||
shared_envvars() {
|
||||
if ! sxmo_status_led check; then
|
||||
export SXMO_DISABLE_LEDS="1"
|
||||
fi
|
||||
}
|
||||
|
||||
init() {
|
||||
# shellcheck source=/dev/null
|
||||
. /etc/profile.d/sxmo_init.sh
|
||||
@@ -32,6 +38,7 @@ init() {
|
||||
_sxmo_load_environments
|
||||
_sxmo_prepare_dirs
|
||||
envvars
|
||||
shared_envvars
|
||||
sxmo_migrate.sh sync
|
||||
|
||||
defaults
|
||||
|
Reference in New Issue
Block a user