Since switching to Barrier Breaker/procd, we'd not notice if we were upgrading from a version before renaming the config file to gluon-setup-mode as the upgrade scripts run after the preinit. Fix this by checking later during setup mode init again and rebooting into the regular run mode if we detect this case.
		
			
				
	
	
		
			14 lines
		
	
	
		
			343 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			343 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| 
 | |
| setup_mode_enable() {
 | |
| 	local enabled="$(uci -q get 'gluon-setup-mode.@setup_mode[0].enabled')"
 | |
| 	local configured="$(uci -q get 'gluon-setup-mode.@setup_mode[0].configured')"
 | |
| 
 | |
| 	if [ "$enabled" = 1 -o "$configured" != 1 ]; then
 | |
| 		echo '/lib/gluon/setup-mode/rc.d' > /tmp/rc_d_path
 | |
| 	fi
 | |
| }
 | |
| 
 | |
| boot_hook_add preinit_main setup_mode_enable
 |