diff --git a/.config/files_local-bin b/.config/files_local-bin index cb08b22..0d203f4 100644 --- a/.config/files_local-bin +++ b/.config/files_local-bin @@ -1,4 +1,5 @@ -updateall +updateall.sh +update_bullseye2buster.sh check_sha256.sh generate_playlist.sh generate_playlist_fp.php diff --git a/local/bin/updateall.sh b/local/bin/updateall.sh index c9eb1a8..a094565 100755 --- a/local/bin/updateall.sh +++ b/local/bin/updateall.sh @@ -83,9 +83,20 @@ create_installkey() { } +# Fonction pour récupérer la valeur de /etc/os-release +get_os_release() { + ssh "$1" 'grep "^PRETTY_NAME=" /etc/os-release' | cut -d'=' -f2 | tr -d \" +} + + update_machine () { local machine="$1" echo -n " - Détection du gestionnaire de mise à jour ... " + + # recupérer le nom de l'OS + os_name=$(get_os_release "$machine") + echo -n " - Système d'exploitation : ${GREEN}$os_name${NC}" + if timeout 5 ssh "$machine" which apt > /dev/null 2>&1; then echo -e "${GREEN}apt${NC}" update_with_apt "$machine"