Le 08/10/2025 à 18:10, Olivier a écrit :
Bonjour,
Je reconfigure un Raspberry 2 avec Raspbian Lite (trixie).
J'ai un fichier
/etc/NetworkManager/system-connections/eth0.nmconnection avec les
droits:
-rw------- 1 root root 222 8 oct. 17:09 eth0.nmconnection
et le contenu:
[connection]
id=eth0
uuid=16153d7c-1083-3c97-8675-4b6530d66cc5
type=ethernet
interface-name=eth0
autoconnect-priority=2
[ethernet]
wake-on-lan=1
[ipv4]
method=manual
address1=172.16.1.1/24
[ipv6]
method=auto
[proxy]
Ce fichier semble toujours ignoré par NetworkManager alors que le
fichier définissant la connexion WiFi, logé dans le même répertoire,
semble pris en compte (je n'en suis pas certain à 100%).
J'observe que NetworkManager semble utiliser de préférence le
répertoire /run/NetworkManager/system-connections.
Mes questions:
1. Comment contrôler la priorité entre le contenu des répertoires
/etc/NetworkManager/system-connections et
/run/NetworkManager/system-connections ?
2. Voyez-vous une raison qui explique l'ignorance du fichier
/etc/NetworkManager/system-connections/eth0.nmconnection ? Que
conseillez-vous pour avancer ?
Slts
Bonjour,
avertissement, je n'utilise que networkmanager via Gnome (ou parfois
Xfce), rarement nmtui et jamais nmcli
pour eth0, peut-être que nommer une connexionpar le même nom qu'une
interface (eth0...) est problématique et qu'avec un autre nom ça
marcherait mieux. Évidemment tout ça en supposant que l'interface eth0
n'est pas renommée ensuite en autre chose...
pour l'explication entre /etc et /run, il ya une explication dans cet
extrait de la page man nm-system-settings.conf
[...]
SYNOPSIS
/etc/NetworkManager/NetworkManager.conf,
/etc/NetworkManager/conf.d/name.conf,
/run/NetworkManager/conf.d/name.conf,
/usr/lib/NetworkManager/conf.d/name.conf,
/var/lib/NetworkManager/NetworkManager-intern.conf
DESCRIPTION
NetworkManager.conf is the configuration file for
NetworkManager. It is used to set up various aspects of NetworkManager's
behavior. The location of the main file and configuration directories
may be changed through use of the --config, --config-dir,
--system-config-dir, and
--intern-config argument for NetworkManager, respectively.
If a default NetworkManager.conf is provided by your
distribution's packages, you should not modify it, since your changes
may get overwritten by package updates. Instead, you can add additional
.conf files to the /etc/NetworkManager/conf.d directory. These will be
read in order, with later files overriding earlier ones. Packages might
install further configuration snippets to
/usr/lib/NetworkManager/conf.d. This directory is parsed first, even
before NetworkManager.conf. Scripts can also put per-boot configuration
into /run/NetworkManager/conf.d. This directory is parsed second, also
before NetworkManager.conf. The loading of a file
/run/NetworkManager/conf.d/name.conf can be prevented by adding a file
/etc/NetworkManager/conf.d/name.conf. Likewise, a file
/usr/lib/NetworkManager/conf.d/name.conf can be shadowed by putting a
file of the same name to either /etc/NetworkManager/conf.d or
/run/NetworkManager/conf.d.
[...]"