From 5fcf94c26e55e59f2a87fd7787aceb4e167f53d3 Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Wed, 9 May 2018 01:14:37 -0500 Subject: [PATCH] Move key installation above repo metadata update. No idea how this worked at all before. --- virtualmin-install.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/virtualmin-install.sh b/virtualmin-install.sh index 33350fc..a2f916f 100644 --- a/virtualmin-install.sh +++ b/virtualmin-install.sh @@ -692,6 +692,13 @@ install_virtualmin_release () { for repo in $repos; do printf "deb http://${LOGIN}software.virtualmin.com/vm/${vm_version}/${repopath}apt ${repo} main\\n" >> /etc/apt/sources.list done + # Install our keys + log_debug "Installing Webmin and Virtualmin package signing keys..." + download "https://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-6" + download "https://software.virtualmin.com/lib/RPM-GPG-KEY-webmin" + run_ok "apt-key add RPM-GPG-KEY-virtualmin-6" "Installing Virtualmin 6 key" + run_ok "apt-key add RPM-GPG-KEY-webmin" "Installing Webmin key" + run_ok "apt-get update" "Updating apt metadata" 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) @@ -704,14 +711,6 @@ install_virtualmin_release () { install_updates="$install $deps" run_ok "apt-get clean" "Cleaning out old metadata" sed -i "s/\\(deb[[:space:]]file.*\\)/#\\1/" /etc/apt/sources.list - - # Install our keys - log_debug "Installing Webmin and Virtualmin package signing keys..." - download "https://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-6" - download "https://software.virtualmin.com/lib/RPM-GPG-KEY-webmin" - run_ok "apt-key add RPM-GPG-KEY-virtualmin-6" "Installing Virtualmin 6 key" - run_ok "apt-key add RPM-GPG-KEY-webmin" "Installing Webmin key" - run_ok "apt-get update" "Updating apt metadata" ;; *) log_error " Your OS is not currently supported by this installer."