fstools: fix snapshot support
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
0fae7270cf
commit
33de8c77e2
|
@ -24,14 +24,14 @@ do_config_unpack() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_snapshot_push() {
|
do_snapshot_push() {
|
||||||
cd /volatile
|
cd /volatile/upper
|
||||||
tar czf /tmp/snapshot.tar.gz *
|
tar czf /tmp/snapshot.tar.gz *
|
||||||
snapshot_tool write
|
snapshot_tool write
|
||||||
reboot
|
reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
do_config_push() {
|
do_config_push() {
|
||||||
cd /volatile
|
cd /volatile/upper
|
||||||
tar czf /tmp/config.tar.gz *
|
tar czf /tmp/config.tar.gz *
|
||||||
snapshot_tool config_write
|
snapshot_tool config_write
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ do_convert() {
|
||||||
. /lib/upgrade/common.sh
|
. /lib/upgrade/common.sh
|
||||||
ubus call system upgrade
|
ubus call system upgrade
|
||||||
touch /tmp/sysupgrade
|
touch /tmp/sysupgrade
|
||||||
cd /overlay
|
cd /overlay/upper
|
||||||
tar czf /tmp/snapshot.tar.gz *
|
tar czf /tmp/snapshot.tar.gz *
|
||||||
kill_remaining TERM
|
kill_remaining TERM
|
||||||
sleep 3
|
sleep 3
|
||||||
|
@ -82,7 +82,7 @@ convert)
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -d /volatile ] && {
|
[ -d /volatile/upper ] && {
|
||||||
case $1 in
|
case $1 in
|
||||||
push)
|
push)
|
||||||
do_snapshot_push
|
do_snapshot_push
|
||||||
|
|
Loading…
Reference in New Issue