This commit is contained in:
2024-12-15 03:37:41 +01:00
parent 7f3aec18c3
commit ccf2f6a181

View File

@@ -181,9 +181,20 @@ show_menu() {
# Boucle principale # Boucle principale
while true; do while true; do
show_menu show_menu
echo -n "Choisissez une option : "
read -r choice read -r choice
echo "DEBUG: Vous avez saisi : $choice" # Ligne ajoutée pour debug
case $choice in # Vérifier si la saisie est vide
if [ -z "$choice" ]; then
echo "[ERROR] Aucune saisie détectée. Veuillez entrer un chiffre."
continue
fi
# Debug pour voir ce qui a été saisi
echo "DEBUG: Vous avez saisi : '$choice'"
# Gérer les choix
case "$choice" in
1) update_and_clean_system ;; 1) update_and_clean_system ;;
2) install_nfs_server ;; 2) install_nfs_server ;;
3) install_nfs_client ;; 3) install_nfs_client ;;
@@ -193,6 +204,7 @@ while true; do
7) configure_network ;; 7) configure_network ;;
8) install_usual_tools ;; 8) install_usual_tools ;;
9) echo -e "${GREEN}Au revoir !${RESET}" ; exit 0 ;; 9) echo -e "${GREEN}Au revoir !${RESET}" ; exit 0 ;;
*) error "Option invalide, veuillez réessayer." ;; *) echo "[ERROR] Option invalide, veuillez réessayer." ;;
esac esac
done done