summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-11-06 08:39:24 +0100
committerGitHub <noreply@github.com>2024-11-06 08:39:24 +0100
commitddcdc6b365941878c02c13d73d4f0a3f778ad380 (patch)
treeefa6997d001285788aa3393198f7c6837f670341 /src/network
parenttest: delete /swapfile after swapoff (diff)
parentnetwork: use path_is_network_fs_harder() (diff)
downloadsystemd-ddcdc6b365941878c02c13d73d4f0a3f778ad380.tar.xz
systemd-ddcdc6b365941878c02c13d73d4f0a3f778ad380.zip
mount-util: introduce path_is_network_fs_harder() and use it in networkd (#35040)
Closes #32426.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-manager.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 476e02fd28..38013994c8 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -31,6 +31,7 @@
#include "fs-util.h"
#include "initrd-util.h"
#include "local-addresses.h"
+#include "mount-util.h"
#include "netlink-util.h"
#include "network-internal.h"
#include "networkd-address-label.h"
@@ -59,7 +60,6 @@
#include "selinux-util.h"
#include "set.h"
#include "signal-util.h"
-#include "stat-util.h"
#include "strv.h"
#include "sysctl-util.h"
#include "tclass.h"
@@ -508,9 +508,11 @@ static int manager_set_keep_configuration(Manager *m) {
return 0;
}
- r = path_is_network_fs("/");
- if (r < 0)
- return log_error_errno(r, "Failed to detect if root is network filesystem: %m");
+ r = path_is_network_fs_harder("/");
+ if (r < 0) {
+ log_warning_errno(r, "Failed to detect if root is network filesystem, assuming not: %m");
+ return 0;
+ }
if (r == 0) {
m->keep_configuration = _KEEP_CONFIGURATION_INVALID;
return 0;