estrai feat_add_lsb_release in file dedicato e migliora rilevamento distro

- nuovo featlib/lsb-release.sh con feat_add_lsb_release
- docker.sh importa lsb-release.sh
- logica robusta per DISTRIB_ID/DISTRIB_CODENAME con fallback multipli
- case-insensitive per LinuxMint/Ubuntu
- lsb-release installato on-demand solo se necessario
This commit is contained in:
2026-01-24 06:11:06 +01:00
parent 296b354422
commit 92bad88c68
2 changed files with 48 additions and 8 deletions
+17
View File
@@ -0,0 +1,17 @@
#! /bin/bash --
[ ! -z "${GREZZO_1737747200}" ] && return; GREZZO_1737747200=0
function feat_add_lsb_release() {
if ! feat_missing "apt-get"; then
sudo apt-get update
sudo apt-get install -y lsb-release
elif ! feat_missing "pacman"; then
sudo pacman -S --needed lsb-release
elif ! feat_missing "apk"; then
sudo apk add --no-cache lsb-release
elif ! feat_missing "yum"; then
sudo yum install -y redhat-lsb-core
elif ! feat_missing "zypper"; then
sudo zypper in lsb-release
fi
}