diff --git a/scripts/docker/install/rootless/rootless_docker.sh b/scripts/docker/install/rootless/rootless_docker.sh index c54ec54..3565ab4 100755 --- a/scripts/docker/install/rootless/rootless_docker.sh +++ b/scripts/docker/install/rootless/rootless_docker.sh @@ -38,7 +38,10 @@ installDockerRootless() installed_version=$(slirp4netns --version 2>/dev/null | head -n1 | awk '{print $3}') isSuccessful "slirp4netns ${installed_version:-installed} is ready" - if [[ $(lsb_release -rs) == "10" ]]; then + # Debian 10 only. Use the values detectOS already resolved from /etc/os-release + # instead of shelling out to lsb_release, which isn't installed by default on + # minimal Ubuntu/Debian images (and would otherwise just error to stderr here). + if [[ "$OS_TYPE" == "Debian" && "$OS_VERSION" == "10" ]]; then ((menu_number++)) echo "" echo "---- $menu_number. Updating the sysctl file for Updating Debian 10." diff --git a/scripts/os/install/ubuntu.sh b/scripts/os/install/ubuntu.sh index 7b24420..6081eb6 100755 --- a/scripts/os/install/ubuntu.sh +++ b/scripts/os/install/ubuntu.sh @@ -22,19 +22,30 @@ installDebianUbuntu() fi if checkIfOSUpdateShouldRun; then - installed_apps="apt install curl dialog pv wget git zip htop sqlite3 pv sshpass rsync acl apache2-utils inotify-tools jq p7zip*" - isNotice "Installing System Updates... this may take a while." if [[ "$OS_TYPE" == "Debian" ]]; then export DEBIAN_FRONTEND="noninteractive" fi - local result; result=$(DEBIAN_FRONTEND=noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 $priv apt update -qq 2>&1 && DEBIAN_FRONTEND=noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 $priv apt install sudo -yqq 2>&1 && $priv apt-get autoclean 2>&1) + local result; result=$(DEBIAN_FRONTEND=noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 $priv apt-get update -qq 2>&1 && DEBIAN_FRONTEND=noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 $priv apt-get install sudo -yqq 2>&1 && $priv apt-get autoclean 2>&1) checkSuccess "Updating System Operating system." - local result; result=$(DEBIAN_FRONTEND=noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 $priv apt update -qq 2>&1) + local result; result=$(DEBIAN_FRONTEND=noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 $priv apt-get update -qq 2>&1) checkSuccess "Running application update" + # 7-Zip changed package name: Debian 13 and Ubuntu 24.04+ ship `7zip`, older + # releases ship `p7zip-full`. Resolve against the freshly-updated package + # lists rather than relying on a `p7zip*` glob — that only still matches on + # new releases because `7zip` happens to declare `Provides: p7zip`. + # Match on a real package stanza, not just apt-cache's exit status — it + # returns 0 with empty output for virtual/provided-only names. + local sevenzip="p7zip-full" + if apt-cache show 7zip 2>/dev/null | grep -q .; then + sevenzip="7zip" + fi + + installed_apps="apt-get install curl dialog pv wget git zip htop sqlite3 sshpass rsync acl apache2-utils inotify-tools jq $sevenzip" + local result; result=$(DEBIAN_FRONTEND=noninteractive APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 $priv $installed_apps -yqq 2>&1) checkSuccess "Installing system applications" else