diff options
| author | Yousong Zhou <yszhou4tech@gmail.com> | 2017-01-04 22:19:29 +0800 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2017-01-05 11:09:15 +0100 |
| commit | 5ece16fd237688f8f8d33cd4bbc5137733365215 (patch) | |
| tree | acb0035b9927bd8c3840db9776b11f942a7d750a /target/linux/sunxi/base-files/lib/preinit | |
| parent | 8a2c56ca0326f944260f55fd03cafc34572dcba8 (diff) | |
| download | mtk-20170518-5ece16fd237688f8f8d33cd4bbc5137733365215.zip mtk-20170518-5ece16fd237688f8f8d33cd4bbc5137733365215.tar.gz mtk-20170518-5ece16fd237688f8f8d33cd4bbc5137733365215.tar.bz2 | |
sunxi: add sysupgrade support
Enalbe builtin support for FAT filesystem as we need to mount boot
partition to store sysupgrade.tgz there
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'target/linux/sunxi/base-files/lib/preinit')
| -rw-r--r-- | target/linux/sunxi/base-files/lib/preinit/79_move_config | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/sunxi/base-files/lib/preinit/79_move_config b/target/linux/sunxi/base-files/lib/preinit/79_move_config new file mode 100644 index 0000000..c112588 --- /dev/null +++ b/target/linux/sunxi/base-files/lib/preinit/79_move_config @@ -0,0 +1,20 @@ +#!/bin/sh +# Copyright (C) 2012-2015 OpenWrt.org + +move_config() { + local partdev + + . /lib/upgrade/common.sh + + if export_bootdevice && export_partdevice partdev -1; then + if mount -t vfat -o rw,noatime "/dev/$partdev" /mnt; then + if [ -f /mnt/sysupgrade.tgz ]; then + mv -f /mnt/sysupgrade.tgz / + fi + umount /mnt + fi + fi +} + +boot_hook_add preinit_mount_root move_config + |
