aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/fstools/files/snapshot
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2017-05-03 08:29:55 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2017-05-29 23:50:33 +0200
commit218af1957ecd8dd9732a74b2f263fe87ff318d4e (patch)
tree1eec9b58e121663466d4b551ee893ad9f99d73a3 /package/system/fstools/files/snapshot
parent6bbb3a2b0a86263afa33062e619941b193fefb7a (diff)
downloadupstream-218af1957ecd8dd9732a74b2f263fe87ff318d4e.tar.gz
upstream-218af1957ecd8dd9732a74b2f263fe87ff318d4e.tar.bz2
upstream-218af1957ecd8dd9732a74b2f263fe87ff318d4e.zip
fstools: snapshot: handle jffs2 conversion using upgraded
We can reuse the kill_remaining and run_ramfs facilities of the stage2 run by upgraded. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'package/system/fstools/files/snapshot')
-rw-r--r--package/system/fstools/files/snapshot14
1 files changed, 8 insertions, 6 deletions
diff --git a/package/system/fstools/files/snapshot b/package/system/fstools/files/snapshot
index baf24f1e3e..a495e34345 100644
--- a/package/system/fstools/files/snapshot
+++ b/package/system/fstools/files/snapshot
@@ -64,14 +64,16 @@ do_convert_jffs2() {
do_convert() {
. /lib/functions.sh
. /lib/upgrade/common.sh
- ubus call system upgrade
- touch /tmp/sysupgrade
+
cd /overlay/upper
tar czf /tmp/snapshot.tar.gz *
- kill_remaining TERM
- sleep 3
- kill_remaining KILL
- run_ramfs '. /sbin/snapshot; do_convert_jffs2'
+
+ install_bin /sbin/upgraded
+ ubus call system sysupgrade "{
+ \"prefix\": \"$RAM_ROOT\",
+ \"path\": \"\",
+ \"command\": \". /sbin/snapshot; do_convert_jffs2\"
+ }"
}
[ -n "$(cat /proc/mounts|grep /overlay|grep jffs2)" ] && {