Fix base package pre-installation check in UniFi VM script
Update the logic for detecting errors during base package pre-installation in unifi-os-server-vm.sh by checking for 'error' in the output. Also correct URLs in cloud-init.func to use the correct repository path.
This commit is contained in:
parent
02b0f196a1
commit
c961dffcf1
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: community-scripts ORG
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/branch/main/LICENSE
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/branch/main/LICENSE
|
||||
# Revision: 1
|
||||
|
||||
# ==============================================================================
|
||||
@ -17,7 +17,7 @@
|
||||
# - Cloud-Init status monitoring and waiting
|
||||
#
|
||||
# Usage:
|
||||
# source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/cloud-init.func)
|
||||
# source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/cloud-init.func)
|
||||
# setup_cloud_init "$VMID" "$STORAGE" "$HN" "yes"
|
||||
#
|
||||
# Compatible with: Debian, Ubuntu, and all Cloud-Init enabled distributions
|
||||
|
||||
@ -771,13 +771,11 @@ SVCEOF" >/dev/null
|
||||
virt-customize -q -a "${FILE}" --run-command "systemctl enable unifi-firstboot.service" >/dev/null
|
||||
|
||||
# Try to install base packages during image customization (faster startup if it works)
|
||||
UNIFI_PREINSTALLED="no"
|
||||
|
||||
msg_info "Pre-installing base packages (qemu-guest-agent, podman, curl)"
|
||||
if virt-customize -a "${FILE}" --install qemu-guest-agent,curl,ca-certificates,podman,uidmap,slirp4netns >/dev/null 2>&1; then
|
||||
msg_ok "Pre-installed base packages (UniFi OS will install on first boot)"
|
||||
else
|
||||
if virt-customize -a "${FILE}" --install qemu-guest-agent,curl,ca-certificates,podman,uidmap,slirp4netns 2>&1 | grep -q "error"; then
|
||||
msg_info "Pre-installation not possible, packages will install on first boot"
|
||||
else
|
||||
msg_ok "Pre-installed base packages (UniFi OS will install on first boot)"
|
||||
fi
|
||||
|
||||
# Add auto-login if Cloud-Init is disabled
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user