[EVO] Gérer les machines redondées (finissant par une lettre)
This commit is contained in:
parent
8283e434ed
commit
27dfb6f12d
@ -24,9 +24,16 @@ show_usage() {
|
||||
}
|
||||
|
||||
move_ct() {
|
||||
echo -n " move: "
|
||||
lxc move --target $target $ct 2> /dev/null
|
||||
[[ $? -eq 0 ]] && echo "success" || echo "failed"
|
||||
# SI la machine est redondée (nom finissant par un charactère)
|
||||
if [[ "$(lxc list --columns Ln --format csv $ct | awk '/[0-9][a-z]$/')" == "${ct}" ]]; then
|
||||
echo " move: skipped"
|
||||
else
|
||||
echo " move: pending"
|
||||
lxc move --target $target $ct 2> /dev/null
|
||||
lxc_move_result=$?
|
||||
echo -n " move: "
|
||||
[[ $? -eq 0 ]] && echo "success" || echo "failed"
|
||||
fi
|
||||
}
|
||||
|
||||
migrate_ct() {
|
||||
|
Loading…
Reference in New Issue
Block a user