diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-15 03:06:11 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-15 03:10:20 +0200 |
commit | 2301cb9fdb774d0a1b3d8f5e95c5d358721ccacb (patch) | |
tree | e1503933f0b24ec4a7b83e7dc7e60f90d89a4f7f /src/network | |
parent | 708281b81177f3a32d11770126727737a6a69483 (diff) |
networkctl: print local domain name in status output
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 8e02188884..25097bbdf1 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -288,7 +288,7 @@ static void dump_list(const char *prefix, char **l) { } static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) { - _cleanup_strv_free_ char **dns = NULL, **ntp = NULL; + _cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **domains = NULL; _cleanup_free_ char *setup_state = NULL, *operational_state = NULL; _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL, *reply = NULL; _cleanup_udev_device_unref_ struct udev_device *d = NULL; @@ -364,6 +364,7 @@ static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) { sd_network_link_get_dns(ifindex, &dns); sd_network_link_get_ntp(ifindex, &ntp); + sd_network_link_get_domains(ifindex, &domains); sprintf(devid, "n%i", ifindex); d = udev_device_new_from_device_id(udev, devid); @@ -411,6 +412,8 @@ static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) { if (!strv_isempty(dns)) dump_list(" DNS: ", dns); + if (!strv_isempty(domains)) + dump_list(" Domains: ", domains); if (!strv_isempty(ntp)) dump_list(" NTP: ", ntp); |