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>
14 lines
614 B
Bash
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
|