d691fa99f1b7b1bc0dc46db8705a27de3e98fb01
[openwrt/staging/pepe2k.git] / target / linux / layerscape / base-files / lib / preinit / 79_move_config
1 . /lib/functions.sh
2 . /lib/upgrade/common.sh
3
4 BOOTPART=/dev/mmcblk0p1
5
6 move_config() {
7 local board=$(board_name)
8
9 case "$board" in
10 fsl,ls1012a-frwy-sdboot | \
11 fsl,ls1021a-iot-sdboot | \
12 fsl,ls1021a-twr-sdboot | \
13 fsl,ls1043a-rdb-sdboot | \
14 fsl,ls1046a-rdb-sdboot | \
15 fsl,ls1088a-rdb-sdboot)
16 if [ -b $BOOTPART ]; then
17 mkdir -p /boot
18 mount -t ext4 -o rw,noatime $BOOTPART /boot 2>&1
19 [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
20 umount /boot
21 fi
22 ;;
23 esac
24 }
25
26 boot_hook_add preinit_mount_root move_config