# shellcheck shell=bash disable=SC2034 # sourced by run-net-scenarios.sh # Scenario: a rival network manager active alongside NetworkManager is disabled. # # dhcpcd (or systemd-networkd / iwd) running next to NM fights it for the link. # Break by enabling dhcpcd; the fix disables it, and the chain resets to # reconnect. Requires dhcpcd installed in the target. SCENARIO_DESC="an active rival manager (dhcpcd) is disabled" SCENARIO_GROUP="control-plane" scenario_break() { nexec "systemctl enable --now dhcpcd" } scenario_diagnose_expect() { # The verdict fires only when the link is also failing; in a fresh target # with no configured uplink that holds, so the rival should be named. ndoctor_json ".report.control_plane.rivals | index(\"dhcpcd\")" \ | grep -vqx null } scenario_fix() { nfix } scenario_assert() { ! nexec "systemctl is-active dhcpcd >/dev/null 2>&1" }