Commit graph

56 commits

Author SHA1 Message Date
Thomas Haller 86db3df6ac
core: honor ID_NET_MANAGED_BY="org.freedesktop.NetworkManager" to manage device
If ID_NET_MANAGED_BY= attribute is set, we have an indication who is
responsible for the device. If this is set to anything but
"org.freedesktop.NetworkManager", then the device is unmanaged.

The effect is the same as setting NM_UNMANAGED= attribute. NM_UNMANAGED=
takes precedence over this setting.

See-also: https://github.com/systemd/systemd/issues/29768
See-also: https://github.com/systemd/systemd/pull/29782
2023-11-02 10:55:03 +01:00
Thomas Haller 74cb240040
man: document "ID_NET_DHCP_BROADCAST" udev property
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1414
2023-11-02 10:55:02 +01:00
Thomas Haller 36fb335b28
device/ethernet: honor ID_NET_AUTO_LINK_LOCAL_ONLY udev property
We honored "NM_AUTO_DEFAULT_LINK_LOCAL_ONLY" udev property, for when we
generate a "Wired connection 1" (aka the "auto-default connection").

Systemd now also honors and may set ID_NET_AUTO_LINK_LOCAL_ONLY for
a similar purpose. Honore that too.

The NM specific variable still is preferred, also because "NM_AUTO_DEFAULT_LINK_LOCAL_ONLY"
is about something very NetworkManager specific (controlling "Wired connection 1").

Maybe one day, we should drop "data/90-nm-thunderbolt.rules" and only
rely on what systemd provides. But not yet.

See-also: https://github.com/systemd/systemd/pull/29767
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1413
2023-11-02 10:48:19 +01:00
Beniamino Galvani 7a07a0b92d man: replace license blurb with SPDX tag 2023-10-06 13:27:59 +02:00
Fernando Fernandez Mancera a44f20c985 man: adjust references of nm-settings to nm-settings-nmcli
nm-settings was renamed to nm-settings-nmcli therefore we should rename
all the references to nm-settings-nmcli.
2023-08-01 14:21:23 +02:00
Thomas Haller 3a6a07e11e
man: update "--print-config" text in man NetworkManager 2022-09-08 16:19:11 +02:00
Thomas Haller 55421209e2
man: show example how to enable logging in NetworkManager 2022-08-09 10:20:58 +02:00
Thomas Haller df94cb2116
man: add NetworkManager-wait-online.service.8 manual
NetworkManager-wait-online is a constant source of confusion,
as it seems to delay the boot (when it's often just the messenger
or either a network problem, a NetworkManager misconfiguration
or a misconfiguration of other systemd services).

Try to clear that up with a manual page.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1130
2022-03-02 16:09:16 +01:00
Thomas Haller 7a39f1f7e7
man: update URL for networkmanager.dev home page 2021-08-03 14:57:35 +02:00
Beniamino Galvani fa1f628bce core: force emission of DNS_CONFIG_CHANGED signal on SIGUSR1
If the configuration contains dns=none and resolv.conf is updated
through a dispatcher script, currently there is no way to tell NM that
the content of resolv.conf changed, so that it can restart a hostname
resolution.

Use SIGUSR1 (and SIGHUP) for that.
2021-05-03 22:13:36 +02:00
Thomas Haller 9c0c0ac966
man: split NetworkManager-dispatcher(8) manual page out of NetworkManager(8)
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/784
2021-03-16 17:01:53 +01:00
Thomas Haller 9c732c12bd
man: expand DEBUGGING section in man NetworkManager 2020-09-02 16:45:14 +02:00
Thomas Haller ab8b148d41
man: update bug tracker in man NetworkManager 2020-09-02 15:56:10 +02:00
Thomas Haller 4018504247
man: fix description of v2 secret key in man NetworkManager
Fixes: 0aa09da5f4 ('man: explain "/var/lib/NetworkManager/secret-key" in `man NetworkManager`')
2020-09-02 14:52:46 +02:00
Thomas Haller 0aa09da5f4
man: explain "/var/lib/NetworkManager/secret-key" in man NetworkManager 2020-09-02 12:10:04 +02:00
Thomas Haller 62b135d337
dispatcher: clarify documentation about first argument to dispatcher scripts for "connectivity-change"
The manual page claimed that for "connectivitiy-change" actions, the dispatcher
scripts would get as first argument (the device name) "none". That was not done,
only for "hostname" actions.

For consistency, maybe that should be adjusted to also pass "none" for connectivity
change events. However, "none" is really an odd value, if there is no device. Passing
an empty word is IMO nicer. So stick to that behavior, despite being inconsistent.
Also fix the documentation about that.

