feat(pbs): post-install menu for Proxmox Backup Server

- Open the post-install menu from the PBS menu
- List only the customizable options that apply to PBS
- Offer the PBS no-subscription repository through the native repository API
- Upgrade PBS with the package list shown before applying it
- Remove and restore the subscription notice on the PBS web interface
- Install Figurine on PBS without the Proxmox VE aliases
- Offer the Helper-Scripts PBS post-install and microcode scripts
- Tune firewall bridges after the systemd udev rules in the automated post-install
- Add PBS repository policy tests and syntax checks
- Document the PBS differences on the post-install page
- Use backups in the Spanish PBS update message
This commit is contained in:
MacRimi
2026-10-17 18:13:44 +02:00
parent ce1a3de719
commit 98ae1f3626
34 changed files with 1976 additions and 227 deletions
@@ -53,7 +53,12 @@ initialize_cache
if [[ -f "$LOCAL_SCRIPTS/global/platform-functions.sh" ]]; then
source "$LOCAL_SCRIPTS/global/platform-functions.sh"
pmx_require_pve || exit 1
fi
# On Proxmox Backup Server the menu lists only the options that apply to
# it; repositories, upgrade and the subscription notice use its tooling.
PMX_ON_PBS=false
if declare -F pmx_is_pbs >/dev/null && pmx_is_pbs; then
PMX_ON_PBS=true
fi
# Load shared global functions
@@ -122,6 +127,17 @@ setup_proxmox_repositories() {
msg_info2 "$(translate "Configuring Proxmox APT repositories...")"
if [[ "$PMX_ON_PBS" == true ]]; then
if ! ensure_pbs_repositories; then
msg_error "$(translate "Failed to configure Proxmox Backup Server repositories")"
register_tool "proxmox_repos" false "$FUNC_VERSION"
return 1
fi
register_tool "proxmox_repos" true "$FUNC_VERSION"
msg_success "$(translate "Proxmox Backup Server APT repositories configured")"
return 0
fi
if ! ensure_repositories; then
msg_error "$(translate "Failed to configure Proxmox repositories")"
register_tool "proxmox_repos" false "$FUNC_VERSION"
@@ -248,6 +264,10 @@ EOF
apt_upgrade() {
if [[ "$PMX_ON_PBS" == true ]]; then
bash "$LOCAL_SCRIPTS/global/update-pbs.sh"
return
fi
local pve_version
pve_version=$(pveversion 2>/dev/null | grep -oP 'pve-manager/\K[0-9]+' | head -1)
@@ -2376,6 +2396,14 @@ EOF
remove_subscription_banner() {
local FUNC_VERSION="1.0"
# description: Patch the Proxmox web UI to suppress the "no valid subscription" dialog (PVE 8 + 9 variants supported).
if [[ "$PMX_ON_PBS" == true ]]; then
if ! bash "$LOCAL_SCRIPTS/global/remove-banner-pve-v3.sh"; then
msg_error "$(translate "Subscription banner removal failed")"
return 1
fi
register_tool "subscription_banner" true "$FUNC_VERSION"
return 0
fi
local pve_version
pve_version=$(pveversion 2>/dev/null | grep -oP 'pve-manager/\K[0-9]+' | head -1)
@@ -3143,8 +3171,11 @@ EOF
}
ensure_aliases
msg_ok "$(translate "Aliases added to .bashrc")"
# The aliases call Proxmox VE tools.
if [[ "$PMX_ON_PBS" != true ]]; then
ensure_aliases
msg_ok "$(translate "Aliases added to .bashrc")"
fi
msg_success "$(translate "Figurine installation and configuration completed successfully.")"
register_tool "figurine" true "$FUNC_VERSION"
@@ -3993,6 +4024,19 @@ main_menu() {
"Optional|Install and configure Log2RAM|LOG2RAM"
)
if [[ "$PMX_ON_PBS" == true ]]; then
local -A pve_only=(
[GUESTAGENT]=1 [VFIO_IOMMU]=1 [OPENVSWITCH]=1 [VZDUMP]=1 [PVEAM]=1
[CEPH]=1 [ENABLE_HA]=1 [OVHRTM]=1 [PIGZ]=1
)
local pbs_options=() option_key
for option in "${options[@]}"; do
option_key="${option##*|}"
[[ -n "${pve_only[$option_key]:-}" ]] || pbs_options+=("$option")
done
options=("${pbs_options[@]}")
fi
IFS=$'\n' sorted_options=($(for option in "${options[@]}"; do
IFS='|' read -r category description function_name <<< "$option"
printf "%d|%s|%s|%s\n" "${category_order[$category]:-999}" "$category" "$description" "$function_name"