Merge pull request #13 from MAButz/main

Update proxmox-zfs-postinstall.sh
This commit is contained in:
Thorsten Spille 2023-04-20 22:05:24 +02:00 committed by GitHub
commit 5fc25a4237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,12 @@ fi
###### INSTALLER SECTION ###### ###### INSTALLER SECTION ######
# disable pve-enterprise repo and add pve-no-subscription repo # disable pve-enterprise repo and add pve-no-subscription repo
if [[ "$(uname -r)" == *"-pve" ]]; then
#Not tested, yet!
read -p "Do you want to disable pve-enterprise repo and add pve-no-subscription repo (y/N)? " response
if [ "${response,,}" == "y" ]; then
if [[ "$(uname -r)" == *"-pve" ]]; then
echo "Deactivating pve-enterprise repository" 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 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 "Activating pve-no-subscription repository"
@ -174,7 +179,9 @@ if [[ "$(uname -r)" == *"-pve" ]]; then
echo "deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription" >> /etc/apt/sources.list echo "deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription" >> /etc/apt/sources.list
fi fi
rm -f /etc/apt/sources.list.d/pve-no-subscription.list rm -f /etc/apt/sources.list.d/pve-no-subscription.list
fi
fi fi
echo "Getting latest package lists" echo "Getting latest package lists"
apt update > /dev/null 2>&1 apt update > /dev/null 2>&1