bdf397c4fc076e855d306e13a23759ff40c64bd6
[openwrt/openwrt.git] / target / linux / imx6 / base-files / lib / preinit / 79_move_config
1 #!/bin/sh
2
3 . /lib/imx6.sh
4 . /lib/functions.sh
5 . /lib/upgrade/common.sh
6
7 move_config() {
8 local board=$(board_name)
9
10 case "$board" in
11 apalis*)
12 if [ -b $(bootpart_from_uuid) ]; then
13 apalis_mount_boot
14 [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
15 umount /boot
16 fi
17 ;;
18 esac
19 }
20
21 boot_hook_add preinit_mount_root move_config