mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-23 13:35:56 +01:00
fix: add warning when virt-customize fallback fails completely
This commit is contained in:
@@ -552,7 +552,7 @@ msg_ok "Finalized image"
|
||||
|
||||
# Create first-boot Docker install script (fallback if virt-customize failed)
|
||||
if [ "$DOCKER_PREINSTALLED" = "no" ]; then
|
||||
virt-customize -q -a "$WORK_FILE" --run-command 'cat > /root/install-docker.sh << "DOCKERSCRIPT"
|
||||
if virt-customize -q -a "$WORK_FILE" --run-command 'cat > /root/install-docker.sh << "DOCKERSCRIPT"
|
||||
#!/bin/bash
|
||||
exec > /var/log/install-docker.log 2>&1
|
||||
echo "[$(date)] Starting Docker installation"
|
||||
@@ -581,9 +581,9 @@ systemctl restart docker
|
||||
touch /root/.docker-installed
|
||||
echo "[$(date)] Docker installation completed"
|
||||
DOCKERSCRIPT
|
||||
chmod +x /root/install-docker.sh' >/dev/null 2>&1 || true
|
||||
chmod +x /root/install-docker.sh' >/dev/null 2>&1; then
|
||||
|
||||
virt-customize -q -a "$WORK_FILE" --run-command 'cat > /etc/systemd/system/install-docker.service << "DOCKERSERVICE"
|
||||
virt-customize -q -a "$WORK_FILE" --run-command 'cat > /etc/systemd/system/install-docker.service << "DOCKERSERVICE"
|
||||
[Unit]
|
||||
Description=Install Docker on First Boot
|
||||
After=network-online.target
|
||||
@@ -599,6 +599,10 @@ RemainAfterExit=yes
|
||||
WantedBy=multi-user.target
|
||||
DOCKERSERVICE
|
||||
systemctl enable install-docker.service' >/dev/null 2>&1 || true
|
||||
else
|
||||
msg_warn "virt-customize failed for this image. Docker must be installed manually after first boot:"
|
||||
msg_warn " curl -fsSL https://get.docker.com | sh"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Resize disk to target size
|
||||
|
||||
Reference in New Issue
Block a user