diff options
Diffstat (limited to 'target/linux/qoriq/base-files/lib/preinit')
-rw-r--r-- | target/linux/qoriq/base-files/lib/preinit/79_move_config | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/qoriq/base-files/lib/preinit/79_move_config b/target/linux/qoriq/base-files/lib/preinit/79_move_config new file mode 100644 index 0000000000..54dd579660 --- /dev/null +++ b/target/linux/qoriq/base-files/lib/preinit/79_move_config @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +. /lib/functions.sh +. /lib/upgrade/common.sh + +move_config() { + local partdev + + if export_bootdevice && export_partdevice partdev 1; then + mkdir -p /boot + mount -o rw,noatime "/dev/$partdev" /boot + [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / + umount /boot + fi +} + +boot_hook_add preinit_mount_root move_config |