x86: generate EFI platform bootable images
[openwrt/openwrt.git] / target / linux / x86 / base-files / lib / preinit / 79_move_config
index 702da9e873d5a47cec80352fea5a719c2ffbcbc5..338398c9479dc29ca4b26fa244da9119703fba52 100644 (file)
@@ -2,13 +2,14 @@
 # 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
+               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