From 3ca96f6f351e80e9d89ae9aa6cb66770b1bdeebc Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Thu, 28 Apr 2022 18:42:00 +0200 Subject: [PATCH] Moved pve-no-subscription list to sources.list --- proxmox-zfs-postinstall.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proxmox-zfs-postinstall.sh b/proxmox-zfs-postinstall.sh index 4086247..7df1062 100644 --- a/proxmox-zfs-postinstall.sh +++ b/proxmox-zfs-postinstall.sh @@ -169,7 +169,11 @@ if [[ "$(uname -r)" == *"-pve" ]]; then echo "Deactivating pve-enterprise repository" mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak > /dev/null 2>&1 echo "Activating pve-no-subscription repository" - echo "deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list + q=$(cat /etc/apt/sources.list | grep "pve-no-subscription") + if [ $? -gt 0 ]; then + echo "deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription" >> /etc/apt/sources.list + fi + rm -f /etc/apt/sources.list.d/pve-no-subscription.list fi echo "Getting latest package lists" apt update > /dev/null 2>&1