LibVirtKvm-scripts
LibVirtKvm-scripts copied to clipboard
Consolidation function don't work in spanish language
trafficstars
Please, add "ejecutando" on if statement:
function consolidate_domain() {
local domain_name=$1
local _ret=
local backing_file=
local command_output=
local parent_backing_file=
local dom_state=
dom_state=$($VIRSH domstate "$domain_name" 2>&1)
if **[ "$dom_state" != "running" ] && [ "$dom_state" != "ejecutando" ];** then
print_v e "Error: Consolidation requires '$domain_name' to be running"
return 1
fi
I think this will always return false. Can you try this instead?
if [ "$dom_state" == "running" ] || [ "$dom_state" == "ejecutando" ]; then
print_v d "Debug: '$domain_name' is running (ejecutando)"
else
print_v e "Error: Consolidation requires '$domain_name' to be running"
return 1
fi
I think that the best course of action would be to set the language. For instance:
# Fail if one process fails in a pipe
set -o pipefail
# Set the language for all invoked commands
export LC_ALL="en_US.UTF-8"
@miguelcarretas can you try to do that?