feat(iso): 2.1-2.3 — debug ISO builder with SSH access
Builder setup: - iso/builder/VERSIONS: pinned Alpine 3.21, Go 1.23.6, NVIDIA 550.54.15 - iso/builder/setup-builder.sh: installs build deps + Go on Alpine VM, verifies packages - iso/builder/build-debug.sh: compiles audit binary, injects SSH keys, builds ISO - iso/builder/mkimg.bee_debug.sh: Alpine mkimage profile (all audit packages + dropbear) SSH access (same Ed25519 key as release signing): - auto-collects ~/.keys/*.key.pub into authorized_keys at build time - fallback: user bee / password eeb when no keys available - bee-sshsetup init.d service: creates bee user, sets password, logs status Debug overlay: - bee-network: DHCP on all physical interfaces before SSH/audit - bee-audit-debug: runs audit on boot, leaves SSH up after - bee-sshsetup: key/password SSH setup - motd: shows log paths, re-run command, SSH access info Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
36
iso/overlay-debug/usr/local/bin/bee-network.sh
Normal file
36
iso/overlay-debug/usr/local/bin/bee-network.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
# bee-network.sh — bring up all physical network interfaces via DHCP
|
||||
# Unattended: runs silently, logs results, never blocks.
|
||||
|
||||
set -e
|
||||
|
||||
LOG_PREFIX="bee-network"
|
||||
|
||||
log() { echo "[$LOG_PREFIX] $*"; }
|
||||
|
||||
# find physical interfaces: exclude lo and virtual (docker/virbr/veth/tun/tap)
|
||||
interfaces=$(ip -o link show \
|
||||
| awk -F': ' '{print $2}' \
|
||||
| grep -v '^lo$' \
|
||||
| grep -vE '^(docker|virbr|veth|tun|tap|br-|bond|dummy)' \
|
||||
| sort)
|
||||
|
||||
if [ -z "$interfaces" ]; then
|
||||
log "no physical interfaces found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for iface in $interfaces; do
|
||||
log "bringing up $iface"
|
||||
ip link set "$iface" up 2>/dev/null || { log "WARN: could not bring up $iface"; continue; }
|
||||
|
||||
# DHCP: 3 retries, 5s timeout per try, exit without blocking if no offer
|
||||
if udhcpc -i "$iface" -t 3 -T 5 -n -q 2>/dev/null; then
|
||||
IP=$(ip -4 addr show "$iface" | awk '/inet /{print $2}' | head -1)
|
||||
log "OK: $iface got $IP"
|
||||
else
|
||||
log "WARN: $iface — no DHCP offer"
|
||||
fi
|
||||
done
|
||||
|
||||
log "done"
|
||||
Reference in New Issue
Block a user