Compare commits

..

1 Commits

Author SHA1 Message Date
GitHub Actions[bot]
8c0f47fd60 Update versions.json 2025-10-16 12:05:43 +00:00
2 changed files with 23 additions and 51 deletions

View File

@@ -204,13 +204,7 @@ You normally need a valid subscription for this.
Disable it (recommended)?" 14 58 2 "yes" " " "no" " " 3>&2 2>&1 1>&3)
case $CHOICE in
yes)
msg_info "Disabling 'pbs-enterprise' repository"
# Use Enabled: false instead of commenting to avoid malformed entry
if grep -q "^Enabled:" /etc/apt/sources.list.d/pbs-enterprise.sources 2>/dev/null; then
sed -i 's/^Enabled:.*/Enabled: false/' /etc/apt/sources.list.d/pbs-enterprise.sources
else
echo "Enabled: false" >>/etc/apt/sources.list.d/pbs-enterprise.sources
fi
sed -i '/pbs-enterprise/ s/^/# /' /etc/apt/sources.list.d/pbs-enterprise.sources
msg_ok "Disabled 'pbs-enterprise' repository"
;;
no)
@@ -219,12 +213,11 @@ Disable it (recommended)?" 14 58 2 "yes" " " "no" " " 3>&2 2>&1 1>&3)
esac
else
cat >/etc/apt/sources.list.d/pbs-enterprise.sources <<EOF
Types: deb
URIs: https://enterprise.proxmox.com/debian/pbs
Suites: trixie
Components: pbs-enterprise
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
Enabled: false
# Types: deb
# URIs: https://enterprise.proxmox.com/debian/pbs
# Suites: trixie
# Components: pbs-enterprise
# Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF
msg_ok "Added 'pbs-enterprise' repository (disabled)"
fi
@@ -246,12 +239,11 @@ EOF
# --- Test repo (pbs-test, renamed) ---
if ! component_exists_in_sources "pbs-test"; then
cat >/etc/apt/sources.list.d/pbs-test.sources <<EOF
Types: deb
URIs: http://download.proxmox.com/debian/pbs
Suites: trixie
Components: pbs-test
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
Enabled: false
# Types: deb
# URIs: http://download.proxmox.com/debian/pbs
# Suites: trixie
# Components: pbs-test
# Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF
msg_ok "Added 'pbs-test' repository (disabled)"
else

View File

@@ -197,7 +197,7 @@ start_routines_9() {
# Check sources.list
if [[ -f "$listfile" ]] && grep -qE '^\s*deb ' "$listfile"; then
((++LEGACY_COUNT))
(( ++LEGACY_COUNT ))
fi
# Check .list files
@@ -289,15 +289,11 @@ EOF
msg_ok "Kept 'pve-enterprise' repository"
;;
disable)
msg_info "Disabling 'pve-enterprise' repository"
# Use Enabled: false instead of commenting to avoid malformed entry
msg_info "Disabling (commenting) 'pve-enterprise' repository"
# Comment out every non-comment line in the file that has 'pve-enterprise' in Components
for file in /etc/apt/sources.list.d/*.sources; do
if grep -q "Components:.*pve-enterprise" "$file"; then
if grep -q "^Enabled:" "$file"; then
sed -i 's/^Enabled:.*/Enabled: false/' "$file"
else
echo "Enabled: false" >>"$file"
fi
sed -i '/^\s*Types:/,/^$/s/^\([^#].*\)$/# \1/' "$file"
fi
done
msg_ok "Disabled 'pve-enterprise' repository"
@@ -350,15 +346,10 @@ EOF
msg_ok "Kept 'ceph enterprise' repository"
;;
disable)
msg_info "Disabling 'ceph enterprise' repository"
# Use Enabled: false instead of commenting to avoid malformed entry
msg_info "Disabling (commenting) 'ceph enterprise' repository"
for file in /etc/apt/sources.list.d/*.sources; do
if grep -q "enterprise.proxmox.com.*ceph" "$file"; then
if grep -q "^Enabled:" "$file"; then
sed -i 's/^Enabled:.*/Enabled: false/' "$file"
else
echo "Enabled: false" >>"$file"
fi
sed -i '/^\s*Types:/,/^$/s/^\([^#].*\)$/# \1/' "$file"
fi
done
msg_ok "Disabled 'ceph enterprise' repository"
@@ -481,17 +472,7 @@ EOF
;;
no)
msg_error "Selected no to Adding 'ceph package repositories'"
# Use Enabled: false for .sources files, comment for .list files
for file in /etc/apt/sources.list.d/*.sources; do
if grep -q "enterprise.proxmox.com.*ceph" "$file" 2>/dev/null; then
if grep -q "^Enabled:" "$file"; then
sed -i 's/^Enabled:.*/Enabled: false/' "$file"
else
echo "Enabled: false" >>"$file"
fi
fi
done
find /etc/apt/sources.list.d/ -type f -name "*.list" \
find /etc/apt/sources.list.d/ -type f \( -name "*.sources" -o -name "*.list" \) \
-exec sed -i '/enterprise.proxmox.com.*ceph/s/^/# /' {} \;
msg_ok "Disabled all Ceph Enterprise repositories"
;;
@@ -510,12 +491,11 @@ EOF
yes)
msg_info "Adding 'pve-test' repository (deb822, disabled)"
cat >/etc/apt/sources.list.d/pve-test.sources <<EOF
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-test
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
Enabled: false
# Types: deb
# URIs: http://download.proxmox.com/debian/pve
# Suites: trixie
# Components: pve-test
# Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF
msg_ok "Added 'pve-test' repository"
;;