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