(cherry picked from commit 0b168f7b99)
2020-04-30 21:53:21 +02:00
Lubomir Rintel b385ad0159 all: say Wi-Fi instead of "wifi" or "WiFi"
Correct the spelling across the *entire* tree, including translations,
comments, etc. It's easier that way.

Even the places where it's not exposed to the user, such as tests, so
that we learn how is it spelled correctly.
2018-11-29 17:53:35 +01:00
Thomas Haller 085b769729 man: clarify udev property "NM_UNMANAGED" in man NetworkManager 2018-10-26 09:06:45 +02:00
Lubomir Rintel 9dab0a5eba man/NetworkManager: document --configure-and-quit option 2018-09-18 17:40:47 +02:00
Thomas Haller 2800232bbf dispatcher: add NM_DISPATCHER_ACTION environment variable
Previously, the action was only passed as the first command line
argument to the dispatcher scripts. Now, also set it via the
"$NM_DISPATCHER_ACTION" environment variable.

The main purpose is to have a particular, nm-dispatcher specific
variable that is always set inside the dispatcher scripts.
For example, imagine you have a script that can be either called by
dispatcher or some other means (manually, or spawned via
/etc/NetworkManager/dispatcher.d/11-dhclient).  Then it might make
sense to differenciate from inside the script whether you are called
by nm-dispatcher. But previously, there was no specific environment
variable that was always set inside the dispatcher event. For example,
with the "hostname" action there are no other environment variables.

Now (with version 1.12), you can check for `test -n "$NM_DISPATCHER_ACTION"`.

