Skip to content

Commit 044a2ee

Browse files
committed
Restore Ubuntu compatibility with intelligent package detection
Distribution-Specific Package Support: - Restore software-properties-common for Ubuntu systems - Restore ca-certificates-utils for Ubuntu systems - Add intelligent ss command detection (fallback to iproute2 if needed) - Maintain Debian compatibility by conditional package installation Package Logic Improvements: - Detect distribution type ( == 'ubuntu') for package selection - Add iproute2 explicitly to ensure network tools availability - Conditional package addition based on system capabilities - Graceful handling of distribution-specific package differences Fixes Ubuntu Server compatibility broken in previous commit while maintaining the Debian Testing (Trixie) fixes for missing packages. Both distributions now properly supported with appropriate packages.
1 parent b1dd213 commit 044a2ee

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

debian-server-post-install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,13 +1859,25 @@ step_05_core_packages() {
18591859
packages+=(
18601860
# Ex-minimal comfort tools
18611861
wget zsh htop net-tools unzip tree ncdu lsof
1862+
# Network tools (try both variants for compatibility)
1863+
iproute2
18621864
# Modern comfort tools
18631865
lsd zip unrar p7zip-full
18641866
# Infrastructure tools
18651867
build-essential apt-transport-https ca-certificates gnupg lsb-release
18661868
python3 python3-pip python3-venv jq rsync
18671869
# systemd-resolved systemd-timesyncd # Usually present, avoid conflicts
18681870
)
1871+
1872+
# Add distribution-specific packages for compatibility
1873+
if [[ "$DISTRO" == "ubuntu" ]]; then
1874+
packages+=(software-properties-common ca-certificates-utils)
1875+
fi
1876+
1877+
# Add ss command (try iproute2-ss or separate ss package if needed)
1878+
if ! command -v ss >/dev/null 2>&1; then
1879+
packages+=(iproute2)
1880+
fi
18691881
;;
18701882
esac
18711883

@@ -1879,6 +1891,11 @@ step_05_core_packages() {
18791891
cron anacron at
18801892
rsyslog vnstat
18811893
)
1894+
1895+
# Add Ubuntu-specific packages for server profile
1896+
if [[ "$DISTRO" == "ubuntu" ]]; then
1897+
packages+=(ca-certificates-utils)
1898+
fi
18821899
;;
18831900
esac
18841901

0 commit comments

Comments
 (0)