#!/bin/sh /etc/rc.common

START=96

start() {
	local custom_led

	/etc/init.d/led start

	. /etc/diag.sh

	get_status_led 2> /dev/null

	if [ -z "$status_led" ]; then
		status_led="$running"
	fi

	if [ -z "$status_led" ]; then
		status_led="$boot"
	fi

	custom_led="$(lua -e 'print(require("gluon.setup-mode").get_status_led() or "")')"
	if [ -z "$status_led" ]; then
		status_led="$custom_led"
	fi

	status_led_set_timer 1000 300
}
