From 749fd0b122972a1484bee0015f4b449bdbda463c Mon Sep 17 00:00:00 2001 From: "pulsar89.5" Date: Sun, 10 Sep 2023 15:38:24 +0200 Subject: [PATCH] [EVO] Mettre le nom du conteneur en premier --- balance-containers/run.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/balance-containers/run.bash b/balance-containers/run.bash index 319307a..c645924 100755 --- a/balance-containers/run.bash +++ b/balance-containers/run.bash @@ -65,16 +65,16 @@ migrate_ct() { # Boucler sur les arguments case "${1}" in --list) - lxc list --columns Ln --format csv | tee $containersList + lxc list --columns nL --format csv | tee $containersList ;; --balance) while read line; do # Découper les informations - target=$(echo $line | awk -F',' '{print $1}') - ct=$(echo $line | awk -F',' '{print $2}') + ct=$(echo $line | awk -F',' '{print $1}') + target=$(echo $line | awk -F',' '{print $2}') # Récupérer l'hôte courrant - host=$(lxc list --columns Ln --format csv $ct 2> /dev/null | grep $target) + host=$(lxc list --columns nL --format csv $ct 2> /dev/null | grep $target) # Traiter le conteneur s'il n'est pas sur l'hôte cible if [[ -z "${host}" ]]; then