Commit Graph

192 Commits

Author SHA1 Message Date
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
Jiří Klimeš
a3c52d7a33 man: add description of BOOTPROTO to nm-settings-ifcfg-rh manpage 2015-01-15 13:03:13 +01:00
Dan Winship
bd2deace70 dispatcher: pass CONNECTION_FILENAME to dispatcher scripts 2015-01-12 09:53:21 -05:00
Jiří Klimeš
da4a98bfbb man: allow installing pre-built manual pages if we can't build it
If we have ENABLE_GTK_DOCS, but not BUILD_SETTING_DOCS, nm-settings.5
nm-settings-keyfile.5 and nm-settings-ifcfg-rh.5 would not be installed.

(It happened on RHEL 7 build, due to missing BuildRequires: pygobject3-base)
2014-12-11 17:05:36 +01:00
Jiří Klimeš
4a7c88621d cli: fix deactivation for multiple connections (bgo #740775) (rh #1168383)
$ nmcli connection down aa bb cc

It has been broken by commit 20566c76de.

Fixups by dcbw.

https://bugzilla.gnome.org/show_bug.cgi?id=740775
https://bugzilla.redhat.com/show_bug.cgi?id=1168383
2014-12-03 10:54:49 +01:00
Dan Winship
93799e68ba man: document the "internal" DHCP client 2014-11-19 12:03:03 -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
Jiří Klimeš
07bd9a1b76 man: ifcfg-rh manual page text update 2014-11-19 09:24:10 -05:00
Dan Winship
c7341c982d man, docs: add the secret flags notes non-hackishly
Since libnm-core secret-flags properties are now enum-typed rather
than just being uints, we can now actually recognize them when
generating docs, rather than just assuming that every property whose
name ends in '-flags', but isn't in NMSettingDcb, is a secret-flags
property.
2014-11-19 09:24:10 -05:00
Dan Winship
c14486984e libnm, libnm-util: move settings doc generation to libnm-core
Move the settings/plugins doc generation from libnm-util to
libnm-core, since libnm-util isn't being updated for all new
properties.

With this commit, the keyfile and ifcfg-rh documentation is basically
unchanged, except that deprecated properties are now gone, and new
properties have been added, and the sections are in a different order.
(generate-plugin-docs.pl just outputs the settings in Makefile order,
and they were unsorted in libnm-util, but are sorted in libnm-core).

The settings documentation used for nm-settings.5, the D-Bus API docs,
and the nmcli help is changed a bit more at this point, and mostly for
the worse, since the libnm-core setting properties don't match up with
the D-Bus API as well as the libnm-util ones do. To be fixed...

(I also removed the "plugins docs" line in each plugin docs comment
block while moving them, since those blocks will be used for more than
just plugins soon, and it's sort of obvious anyway.)
2014-11-19 09:24:09 -05:00
Jiří Klimeš
3889ff864c man: update nmcli-examples manual page 2014-11-19 15:21:34 +01:00
Jiří Klimeš
3595bef178 man: fix a typo in nmtui manual page 2014-11-19 13:22:28 +01:00
Dan Winship
16a9fc49dd docs: make the settings docs work from tarball builds
docs/api/settings-spec.xml was accidentally not getting disted,
because gtk-doc.make explicitly removes all DISTCLEANFILES from
distdir. However, it doesn't actually make sense for the settings docs
files to be in DISTCLEANFILES anyway; they were put there rather than
CLEANFILES (IIRC) so that "make clean" in a tarball build wouldn't
delete them and break things. But the right fix is to just make them
only be in CLEANFILES when BUILD_SETTING_DOCS is true, and not ever
get deleted otherwise.

Also adjust the build rules to ensure that the generated docs don't
get rebuilt in tarball builds, since that can cause problems when
building from a read-only source tree, etc.

Meanwhile, in an unrelated but also fatal bug, configure.ac's check
for if the generated docs were already present never got updated for
the cli/src -> clients/cli move, and so even if we had been disting
settings-spec.xml, configure would still think that the tarball didn't
have all of the generated docs in it, so SETTING_DOCS_AVAILABLE would
be set false and none of the generated docs would get used.

https://bugzilla.gnome.org/show_bug.cgi?id=740035
2014-11-14 17:14:18 -05:00
Thomas Haller
dd9bb5f376 man: fix make uninstall to remove the nmtui manual pages
Fixes: 1e8b681d4f
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-12 17:40:05 +01:00
Thomas Haller
1e8b681d4f man: add manual page for nmtui(1)
https://bugzilla.gnome.org/show_bug.cgi?id=739710

Branch: th/bgo739710_man_nmtui
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-11 16:01:38 +01:00
Jiří Klimeš
9ff8c01d4a man: document 'configure-and-quit' configuration option 2014-11-07 12:18:33 -06:00
Jiří Klimeš
3a551664df cli: add 'nmcli agent' command (bgo #739568)
Synopsis:
nmcli agent { secret | polkit | all }

The command runs separate NetworkManager secret agent or session polkit agent, or both.
It is useful when
- no other secret agent is available (such as GUI nm-applet, gnome-shell, KDE applet)
- no other polkit agent is available (such as polkit-gnome-authentication-agent-1,
  polkit-kde-authentication-agent-1 or lxpolkit)

https://bugzilla.gnome.org/show_bug.cgi?id=739568
2014-11-07 11:58:25 +01:00
Jiří Klimeš
252c8bf4ed man: document/clarify --ask option in relation to password prompting 2014-11-07 09:57:36 +01:00
Jiří Klimeš
3c9b8671fa cli: add 'passwd-file' option for 'nmcli connection up' to provide passwords
It is useful for running nmcli without --ask option, i.e. non-interactively.

Example contents of the file:
wifi.psk: s e c r e t 12345
802-1x.password:kili manjaro
802-1x.pin:987654321
2014-11-07 09:32:32 +01:00
Lubomir Rintel
1f275a980a Merge branch 'lr/ap'
https://bugzilla.gnome.org/show_bug.cgi?id=738439
2014-10-31 15:35:20 +01:00
Jiří Klimeš
1a64683802 cli: add '--show-secrets' option for 'nmcli connection show'
It can be used to display connection secrets (passwords).  When used, it will
get secrets for the connection profile and merge it into the connection's
settings before displaying it.

Example:
nmcli con show -s hotel-wifi
2014-10-30 09:11:43 +01:00
Thomas Haller
f77b8460d0 man: add description for ibft settings plugin to NetworkManager.conf
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-29 15:17:55 +01:00
Lubomir Rintel
1c9b16b2f2 cli: Add mode option for wifi connecitons
Only default (infrastructure) mode connections can be created and as it's not
possible to write mode=ap connections with ifcfg-rh plugins, they can't be
switched to mode=ap.
2014-10-23 18:34:39 +02:00
Jiří Klimeš
0bc11cb730 man: add an example for ifcfg configuration of bridges 2014-10-23 17:37:39 +02:00
Thomas Haller
bdea7d61d0 logging: add new logging level "TRACE"
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-05 18:24:36 +02:00
Thomas Haller
eabe7d856c auth: rework polkit autorization to use DBUS interface directly
This makes NetworkManager independent of <polkit/polkit.h>
development headers and libpolkit-gobject-1.so library.
Instead communicate directly with polkit using its DBUS
interface.

PolicyKit support is now always compiled in. You can control
polkit authorization with the configuration option
  [main]
  auth-polkit=yes|no

If the configure option is omitted, a build time default
value is used. This default value can be set with the
configure option --enable-polkit.

This commit adds a new class NMAuthManager that reimplements the
relevant DBUS client parts. It takes source code from the polkit
library.

https://bugzilla.gnome.org/show_bug.cgi?id=734146

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-29 13:51:11 +02:00
Thomas Haller
63a8c6a184 build: generate man/NetworkManager.conf.xml by autoconf
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-29 13:00:11 +02:00
Dan Williams
3adeffe1f1 man: clarify that keyfile is a fallback if no distro plugin is present
Distro plugins are intended to be used by default, and keyfile only if
distro plugins cannot read/write certain connection types.
2014-09-23 12:22:22 -05:00
Jiří Klimeš
6ed48691f7 man: add/update bonding and team examples in nm-settings-ifcfg-rh 2014-09-01 14:17:45 +02:00
Jiří Klimeš
f27fac5109 man: generate nm-settings-ifcfg-rh(5) manual page 2014-08-29 13:59:54 +02:00
Jiří Klimeš
24edee2772 man: generate nm-settings-keyfile(5) manual page
man/nm-settings-keyfile.xml is generated via an XSLT stylesheet applied to
libnm-util/nm-keyfile-docs.xml. Then a manual page is generated from the XML.
2014-08-29 13:59:54 +02:00
Jiří Klimeš
def5d6c3a7 trivial: only use spaces in nm-setting.xml
Do not mix tabs and spaces for indentation, only use spaces.
2014-08-28 19:04:14 +02:00
Jiří Klimeš
c7a567ca90 cli: add 'nmcli device delete <ifname>' command (rh #1034150)
It only works for software devices. When called for a hardware device,
an error is returned and the device is not deleted.

https://bugzilla.redhat.com/show_bug.cgi?id=1034150
2014-07-22 14:24:43 +02:00
Dan Winship
377f72a66f build: fix nm-setting-docs build in various configurations
Certain build configurations (like --enable-gtk-doc
--disable-introspection) were broken with respect to nm-setting-docs.
Fix this. Also, we don't require just gobject-introspection, we need
pygobject specifically as well.
2014-06-27 17:24:57 -04:00
Dan Winship
a3d02ddeef man: generate nm-settings.xml from libnm-util/nm-setting-docs.xml
Generate man/nm-settings.xml via an XSLT stylesheet applied to
libnm-util/nm-setting-docs.xml.
2014-06-19 17:45:02 -04:00
Jiří Klimeš
1553607223 man: clarify an nmcli example for adding static addresses in nmcli-examples 2014-06-16 12:48:04 +02: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
Pavel Šimerda
186e4dcf7a dns: preliminary support for unbound (bgo #699810)
The script is called synchronously from NetworkManager so it can handle
asynchronicity itself. The long-term plan is to incorporate the script
partially into the new plugin and partially into a dnssec-trigger
library which will be used instead of dnssec-trigger daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=699810

Acked-By: Thomas Haller <thaller@redhat.com>
Acked-By: Dan Williams <dcbw@redhat.com>
2014-05-30 21:29:26 +02:00
Jiří Klimeš
e88979a354 cli: add optional 'mac' argument for 'nmcli con add type bridge'
This allows setting bridge MAC either on command-line
nmcli con add type bridge con-name mybridge mac 11:22:33:44:55:66
or provide it when asked
nmcli -a con add type bridge con-name mybridge
2014-05-30 17:02:31 +02:00
Jiří Klimeš
d7216505bb cli: do not restrict VPN type of created connections (rh #1100750)
There may be third-party VPN plugins nmcli is not aware of.
We still print a warning if nmcli doesn't know the type. It helps to catch up
typos.

https://bugzilla.redhat.com/show_bug.cgi?id=1100750
2014-05-28 09:37:15 +02:00
Dan Winship
aba55670cc man: clarify the meaning of "nm-online --wait-for-startup"
https://bugzilla.gnome.org/show_bug.cgi?id=700651
2014-05-27 10:53:53 -04:00
Thomas Haller
b5ffcf46f1 doc: update documentation to show all logging domains
Also, mention the deprecated alias HW in man/NetworkManager.conf

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-12 19:12:28 +02:00
Thomas Haller
4a22cefc6c core: add configuration main.debug and interpret environment variable NM_DEBUG
Interpret the configuration option main.debug and the
environment variable NM_DEBUG as a comma separated list
of debugging options (parsed with g_parse_debug_string()).

Currently only the option "RLIMIT_CORE" is supported, to set
the core dump size to unlimited.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-02 11:08:14 +02:00
Thomas Haller
516d66210f core: wait with "startup complete" for both IPv4 and IPv6 dynamic configuration
In case of DHCP4, DHCP6 and/or SLAAC, delay "startup complete" until
both IPv4 and IPv6 are ready. This especially has an effect on
nm-online/NetworkManager-wait-online.service, which blocks until
configuration of both IPv4 and IPv6 is ready.

We queue a pending_action when automatic configuration starts and
remove it again, when we receive an address. Before, "startup complete"
was reached when either one of the two IP protocols was configured.

https://bugzilla.redhat.com/show_bug.cgi?id=1086906

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-01 22:06:52 +02:00
Thomas Haller
9305c5bbf7 man/cli: add missing log domains to manual page and nmcli bash completion
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-04-24 17:27:47 +02: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š
b3cbb260ef man: use correct Mbit/s for maximum bitrate in nmcli-examples 2014-04-01 15:15:18 +02:00