diff options
-rw-r--r-- | src/network/networkctl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index b7b3b51325..27a758152e 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -1064,6 +1064,14 @@ static int networkctl_main(int argc, char *argv[]) { return dispatch_verb(argc, argv, verbs, NULL); } +static void warn_networkd_missing(void) { + + if (access("/run/systemd/netif/state", F_OK) >= 0) + return; + + fprintf(stderr, "WARNING: systemd-networkd is not running, output will be incomplete.\n\n"); +} + int main(int argc, char* argv[]) { int r; @@ -1074,6 +1082,8 @@ int main(int argc, char* argv[]) { if (r <= 0) goto finish; + warn_networkd_missing(); + r = networkctl_main(argc, argv); finish: |