Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
e2e8fa5b72 fix(docker-vm): add error handling for virt-customize finalization
The hostname/machine-id virt-customize calls had no error handling,
unlike the SSH config calls just below them which already use || true.
When virt-customize fails (e.g. on certain Debian 13 images), the
script aborted instead of continuing gracefully.
These steps are not critical — Cloud-Init can set the hostname later.

Closes #12073
2026-02-20 21:08:14 +01:00
3 changed files with 4 additions and 9 deletions

View File

@@ -35,8 +35,7 @@ function update_script() {
msg_info "Stopping Service"
systemctl stop huntarr
msg_ok "Stopped Service"
ensure_dependencies build-essential
fetch_and_deploy_gh_release "huntarr" "plexguide/Huntarr.io" "tarball"
msg_info "Updating Huntarr"

View File

@@ -13,10 +13,6 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y build-essential
msg_ok "Installed Dependencies"
PYTHON_VERSION="3.12" setup_uv
fetch_and_deploy_gh_release "huntarr" "plexguide/Huntarr.io" "tarball"

View File

@@ -525,9 +525,9 @@ fi
msg_info "Finalizing image (hostname, SSH config)"
# Set hostname and prepare for unique machine-id
virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1
virt-customize -q -a "$WORK_FILE" --run-command "truncate -s 0 /etc/machine-id" >/dev/null 2>&1
virt-customize -q -a "$WORK_FILE" --run-command "rm -f /var/lib/dbus/machine-id" >/dev/null 2>&1
virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1 || true
virt-customize -q -a "$WORK_FILE" --run-command "truncate -s 0 /etc/machine-id" >/dev/null 2>&1 || true
virt-customize -q -a "$WORK_FILE" --run-command "rm -f /var/lib/dbus/machine-id" >/dev/null 2>&1 || true
# Configure SSH for Cloud-Init
if [ "$USE_CLOUD_INIT" = "yes" ]; then