cli: split 'general' into 'nmcli switch' and 'nmcli general' commands

They basically contain operations previously available via 'nmcli nm'.
'nmcli nm' is still kept for backward compatibility.

Usage:
nmcli switch  [all|networking|wifi|wwan|wimax [on/off]]
nmcli general [status|permissions]

Examples:
nmcli switch all         - show all switches
nmcli switch wifi off    - switch Wi-Fi off

nmcli g s    - show NM status
nmcli g p    - show NM permissions
This commit is contained in:
Jiří Klimeš
2012-12-10 19:11:04 +01:00
committed by Dan Williams
parent 7a8d654691
commit 2bafd7a707
3 changed files with 330 additions and 61 deletions

View File

@@ -88,6 +88,7 @@ usage (const char *prog_name)
"\n"
"OBJECT\n"
" g[eneral] NetworkManager's general status and operations\n"
" s[witch] NetworkManager switches\n"
" c[onnection] NetworkManager's connections\n"
" d[evice] devices managed by NetworkManager\n"
"\n"),
@@ -105,7 +106,8 @@ static const struct cmd {
const char *cmd;
NMCResultCode (*func) (NmCli *nmc, int argc, char **argv);
} nmcli_cmds[] = {
{ "general", do_network_manager },
{ "general", do_general },
{ "switch", do_switch },
{ "connection", do_connections },
{ "device", do_devices },
{ "help", do_help },