]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkctl: add field 'Required For Online'
authorDan Streetman <ddstreet@canonical.com>
Wed, 9 Jun 2021 11:57:01 +0000 (07:57 -0400)
committerDan Streetman <ddstreet@canonical.com>
Thu, 24 Jun 2021 12:32:21 +0000 (08:32 -0400)
src/network/networkctl.c

index 1c2cb7691a42a965b0bd47ce1aa66529bf44f5d1..6035a7728a8a207a66275d2aa0d3db1d6656e1b7 100644 (file)
@@ -2226,6 +2226,16 @@ static int link_status_one(
                         return table_log_add_error(r);
         }
 
+        r = sd_network_link_get_required_for_online(info->ifindex);
+        if (r >= 0) {
+                r = table_add_many(table,
+                                   TABLE_EMPTY,
+                                   TABLE_STRING, "Required For Online:",
+                                   TABLE_BOOLEAN, r);
+                if (r < 0)
+                        return table_log_add_error(r);
+        }
+
         if (lease) {
                 const void *client_id;
                 size_t client_id_len;