aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap/base-files/lib/preinit/79_move_config
diff options
context:
space:
mode:
authorLucian Cristian <lucian.cristian@gmail.com>2018-07-19 09:55:19 +0300
committerJohn Crispin <john@phrozen.org>2018-07-30 11:03:02 +0200
commit6a095e858718e91a56dc69f21b5ecb76237e7c28 (patch)
tree5c75d65cfcb907be71107ff2aada4dc84e1df7fe /target/linux/omap/base-files/lib/preinit/79_move_config
parent40f66f1431b1a6638f05b75952d7b5a94e385e8d (diff)
downloadupstream-6a095e858718e91a56dc69f21b5ecb76237e7c28.tar.gz
upstream-6a095e858718e91a56dc69f21b5ecb76237e7c28.tar.bz2
upstream-6a095e858718e91a56dc69f21b5ecb76237e7c28.zip
omap: add sysupgrade support
add sysupgrade missing script files Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
Diffstat (limited to 'target/linux/omap/base-files/lib/preinit/79_move_config')
-rw-r--r--target/linux/omap/base-files/lib/preinit/79_move_config20
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/omap/base-files/lib/preinit/79_move_config b/target/linux/omap/base-files/lib/preinit/79_move_config
new file mode 100644
index 0000000000..c112588689
--- /dev/null
+++ b/target/linux/omap/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
+