Jiří Klimeš
e29b844f42
cli: produce new line after readline when echoing was off
...
The new line was missing.
Adding termios_new.c_lflag |= (ECHONL | ICANON); did not help. Why?
Fixes: a14306c2ce
2015-12-07 17:33:03 +01:00
Jiří Klimeš
629de4e689
cli: add global --show-secrets option
...
- it controls echoing passwords input on terminal
- it replaces --show-secrets in 'nmcli connection show', which is deprecated now
- it replaces --show-password in 'nmcli device wifi hotspot', which is deprecated now
2015-12-07 14:14:58 +01:00
Jiří Klimeš
23aff47826
cli: use nmc_readline_echo() for asking password in 'nmcli con add'
2015-12-07 14:14:58 +01:00
Jiří Klimeš
1056408fd4
cli: use nmc_readline_echo() for asking password in 'nmcli dev wifi connect'
2015-12-07 14:14:58 +01:00
Jiří Klimeš
02388060c1
cli: use new nmc_readline_echo() in polkit agent
2015-12-07 14:14:58 +01:00
Jiří Klimeš
a14306c2ce
cli: do not echo passwords on terminal when asking for them
...
adds nmc_readline_echo() function that can disable displaying characters.
2015-12-07 14:14:58 +01:00
Lubomir Rintel
da528b5ccd
cli: drop an extra newline
2015-12-07 11:23:39 +01:00
Lubomir Rintel
b38a5f4cb4
cli: avoid using tmp template after it goes out of scope
...
Fixes: 3892b839af
2015-12-07 11:05:52 +01:00
Lubomir Rintel
4ffed27959
cli: improve the error reporting a bit
2015-12-07 10:51:49 +01:00
Jiří Klimeš
3892b839af
cli: add 'nmcli connection export' (rh #1034105 )
...
Synopsis:
nmcli connection export [ id | uuid | path] <ID> [<output file>]
for exporting VPN connections.
https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:20 +01:00
Jiří Klimeš
9a0e4bae47
cli: add 'nmcli connection import' (rh #1034105 )
...
Synopsis:
nmcli connection import [--temporary] type <type> file <file to import>
Only VPN configurations can be imported at the moment.
https://bugzilla.redhat.com/show_bug.cgi?id=1034105
2015-12-07 09:11:06 +01:00
Lubomir Rintel
d03f347b9d
cli: add nmcli monitor
...
https://bugzilla.redhat.com/show_bug.cgi?id=1034158
2015-12-05 12:16:23 +01:00
Lubomir Rintel
e92e06bdc7
cli,connections: add connection monitor
2015-12-05 12:16:06 +01:00
Lubomir Rintel
9b49284f0c
cli,devices: add device monitor
2015-12-05 12:16:04 +01:00
Lubomir Rintel
2a646a74dd
cli,devices: factor out parsing of the interface list
...
This is duplicated already and the monitor will use it.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
225f6594c4
cli,devices: factor out device_state_to_color()
...
We'll use this for device status monitor too.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
88ae8d2b13
cli: turn should_wait into a semaphore
...
Count the exit blockers. We'll want to terminate the device monitor in case all
monitored devices vanish.
2015-12-05 12:05:17 +01:00
Lubomir Rintel
67caad44c3
cli: move the decision whether to use colors to nmc_colorize()
...
This allows us to use a conditionally colorized output outside
print_required_fields().
2015-12-05 12:05:17 +01:00
Jiří Klimeš
4c437863fa
cli: remove duplicated checks for running Networkmanager
...
It is already performed in do_connections().
2015-12-03 16:12:26 +01:00
Beniamino Galvani
b614a5ec61
cli: add support for IP tunnel settings
2015-12-01 17:39:41 +01:00
Jiří Klimeš
cb049d2500
cli: allow TAB-completion for tun.mode in nmcli editor
...
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
d374352b99
cli: allow TAB-completion of "Mode:" in 'nmcli -a con add type tun'
...
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
18b7a9a42f
cli: ask user before requiring optional parameters for 'nmcli -a con add type tun'
...
Fixes: 64c6b124d2
2015-11-28 19:48:02 +01:00
Jiří Klimeš
6ffe4b61f7
cli: fix an error in setting s390-options in nmcli editor
...
nmcli> set eth.s390-options portno=
(process:4711): libnm-CRITICAL **: nm_setting_wired_add_s390_option: assertion 'value_len > 0 && value_len < 200' failed
2015-11-28 19:48:02 +01:00
Jiří Klimeš
5f9b8b887d
cli: fix an error in nmcli editor when setting vpn.data/vpn.secrets
...
nmcli> set vpn.data haha=
(process:3951): libnm-CRITICAL **: nm_setting_vpn_add_data_item: assertion 'strlen (item) > 0' failed
nmcli> set vpn.secrets haha=
(process:3951): libnm-CRITICAL **: nm_setting_vpn_add_secret: assertion 'strlen (secret) > 0' failed
2015-11-28 19:48:02 +01:00
Jiří Klimeš
1b0be2bab0
cli: fix a crash in 'nmcli -a con clone'
...
when providing empty arguments.
Fixes: 0c65b28960
2015-11-28 19:48:02 +01:00
Jiří Klimeš
4a06701e88
cli: add 'strongswan' and 'fortisslvpn' to known VPN types
2015-11-25 17:14:02 +01:00
Jiří Klimeš
579fd36566
cli: improve error messages for 'nmcli device set'
...
Fixes: 4dffbf8f6a
2015-11-25 16:39:00 +01:00
Beniamino Galvani
c223e811f1
nmcli/bash-completion: add completion for 'tun' connection mode
2015-11-25 11:53:04 +01:00
Beniamino Galvani
64c6b124d2
cli: add support for tun settings
...
Add nmcli support for adding and modifying TUN/TAP connections.
2015-11-25 11:39:57 +01:00
Jiří Klimeš
847f3b646b
cli: make a prompt a translatable string in do_connection_clone()
...
Fixes: 0c65b28960
2015-11-24 15:22:06 +01:00
Beniamino Galvani
cba0f4e3c4
cli: add ipv4.dhcp-fqdn property
2015-11-23 22:09:06 +01:00
Joel Holdsworth
8051038b4d
build/nmcli: make nmcli build optional
...
https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00043.html
https://mail.gnome.org/archives/networkmanager-list/2015-November/msg00063.html
2015-11-19 13:51:59 +01:00
Dan Williams
06442276c9
cli: add support for GSM setting device-id, sim-id, and sim-operator-id properties
2015-11-18 15:50:52 +01:00
Dan Williams
3ac82f2c75
nmcli: add support for WiFi MAC address randomization property
2015-11-18 15:37:42 +01:00
Jiří Klimeš
0c65b28960
cli: add 'nmcli connection clone' for cloning connections (bgo #757627 )
...
Synopsis:
nmcli connection clone [--temporary] [id|uuid|path] <ID> <new name>
It copies the <ID> connection as <new name>. The command is very useful
if there is a connection, but another one is needed for a related
configuration. One can copy the existing profile and modify it for the
new situation.
For example:
$ nmcli con clone main-eth second-eth
$ nmcli con modify second-eth connection.interface-name em4
https://bugzilla.gnome.org/show_bug.cgi?id=757627
2015-11-18 09:37:44 +01:00
Jiří Klimeš
b92397f925
all: fix typos in the code and update translations for that (bgo #758102 )
...
Found by Anders Jonsson <anders.jonsson@norsjovallen.se>
https://bugzilla.gnome.org/show_bug.cgi?id=758102
2015-11-16 14:29:14 +01:00
Lubomir Rintel
4b7cb5a634
nmcli/bash-completion: fix --show-password parsing
...
Fixes: 2f52a10be1
2015-11-12 13:49:55 +01:00
Jiří Klimeš
0dc48370b4
cli: print a warning if BSSID is given instead of SSID for hidden AP
...
$ nmcli dev wifi connect 00:22:6B:EB:1D:CA hidden yes
Warning: '00:22:6B:EB:1D:CA' should be SSID for hidden APs; but it looks like a BSSID.
Error: Failed to add/activate new connection: 802-11-wireless.ssid: connection does not match access point
2015-11-11 09:47:51 +01:00
Beniamino Galvani
5b3137984d
cli: add command for displaying LLDP neighbors
...
The list of LLDP neighbors is available through the D-Bus interface
and libnm already provides functions to retrieve it; make the list
available through nmcli as well. Sample output:
$ nmcli device lldp
NEIGHBOR[0].DEVICE: eth0
NEIGHBOR[0].CHASSIS-ID: 00:13:21:58:CA:42
NEIGHBOR[0].PORT-ID: 1
NEIGHBOR[0].PORT-DESCRIPTION: 1
NEIGHBOR[0].SYSTEM-NAME: ProCurve Switch 2600-8-PWR
NEIGHBOR[0].SYSTEM-DESCRIPTION: ProCurve J8762A Switch 2600-8-PWR, revision H.08.89
NEIGHBOR[0].SYSTEM-CAPABILITIES: 20 (mac-bridge,router)
NEIGHBOR[1].DEVICE: eth2
NEIGHBOR[1].CHASSIS-ID: 00:01:30:F8:AD:A2
NEIGHBOR[1].PORT-ID: 1/1
NEIGHBOR[1].PORT-DESCRIPTION: Summit300-48-Port 1001
NEIGHBOR[1].SYSTEM-NAME: Summit300-48
NEIGHBOR[1].SYSTEM-DESCRIPTION: Summit300-48 - Version 7.4e.1 (Build 5)
NEIGHBOR[1].SYSTEM-CAPABILITIES: 20 (mac-bridge,router)
https://bugzilla.gnome.org/show_bug.cgi?id=757307
2015-11-10 14:06:02 +01:00
Jiří Klimeš
2f52a10be1
cli: add '--show-password' option for 'nmcli device wifi hotspot'
...
It is useful to show nmcli-generated hotspot password (if a user does not
provide his own password). Without the option the user would have to look into
the generated profile in order to find out the password.
2015-11-10 09:15:06 +01:00
Jiří Klimeš
781d24f1dd
cli: add 'password' option for 'nmcli device wifi hotspot'
...
It allows user provided password to be used to secure the hotspot.
Otherwise, nmcli will generate a suitable password.
2015-11-10 09:10:48 +01:00
Jiří Klimeš
d6427d7198
cli: add 'nmcli device wifi hotspot' command
...
Synopsis:
nmcli device wifi hotspot [ifname <ifname>] [con-name <name>] [ssid <SSID>]
[band a|bg] [channel <channel>]
2015-11-10 09:08:05 +01:00
Jiří Klimeš
cd217db21c
cli: move unique_connection_name() to common.c as nmc_unique_connection_name()
2015-11-09 16:17:39 +01:00
Thomas Haller
6a82b4e2ed
cli: fix nmcli device set DEV managed true
...
Fixes: 4dffbf8f6a
2015-11-06 14:52:11 +01:00
Lubomir Rintel
4d6649fa0e
cli: add addr-gen-mode property
2015-11-02 20:27:00 +01:00
Jiří Klimeš
689de5c94a
vlan: (all) add VLAN MVRP flag
...
http://patchwork.ozlabs.org/patch/219364/
2015-10-27 17:17:05 +01:00
Jiří Klimeš
696a443e98
cli: improve error reporting of missing 'ifname' parameter
...
Example:
before:
$ nmcli c add type gsm con-nameX aaa ifname fsd
Error: 'ifname' argument is required.
now:
$ nmcli c add type gsm con-nameX aaa ifname fsd
Error: mandatory 'ifname' not seen before 'con-nameX'.
2015-10-23 12:28:29 +02:00
Jiří Klimeš
b45bd96d89
cli: trivial: correct argument description for nmc_parse_args()
2015-10-23 12:28:29 +02:00
Jiří Klimeš
91dde2c865
nmcli: fix bash completion of words containing colon (rh #1271271 )
...
Test:
$ sudo ip link add a🅱️ c type dummy
$ nmcli device delete<Tab><Tab>
$ nmcli device delete a<Tab>
See also:
http://stackoverflow.com/questions/28479216/how-to-give-correct-suggestions-to-tab-complete-when-my-words-contains-colons
http://stackoverflow.com/questions/2805412/bash-completion-for-maven-escapes-colon/12495727
Related: https://bugzilla.gnome.org/show_bug.cgi?id=745157
https://bugzilla.redhat.com/show_bug.cgi?id=1271271
2015-10-20 12:00:39 +02:00