This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
gluon-firmware/package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S15gluon-setup-mode

20 lines
529 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=15
boot() {
local enabled="$(uci -q get 'gluon-setup-mode.@setup_mode[0].enabled')"
local configured="$(uci -q get 'gluon-setup-mode.@setup_mode[0].configured')"
uci set 'gluon-setup-mode.@setup_mode[0].enabled=0'
uci commit gluon-setup-mode
if [ "$enabled" != 1 -a "$configured" = 1 ]; then
# This can happen after an upgrade from a version before the config file was called gluon-setup-mode
# We'll just reboot to return to the normal mode...
/etc/init.d/done boot
reboot
fi
}