Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent NetworkManager to manage the interface on install #39

Open
xtor opened this issue Sep 12, 2024 · 0 comments
Open

Prevent NetworkManager to manage the interface on install #39

xtor opened this issue Sep 12, 2024 · 0 comments

Comments

@xtor
Copy link
Collaborator

xtor commented Sep 12, 2024

Add an install hook in the Debian installer that:

  1. Checks if NetworkManager is running, and if it is running:
  2. Presents the user with a list of the network interfaces that detd is expected to manage and allows to select one or more
  3. Adds the selected interfaces to the list of devices not managed by NetworkManager
  4. Reloads NetworkManager

A list of all the relevant network interfaces can be generated with the command:
find /sys/class/net/ -type l -exec bash -c "realpath {} | grep -v virtual | xargs --no-run-if-empty basename" \;

The list of unmanaged devices should be in the file:
/etc/NetworkManager/conf.d/99-detd-managed-devices.conf

It should contain one entry in [keyfile] for each unmanaged device. E.g. to blacklist enp1s0 and enp2s0, add the following line:

[keyfile]
unmanaged-devices=interface-name:enp1s0;interface-name:enp2s0

The outcome can be tested with:
nmcli d

This post explains how to present multiple choices in an installation template:
https://ubuntuforums.org/showthread.php?t=2290840

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

No branches or pull requests

1 participant