qoriq: add support for WatchGuard Firebox M300
[openwrt/staging/jow.git] / target / linux / qoriq / base-files / lib / preinit / 79_move_config
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 . /lib/functions.sh
4 . /lib/upgrade/common.sh
5
6 move_config() {
7 local partdev
8
9 if export_bootdevice && export_partdevice partdev 1; then
10 mkdir -p /boot
11 mount -o rw,noatime "/dev/$partdev" /boot
12 [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
13 umount /boot
14 fi
15 }
16
17 boot_hook_add preinit_mount_root move_config