Skip to content

apply: services the config does not run are not restarted — install.sh no longer rolls back on machines without WiFi - #143

Merged
Cd1s merged 1 commit into
mainfrom
fix/install-fresh-alpine
Oct 17, 2026
Merged

Cd1s merged 1 commit into
mainfrom
fix/install-fresh-alpine

Conversation

@Cd1s

@Cd1s Cd1s commented Oct 17, 2026

Copy link
Copy Markdown
Owner

What

mr/apply.go plan(): a service that mr manages but the config does not enable (managedServices minus enabledServices) is no longer put on the restart list when one of its generated files changes; the plan disables it instead, as before. Test: TestPlanDoesNotRestartServicesTheConfigDoesNotRun (with radios a new hostapd config still restarts mr-hostapd; without radios wifi-post.sh is still written but mr-hostapd is not restarted).

Why

On a fresh Alpine machine without WiFi (any VM, most x86 boxes) install.sh step 5 always failed and rolled back: the first apply writes /etc/mini-router/gen/wifi-post.sh, which maps to mr-hostapd, so mr-hostapd was restarted although wifi.radios: [] does not run it; its start_pre refuses ("no hostapd config for an existing radio") and the whole apply was rolled back. Such a box could never be applied, by install.sh or a later mr apply. The AX6000 image always has radios, which is why this did not show up there.

Verification

  • sudo ./tools/ci.sh: ALL CHECKS PASSED. The new test fails without the apply.go change.
  • Fresh Alpine 3.24 x86_64 VM (cloud image, two virtio NICs, no radio), unattended install.sh with MR_LOCAL from this branch's tools/release.sh:
    • main (7b5c03e), DHCP WAN: step 5 rolls back with the error above (3/3).
    • this branch, DHCP WAN: applied; a LAN client gets a lease, resolves names, reaches the internet and gets HTTP 200 from the panel; GET ?a=status works after login.
    • this branch, PPPoE WAN with DHCPv6-PD (linux-lts kernel): applied; the LAN client gets IPv4 and a global IPv6 address from the delegated /60 and pings the ISP's IPv6 address.
  • Reviewed by a second agent from a different model family (Gemini): no other managed service is affected, services that become enabled still restart, risk/verify/rollback unchanged.

The installer itself is not touched (no overlap with #139).

Closes #142

🤖 Generated with Claude Code

…h no longer rolls back on machines without WiFi (Closes #142)

plan() restarted the service of every changed generated file. On the first apply wifi-post.sh is
new, so mr-hostapd was restarted on boxes without a radio, refused to start and rolled back
install.sh step 5 on every VM and WiFi-less x86 box. A managed service the config does not enable
is now only disabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Cd1s
Cd1s merged commit ce5f0a6 into main Oct 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh rolls back on every machine without WiFi: mr apply restarts mr-hostapd

1 participant