Files
rollcall/lab/pve-vbmc/pve-vbmc-addrs.sh
T
ilkerandClaude Fable 5.1 d9ae89b295
CI / agent (push) Successful in 3s
CI / site (push) Successful in 2s
CI / go (push) Successful in 1m15s
Rollcall: bare-metal commissioning server, agent, image build, lab and CI
Go server (API, embedded web UI, CLI) backed by PostgreSQL with AES-GCM
sealed BMC secrets; Debian live commissioning agent and live-build recipe;
Proxmox lab with pve-vbmc virtual BMCs; Gitea workflows for CI, releases
and deployment; project website.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-27 01:29:53 +01:00

14 lines
614 B
Bash

#!/bin/sh
# Adds/removes the BMC listen addresses from /etc/pve-vbmc/config.json
# as secondary IPs on the interface that carries the PXE subnet.
set -eu
CONF=/etc/pve-vbmc/config.json
PXE_IF=$(ip -o -4 addr show | awk '/10\.213\.77\.1\//{print $2; exit}')
[ -n "$PXE_IF" ] || { echo "pxenet interface not found" >&2; exit 1; }
for a in $(python3 -c 'import json;print(" ".join(b["address"] for b in json.load(open("'"$CONF"'"))["bmcs"]))'); do
case "$1" in
add) ip -4 addr replace "$a/24" dev "$PXE_IF" label "$PXE_IF:bmc" ;;
del) ip -4 addr del "$a/24" dev "$PXE_IF" 2>/dev/null || true ;;
esac
done