Commit a453563b authored by Jiří Klimeš's avatar Jiří Klimeš

cli: remove RUNNING field from default 'common' fields

That way it is not displayed by default:
$ nmcli general status

But can be explicitly requested:
$ nmcli -t -f running,version general status
$ nmcli -f all general status

E.g. Fedora initscripts do this in
/etc/sysconfig/network-scripts/network-functions

is_nm_running ()
{
    [ "$(LANG=C nmcli -t --fields running nm status 2>/dev/null)" = "running" ]
}
parent 6850dccd
......@@ -55,7 +55,7 @@ static NmcOutputField nmc_fields_nm_status[] = {
#define NMC_FIELDS_NM_STATUS_SWITCH "NETWORKING,WIFI-HW,WIFI,WWAN-HW,WWAN"
#define NMC_FIELDS_NM_STATUS_RADIO "WIFI-HW,WIFI,WWAN-HW,WWAN"
#endif
#define NMC_FIELDS_NM_STATUS_COMMON "RUNNING,STATE,WIFI-HW,WIFI,WWAN-HW,WWAN"
#define NMC_FIELDS_NM_STATUS_COMMON "STATE,WIFI-HW,WIFI,WWAN-HW,WWAN"
#define NMC_FIELDS_NM_NETWORKING "NETWORKING"
#define NMC_FIELDS_NM_WIFI "WIFI"
#define NMC_FIELDS_NM_WWAN "WWAN"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment