mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Merge pull request #35 from kemenaran/fix-snap2-creation
launcher: fix creation of snap2
This commit is contained in:
commit
1487919656
1 changed files with 2 additions and 2 deletions
|
@ -78,13 +78,13 @@ create_temp_backup () {
|
|||
# Check if the snapshot already exist
|
||||
if [ ! -e "$snapshot_path/snap$snap_number" ]
|
||||
then
|
||||
echo "snap$snap_number doesn't exist, its first creation can be take a little while." >&2
|
||||
echo "snap$snap_number doesn't exist, its first creation can takes a little while." >&2
|
||||
# Create the snapshot.
|
||||
sudo lxc-snapshot --name $lxc_name >> "$test_result" 2>&1
|
||||
|
||||
# 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