Preserve current route priority on reinstall

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
28allday 2026-07-03 20:12:44 +01:00
parent b9c78d982b
commit b420072cba

View file

@ -169,9 +169,13 @@ cmd_install() {
|| { warn "Package install failed — no internet, or sudo declined."; return 1; }
ok "usbmuxd + libimobiledevice installed (usbmuxd starts on demand via udev)"
write_netfile "$METRIC_FALLBACK" || { warn "Could not write $NETFILE."; return 1; }
# Preserve the current priority on reinstall; default to fallback.
local metric
metric=$(current_metric || true)
metric=${metric:-$METRIC_FALLBACK}
write_netfile "$metric" || { warn "Could not write $NETFILE."; return 1; }
reload_networkd || { warn "networkd reload failed."; return 1; }
ok "networkd profile written: $NETFILE (fallback priority, metric $METRIC_FALLBACK)"
ok "networkd profile written: $NETFILE (metric $metric)"
# Floating TUI launcher for Walker. Uses a dedicated app-id (rather than
# Omarchy's generic TUI.float) so our own windowrule can size it smaller.