summaryrefslogtreecommitdiffstats
path: root/target/linux/socfpga/base-files/lib/preinit/79_move_config
blob: 89f62d52f1016d1e16af66ffe0a924806638a390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org

move_config() {
	. /lib/socfpga.sh
	. /lib/upgrade/sockit.sh

	local board=$(socfpga_board_name)

	# Restore configuration
	if [ "${board}" = "socfpga-sockit" ] ; then
		mount -o rw,noatime "$CFGPART" /mnt
		[ -e "/mnt/sysupgrade.tgz" ] && mv -f /mnt/sysupgrade.tgz /
		umount /mnt
	fi
}

boot_hook_add preinit_mount_root move_config