x86: generate EFI platform bootable images
[openwrt/staging/wigyori.git] / target / linux / x86 / base-files / lib / preinit / 79_move_config
index debce43557849689114699930cc6a1e50f4f9d9e..338398c9479dc29ca4b26fa244da9119703fba52 100644 (file)
@@ -2,17 +2,18 @@
 # Copyright (C) 2012-2015 OpenWrt.org
 
 move_config() {
-       local partdev
+       local partdev parttype=ext4
 
        . /lib/upgrade/common.sh
 
        if export_bootdevice && export_partdevice partdev 1; then
                mkdir -p /boot
-               mount -t ext4 -o rw,noatime "/dev/$partdev" /boot
-               mount --bind /boot/boot /boot
-               if [ -f /boot/sysupgrade.tgz ]; then
-                       mv -f /boot/sysupgrade.tgz /
+               part_magic_fat "/dev/$partdev" && parttype=vfat
+               mount -t $parttype -o rw,noatime "/dev/$partdev" /boot
+               if [ -f "/boot/$BACKUP_FILE" ]; then
+                       mv -f "/boot/$BACKUP_FILE" /
                fi
+               mount --bind /boot/boot /boot
        fi
 }