From bb5efde343f2535ffc627fa0b2bb41b92c9491d3 Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Wed, 24 Oct 2018 14:39:03 -0500 Subject: [PATCH] Only enable universe on Ubuntu --- virtualmin-install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/virtualmin-install.sh b/virtualmin-install.sh index 3d0e6ce..3e2c85d 100644 --- a/virtualmin-install.sh +++ b/virtualmin-install.sh @@ -702,12 +702,14 @@ install_virtualmin_release () { run_ok "apt-get update" "Downloading repository metadata" # Make sure universe repos are available # XXX Test to make sure this run_ok syntax works as expected (with single quotes inside double) - if [ -x "/bin/add-apt-repository" ] || [ -x "/usr/bin/add-apt-repository" ]; then - run_ok "add-apt-repository universe" \ - "Enabling universe repositories, if not already available" - else - run_ok "sed -ie '/backports/b; s/#*[ ]*deb \\(.*\\) universe$/deb \\1 universe/' /etc/apt/sources.list" \ - "Enabling universe repositories, if not already available" + if [ $os_type = "ubuntu" ]; then + if [ -x "/bin/add-apt-repository" ] || [ -x "/usr/bin/add-apt-repository" ]; then + run_ok "add-apt-repository universe" \ + "Enabling universe repositories, if not already available" + else + run_ok "sed -ie '/backports/b; s/#*[ ]*deb \\(.*\\) universe$/deb \\1 universe/' /etc/apt/sources.list" \ + "Enabling universe repositories, if not already available" + fi fi # XXX Is this still enabled by default on Debian/Ubuntu systems? run_ok "sed -ie 's/^deb cdrom:/#deb cdrom:/' /etc/apt/sources.list" "Disabling cdrom: repositories"