mirror of
				https://github.com/Ysurac/openmptcprouter.git
				synced 2025-03-09 15:40:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			558 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			558 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/sh
 | 
						|
# Copyright (C) 2006 OpenWrt.org
 | 
						|
# Copyright (C) 2010 Vertical Communications
 | 
						|
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
 | 
						|
 | 
						|
do_mount_root() {
 | 
						|
	mount_root
 | 
						|
	boot_run_hook preinit_mount_root
 | 
						|
	[ -e /dev/sda1 ] && mount /dev/sda1 /boot >/dev/null 2>&1
 | 
						|
	[ -f /boot/sysupgrade.tgz ] && {
 | 
						|
		mv /boot/sysupgrade.tgz /
 | 
						|
	}
 | 
						|
	[ -e /dev/sda1 ] && umount /boot >/dev/null 2>&1
 | 
						|
	[ -f /sysupgrade.tgz ] && {
 | 
						|
		echo "- config restore -"
 | 
						|
		cd /
 | 
						|
		tar xzf sysupgrade.tgz
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main do_mount_root
 |