S15gluon-setup-mode 529 B

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