Keep a message to tell about creating/loading snapshots

This commit is contained in:
Alexandre Aubin 2020-12-19 01:23:46 +01:00
parent 2da7359840
commit c7a2448e74
2 changed files with 2 additions and 3 deletions

View file

@ -40,7 +40,7 @@ CREATE_LXC_SNAPSHOT () {
# Check if the snapshot already exist # Check if the snapshot already exist
if ! LXC_SNAPSHOT_EXISTS "$snapname" if ! LXC_SNAPSHOT_EXISTS "$snapname"
then then
log_debug "Creating snapshot $snapname ..." log_info "(Creating snapshot $snapname ...)"
lxc snapshot $LXC_NAME $snapname lxc snapshot $LXC_NAME $snapname
fi fi

View file

@ -83,11 +83,10 @@ _LOAD_SNAPSHOT_OR_INSTALL_APP () {
log_warning "Expected to find an existing snapshot $snapname but it doesn't exist yet .. will attempt to create it" log_warning "Expected to find an existing snapshot $snapname but it doesn't exist yet .. will attempt to create it"
LOAD_LXC_SNAPSHOT snap0 \ LOAD_LXC_SNAPSHOT snap0 \
&&_INSTALL_APP "path=$check_path" \ &&_INSTALL_APP "path=$check_path" \
&& log_debug "(Creating a snapshot for $_install_type installation.)" \
&& CREATE_LXC_SNAPSHOT $snapname && CREATE_LXC_SNAPSHOT $snapname
else else
# Or uses an existing snapshot # Or uses an existing snapshot
log_debug "(Reusing an existing snapshot for $_install_type installation.)" \ log_info "(Reusing an existing snapshot $snapname.)" \
&& LOAD_LXC_SNAPSHOT $snapname && LOAD_LXC_SNAPSHOT $snapname
fi fi
} }