mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-10-30 13:34:27 -04:00 
			
		
		
		
	This makes interrupted boots after sysupgrade more reliable Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44941
		
			
				
	
	
		
			16 lines
		
	
	
		
			316 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			316 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| # Copyright (C) 2006 OpenWrt.org
 | |
| # Copyright (C) 2010 Vertical Communications
 | |
| 
 | |
| do_mount_root() {
 | |
| 	mount_root
 | |
| 	boot_run_hook preinit_mount_root
 | |
| 	[ -f /sysupgrade.tgz ] && {
 | |
| 		echo "- config restore -"
 | |
| 		cd /
 | |
| 		tar xzf /sysupgrade.tgz
 | |
| 	}
 | |
| }
 | |
| 
 | |
| [ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root
 |