90_setup_mode 343 B

12345678910111213
  1. #!/bin/sh
  2. setup_mode_enable() {
  3. local enabled="$(uci -q get 'gluon-setup-mode.@setup_mode[0].enabled')"
  4. local configured="$(uci -q get 'gluon-setup-mode.@setup_mode[0].configured')"
  5. if [ "$enabled" = 1 -o "$configured" != 1 ]; then
  6. echo '/lib/gluon/setup-mode/rc.d' > /tmp/rc_d_path
  7. fi
  8. }
  9. boot_hook_add preinit_main setup_mode_enable