79_move_config 378 B

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