Skip to content

Fix network scripts - #48

Open
vidvidex wants to merge 7 commits into
ros2from
fix-network-scripts
Open

vidvidex wants to merge 7 commits into
ros2from
fix-network-scripts

Conversation

@vidvidex

@vidvidex vidvidex commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR fixes various problems found in the network scripts:

  • switching between NetworkManager and networkd didn't always work correctly

  • old .yaml files in /etc/netplan could break networking completely. These are now always renamed to .yaml.bak

  • running "Fix network interface names" (switching to eth0 and wlan0 format) could break static IP settings if settings if these refer to interfaces by name. The script now checks this and uses the MAC address in the configuration.

  • interfaces without internet access are marked as optional, which speeds up booting because the system won't wait for them to become online (closes Optional on interfaces without internet access #40)

  • in case of errors in network configuration is is possible to completely lose access. For this reason there is now a timeout of 2 minutes. If new configuration is not confirmed in this time it is automatically rolled back. You can confirm setting by pressing Enter in your current terminal (if you don't lose connection) or by logging in again.

    The new network configuration is applied, but it is not confirmed yet.
    
    To keep it:
      1. Check that the network works, for example that you can open a new SSH session to the device
      2. Press Enter in this terminal within 110 seconds
    
    If this terminal lost its connection (for example because you changed the IP address it is connected to),
    log in again (using the new address). Any new login (SSH or local) confirms the new configuration.
    
    If the configuration is not confirmed in time, the previous network configuration is restored automatically.
    
    Press Enter to keep the new network configuration ...

Other configs are renamed to *.yaml.bak, so that they can not override the new
config but can still be restored by hand
If a network change is not confirmed within 2 minutes the config will
automatically be reverted. Confirmation can be done either by pressing
enter in current terminal or logging in from another session
…menu

Improve how the status of network interfaces is displayed. Previously
we would guess the mode (DHCP or static) from the current addresses, which
had problems when an interface was unplugged or disabled (didn't know the difference
between unplugged and DHCP without an address). Now we read the config
from netplan config or NetworkManager, which should be much more reliable
@vidvidex
vidvidex force-pushed the fix-network-scripts branch from a58fc9e to 5c0d633 Compare October 27, 2026 08:46
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.

Optional on interfaces without internet access

1 participant