From dc8a42a16acdffccdb83686fe77abd9d9efff800 Mon Sep 17 00:00:00 2001 From: yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Sat, 29 Aug 2026 22:58:35 -0400 Subject: [PATCH] fix: set Proxmox container description correctly --- scripts/proxmox-install.sh | 16 ++++++---------- tests/test_proxmox_installer.py | 10 ++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/scripts/proxmox-install.sh b/scripts/proxmox-install.sh index 8fce5a6..d6f4bba 100644 --- a/scripts/proxmox-install.sh +++ b/scripts/proxmox-install.sh @@ -214,8 +214,6 @@ msg_ok "Container created" # ── USB passthrough ─────────────────────────────────────────────────────── msg_info "Configuring USB passthrough..." cat >> "/etc/pve/lxc/${CTID}.conf" <<'EOF' - -# USB passthrough for openHop Repeater lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir 0 0 EOF @@ -360,9 +358,8 @@ if [[ "$INSTALL_CONSOLE" == "true" ]]; then fi # ── Container notes ─────────────────────────────────────────────────────── -if command -v pct &>/dev/null; then - NOTES_TMP=$(mktemp) - cat > "$NOTES_TMP" <<'NOTES' +NOTES_TMP=$(mktemp) +cat > "$NOTES_TMP" <<'NOTES'
NOTES - NOTES_TEXT=$(cat "$NOTES_TMP") - rm -f "$NOTES_TMP" - pct set "$CTID" --notes "$NOTES_TEXT" - msg_ok "Container notes set" -fi +NOTES_TEXT=$(cat "$NOTES_TMP") +rm -f "$NOTES_TMP" +pct set "$CTID" --description "$NOTES_TEXT" +msg_ok "Container notes set" # ── Get container IP ────────────────────────────────────────────────────── sleep 2 diff --git a/tests/test_proxmox_installer.py b/tests/test_proxmox_installer.py index 0f606e2..0a4f161 100644 --- a/tests/test_proxmox_installer.py +++ b/tests/test_proxmox_installer.py @@ -92,6 +92,16 @@ def test_console_is_opt_in_installed_after_repeater_and_not_enabled() -> None: assert "web.web_path" not in script +def test_installer_sets_proxmox_html_description() -> None: + script = INSTALLER.read_text() + + assert 'pct set "$CTID" --description "$NOTES_TEXT"' in script + assert 'pct set "$CTID" --notes' not in script + assert "# USB passthrough for openHop Repeater" not in script + assert "openHop Repeater LXC" in script + assert "https://docs.openhop.dev/projects/openhop-repeater/" in script + + def test_installer_adds_update_command() -> None: script = INSTALLER.read_text()