omap: add sysupgrade support

add sysupgrade missing script files

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
This commit is contained in:
Lucian Cristian
2018-07-19 09:55:19 +03:00
committed by John Crispin
parent 40f66f1431
commit 6a095e8587
2 changed files with 109 additions and 0 deletions

View File

@@ -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