x86: generate EFI platform bootable images
[openwrt/staging/chunkeey.git] / target / linux / x86 / base-files / lib / preinit / 79_move_config
1 #!/bin/sh
2 # Copyright (C) 2012-2015 OpenWrt.org
3
4 move_config() {
5 local partdev parttype=ext4
6
7 . /lib/upgrade/common.sh
8
9 if export_bootdevice && export_partdevice partdev 1; then
10 mkdir -p /boot
11 part_magic_fat "/dev/$partdev" && parttype=vfat
12 mount -t $parttype -o rw,noatime "/dev/$partdev" /boot
13 if [ -f "/boot/$BACKUP_FILE" ]; then
14 mv -f "/boot/$BACKUP_FILE" /
15 fi
16 mount --bind /boot/boot /boot
17 fi
18 }
19
20 boot_hook_add preinit_mount_root move_config