bug(ansible/sbin/update_images) better problem detection

This commit is contained in:
egarette@silique.fr 2023-07-28 08:44:54 +02:00
parent cebb8f970b
commit daf4833691

View file

@ -23,7 +23,7 @@ ls /var/lib/risotto/images_files/ | while read image; do
if [ -d /var/lib/risotto/images_files/"$image" ]; then
echo
echo "Install image $image" | tee -a /var/log/risotto/update_images.log
/usr/local/sbin/build_image "$image" | tee -a /var/log/risotto/update_images.log || (echo "PROBLEME" | tee -a /var/log/risotto/update_images.log; true)
/usr/local/sbin/build_image "$image" || echo "PROBLEME" | tee -a /var/log/risotto/update_images.log
fi
done
@ -61,7 +61,7 @@ for nspawn in $(ls /etc/systemd/nspawn/*.nspawn); do
sleep 1
done
fi
if [ ! -d "$MACHINE_MACHINES_DIR" ]; then
if [ ! -d "$MACHINE_MACHINES_DIR/etc" ]; then
rm -f "$VERSION_MACHINE"
fi
diff -q "$RISOTTO_IMAGE_DIR/$IMAGE_NAME_RISOTTO_IMAGE_NAME".version "$VERSION_MACHINE" &> /dev/null || (