summaryrefslogtreecommitdiff
path: root/package/base-files/files/lib/preinit/80_mount_root
blob: f3fe788e198729613d97f0f6179b78663db333f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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