1#!/bin/sh
2# Copyright (C) 2015 OpenWrt.org
3
4move_config() {
5	. /lib/socfpga.sh
6	. /lib/upgrade/sockit.sh
7
8	local board=$(socfpga_board_name)
9
10	# Restore configuration
11	if [ "${board}" = "socfpga-sockit" ] ; then
12		mount -o rw,noatime "$CFGPART" /mnt
13		[ -e "/mnt/sysupgrade.tgz" ] && mv -f /mnt/sysupgrade.tgz /
14		umount /mnt
15	fi
16}
17
18boot_hook_add preinit_mount_root move_config
19