mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
launcher: fix creation of snap2
When snap1 doesn't exist, `lxc-snapshot` will create a snapshot named `snap1` (instead of `snap2`). In this case we need to rename snap1 into snap2. However the condition check is wrong: after creating the snapshot, `snap1` will *always* exist – even if it didn't before. Thus the renaming never happens. Fix the issue by detecting the absence of snap2 (rather than snap1).
This commit is contained in:
parent
a3453177f0
commit
c920e3d5f3
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ create_temp_backup () {
|
|||
|
||||
# lxc always creates the first snapshot it can creates.
|
||||
# So if snap1 doesn't exist and you try to create snap2, it will be named snap1.
|
||||
if [ "$snap_number" == "2" ] && [ ! -e "$snapshot_path/snap1" ]
|
||||
if [ "$snap_number" == "2" ] && [ ! -e "$snapshot_path/snap2" ]
|
||||
then
|
||||
# Rename snap1 to snap2
|
||||
sudo mv "$snapshot_path/snap1" "$snapshot_path/snap2"
|
||||
|
|
Loading…
Add table
Reference in a new issue