90_setup_mode 430 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. check_enable() {
  3. local enabled
  4. local configured
  5. config_get enabled "$1" enabled
  6. config_get configured "$1" configured
  7. if [ "$enabled" = 1 -o "$configured" != 1 ]; then
  8. echo '/lib/gluon/setup-mode/rc.d' > /tmp/rc_d_path
  9. fi
  10. }
  11. setup_mode_enable() {
  12. config_load gluon-setup-mode
  13. config_foreach check_enable setup_mode
  14. }
  15. boot_hook_add preinit_main setup_mode_enable