(cherry picked from commit ce9619047c)
2018-06-18 14:19:16 +02:00
Thomas Haller 68fa0ea8eb man: document all setting plugins in NetworkManager.conf manual
although they are deprecated and unused, document them.
2017-12-21 10:50:33 +01:00
Lubomir Rintel 7b589e2b72 man: use <filename> to mark file names
This gives the templates a chance to do something extra clever with the
formatting. The templates, of course, choose not to :(
2016-11-11 14:42:27 +01:00
Lubomir Rintel 42e1e669bc man: link to some online resources 2016-11-11 14:42:27 +01:00
Lubomir Rintel 063d714a3c man: get rid of the extra capitalization in docbook source
The temaplates capitalize the names if they wish.
2016-11-11 14:42:26 +01:00
Mario Sanchez Prada 3359368f28 man: Added documentation for the connectivity-change dispatcher hook
Also added documentation for the new CONNECTIVITY_STATE environment
variable, that will also be avaiblable in those hooks.

https://bugzilla.gnome.org/show_bug.cgi?id=768969
2016-07-28 22:22:14 +02:00
Lubomir Rintel 057d477b2a man: turn the manual page cross-references into links
This improves the HTML rendering.

But it also causes a lot of non-resolvable linkends warning when rendering a
separate manual pages into roff/mman. The messages are harmless, but still
a bit ugly.
2016-06-21 18:40:13 +02:00
Thomas Haller 0acee97220 config,dns: support Reload flags to specify that only parts should be reloaded
Support 3 new flags for Reload:

  - 0x01 (CONF): reload the configuration from disk
  - 0x02 (DNS_RC): write DNS configuration to resolv.conf
  - 0x04 (DNS_FULL): restart DNS plugin

Omitting all flags is the same as reloading everything, thus SIGHUP.
2016-06-01 19:06:34 +02:00
Thomas Haller ec89bd5171 man: update documenting signals in NetworkManager manual 2016-06-01 19:06:34 +02:00
Beniamino Galvani 916e598f56 man: add missing comma in NetworkManager.xml 'see also' section 2016-04-16 16:35:41 +02:00
Lubomir Rintel b349603959 man: clarify the license of the manuals
It's included from GFDL 1.1+ document; it should be GFDL too.
2016-04-08 13:10:47 +02:00
Lubomir Rintel 0fc0cc68fc man: move nmcli-examples to section 7
It really is not a configuration file and doesn't belong to section 5.
2016-04-05 14:37:51 +02:00
Lubomir Rintel 60582bf443 man: include version from a XML entity
This way it's consistently used across all manual page without a need
for XSL templating.

Also, the entities file could in future possibly be used to template the
build-time configurables such as filesystem paths or bug tracker URL.
2016-04-05 14:37:51 +02:00
Beniamino Galvani c885fd55e8 man: update version number and dates in manual pages
Bump NM version number to 1.2 and add the project name to non-XML
pages. Also, update the dates to the date of the last non-trivial
change and update their format to YYYY-MM-DD, as specified by 'man
man-pages'.
2016-03-09 10:11:27 +01:00
Thomas Haller b875ac34be man: clarify DEVICE_IFACE vs. DEVICE_IP_IFACE in man NetworkManager 2016-02-22 20:08:56 +01:00
Thomas Haller b51da9b030 man: replace tabs by eight spaces in xml manual pages 2016-01-27 13:12:49 +01:00
Beniamino Galvani 9bc5600aa4 man: document the effects of supported signals 2016-01-19 11:48:49 +01:00
Beniamino Galvani 2ef3c1047d man: fix typos 2015-12-24 09:48:20 +01:00
Thomas Haller e1ea4b725e main: add argument --print-config to NetworkManager 2015-11-22 13:40:32 +01:00
Beniamino Galvani 1999723241 nm-dispatcher: allow scripts to be marked as no-wait
When a script is a symbolic link to the 'no-wait.d' subdirectory, the
dispatcher now schedules it immediately and in parallel with other
no-wait scripts.

https://bugzilla.gnome.org/show_bug.cgi?id=746703
2015-08-25 15:27:18 +02:00
Thomas Haller 9a79398a00 man: clearify the meaning of the interface argument for dispatcher scripts 2015-08-19 23:38:48 +02:00
Lubomir Rintel 85ee1f4a9c platform: give the platform an opportunity to override default-unmanaged
Some out of tree drivers add Ethernet devices that are supposed to be managed
by other their tooling, e.g. VirtualBox or VMWare.

Rather than hardcoding their drivers (at least VirtualBox doesn't even set a
"driver" property in sysfs) or hardcoding a logic that identifies such devices
let's just add a possibility to blacklist them in udev. This makes it possible
for whoever who ships such a driver to ship rules that prevent NetworkManager
from managing the device itself.

Furthermore it makes it possible for the user with special needs leverage the
flexibility of udev rules to override the defaults. In the end the user can
decide to let NetworkManager manage default-unmanaged interfaces such as VEth
or turn on default-unmanaged for devices on a particular bus.

An udev rule for VirtualBox would look like this:

  SUBSYSTEM=="net", ENV{INTERFACE}=="vboxnet[0-9]*", ENV{NM_UNMANAGED}="1"
2015-03-23 15:13:02 +01:00
Dan Winship 849ae9eed6 dispatcher: add an env var indicating a connection is "external"
Add CONNECTION_EXTERNAL=1 to the environment when dispatching actions
on a "generated-assumed" connection (ie, one that was created outside
of NM).
2015-01-19 11:19:33 -05:00
Dan Winship 995da9a5a6 dispatcher: expose connection D-Bus path
src/nm-dispatcher.c was passing the connection's D-Bus path to the
dispatcher, which was then ignoring it. Meanwhile,
test-dispatcher-envp was passing a fake D-Bus path with the wrong name
(which didn't actually matter since
nm_dispatcher_utils_construct_envp() ignored it anyway).

Fix it so that the path gets exposed as CONNECTION_DBUS_PATH, and
adjust the tests for that.
2015-01-19 11:17:37 -05:00
Dan Winship bd2deace70 dispatcher: pass CONNECTION_FILENAME to dispatcher scripts 2015-01-12 09:53:21 -05:00
Jiří Klimeš 9503d35d1e man: fix formatting leftover from man -> xml migration 2014-11-19 16:53:30 +01:00
Jiří Klimeš 3c8dfb91f6 man: update version reference to 1.0 in manual pages 2014-11-19 16:53:30 +01:00
Jiří Klimeš 9a13378753 dispatcher: introduce new env variables for gateway address (bgo #740363)
IP4_GATEWAY
VPN_IP4_GATEWAY
IP6_GATEWAY
VPN_IP6_GATEWAY

We still put gateway into IP[46]_ADDRESS_N for backward compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=740363
2014-11-19 16:52:25 +01:00
Dan Williams 1383f4bc14 dispatcher: use separate directories for pre-up/pre-down events
To ensure that NetworkManager does not block needlessly for events
which have no scripts, require scripts that respond to blocking
events to opt into the action.
2014-06-06 13:43:46 -05:00
Dan Winship bb1c46f66d man: updates to the dispatcher section
Mention that the dispatcher kills slow scripts
(https://bugzilla.redhat.com/show_bug.cgi?id=982734) and that it runs
all scripts that have been queued, even if later events make that
"wrong". (Mentioned in https://bugzilla.gnome.org/show_bug.cgi?id=721971,
although that bug proposes changing this behavior, not documenting it.)
2014-04-18 11:33:20 -04:00
Jiří Klimeš 0bba6e77e5 man: update dispatcher scripts description in NetworkManager(8) manual page 2014-01-27 13:27:41 +01:00