aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap/base-files/lib/preinit/79_move_config
diff options
context:
space:
mode:
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
+