2012-06-19 22:36:53 +00:00
|
|
|
#!/bin/sh
|
2015-03-24 10:08:12 +00:00
|
|
|
# Copyright (C) 2012-2015 OpenWrt.org
|
2012-06-19 22:36:53 +00:00
|
|
|
|
|
|
|
move_config() {
|
2016-05-24 10:07:02 +00:00
|
|
|
local partdev
|
|
|
|
|
2015-03-24 10:08:12 +00:00
|
|
|
. /lib/upgrade/platform.sh
|
2012-06-19 22:36:53 +00:00
|
|
|
|
2016-05-24 10:07:02 +00:00
|
|
|
if platform_export_bootdevice && platform_export_partdevice partdev 1; then
|
2016-12-31 17:06:29 +00:00
|
|
|
if mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt; then
|
|
|
|
if [ -f /mnt/sysupgrade.tgz ]; then
|
|
|
|
mv -f /mnt/sysupgrade.tgz /
|
|
|
|
fi
|
|
|
|
umount /mnt
|
|
|
|
fi
|
2015-03-24 10:08:12 +00:00
|
|
|
fi
|
2012-06-19 22:36:53 +00:00
|
|
|
}
|
|
|
|
|
2014-03-21 15:55:07 +00:00
|
|
|
boot_hook_add preinit_mount_root move_config
|
2012-06-19 22:36:53 +00:00
|
|
|
|