[source] fstools: snapshot: handle jffs2 conversion using upgraded
LEDE Commits
lede-commits at lists.infradead.org
Mon May 29 14:57:05 PDT 2017
neoraider pushed a commit to source.git, branch master:
https://git.lede-project.org/218af1957ecd8dd9732a74b2f263fe87ff318d4e
commit 218af1957ecd8dd9732a74b2f263fe87ff318d4e
Author: Matthias Schiffer <mschiffer at universe-factory.net>
AuthorDate: Wed May 3 08:29:55 2017 +0200
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 at universe-factory.net>
---
package/system/fstools/Makefile | 2 +-
package/system/fstools/files/snapshot | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 1cdf6cd..dc01267 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fstools
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/fstools.git
diff --git a/package/system/fstools/files/snapshot b/package/system/fstools/files/snapshot
index baf24f1..a495e34 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)" ] && {
More information about the lede-commits
mailing list