X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=target%2Flinux%2Fsocfpga%2Fbase-files%2Flib%2Fpreinit%2F79_move_config;fp=target%2Flinux%2Fsocfpga%2Fbase-files%2Flib%2Fpreinit%2F79_move_config;h=89f62d52f1016d1e16af66ffe0a924806638a390;hp=0000000000000000000000000000000000000000;hb=309626effc2a54d00183e8bc300a0156e09a5461;hpb=3d16f00acf6dd268186c06787e0f6a08e9273a85 diff --git a/target/linux/socfpga/base-files/lib/preinit/79_move_config b/target/linux/socfpga/base-files/lib/preinit/79_move_config new file mode 100644 index 0000000000..89f62d52f1 --- /dev/null +++ b/target/linux/socfpga/base-files/lib/preinit/79_move_config @@ -0,0 +1,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