clawdie-iso/live/operator-session/clawdie-live-resolver
Sam & Claude 6bade5d04e Merge xfce-operator-usb: AMD ASUS hardware lane + XFCE panel polish (Sam & Claude)
Consolidates the operator-USB work into main now that the AMD ASUS hardware-evidence collection is closed and Codex is parked. Brings the live-session hardware lane (XInput/libinput touchpad guard, internal audio + resolver bootstrap, hw-report with gated public upload, operator-USB branding) and the config-only XFCE panel polish (Pass 1 + Pass 2: branded Whisker PNG, xkb text mode, panel 40px, systray square-icons).

Conflict: doc/LLM-PROVIDER-HARNESS.md was evolved on both sides. Resolved as a union with no content lost — the xfce-side harness/provider/fabric restructure is the base, and main's two unique blocks (Verifying Key Cleanup flow, the 2D Platform x Harness matrix + populate/add procedures) are preserved. The doc owner may later dedupe the overlap between the two 1D matrices and the 2D matrix.

Verification debt stays explicit and open (not closed by this merge): XFCE visual-polish confirmation and the next rebuilt-image hardware retest, per doc/XFCE-PANEL-BUGS-HANDOFF.md and PLAN-OPERATOR-USB-NEXT.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 20:04:23 +02:00

59 lines
1.8 KiB
Bash

#!/bin/sh
# Clawdie operator USB resolver guard.
#
# FreeBSD installer-derived memsticks may leave /etc/resolv.conf pointing at
# /tmp/bsdinstall_etc/resolv.conf. On this live USB /tmp is tmpfs, so that
# target disappears at boot and DNS breaks even when DHCP, link, and routing
# are otherwise healthy. Repair only missing or installer-scratch resolver
# files; leave a valid operator/DHCP-managed resolver untouched.
# PROVIDE: clawdie_live_resolver
# REQUIRE: FILESYSTEMS
# BEFORE: netif NETWORKING avahi_daemon
# KEYWORD: nojail
. /etc/rc.subr
name="clawdie_live_resolver"
rcvar="${name}_enable"
start_cmd="${name}_start"
stop_cmd=":"
clawdie_live_resolver_recreate() {
rm -f /etc/resolv.conf
{
echo "# Created by clawdie_live_resolver."
echo "# DHCP/NetworkMgr may replace this file after interfaces come up."
} >/etc/resolv.conf
chmod 0644 /etc/resolv.conf
}
clawdie_live_resolver_start() {
_target=""
if [ -L /etc/resolv.conf ]; then
_target="$(readlink /etc/resolv.conf 2>/dev/null || true)"
case "$_target" in
/tmp/bsdinstall_etc/*)
echo "${name}: replacing installer resolver symlink ${_target}"
clawdie_live_resolver_recreate
return 0
;;
*)
if [ ! -e /etc/resolv.conf ]; then
echo "${name}: replacing dangling resolver symlink ${_target}"
clawdie_live_resolver_recreate
fi
return 0
;;
esac
fi
if [ ! -e /etc/resolv.conf ]; then
echo "${name}: creating missing /etc/resolv.conf"
clawdie_live_resolver_recreate
fi
}
load_rc_config "$name"
: "${clawdie_live_resolver_enable:=YES}"
run_rc_command "$1"