summaryrefslogtreecommitdiff
path: root/src/shared/generator.c
diff options
context:
space:
mode:
authorNeilBrown <neil@brown.name>2017-07-17 18:03:34 +1000
committerLennart Poettering <lennart@poettering.net>2017-07-17 10:03:34 +0200
commitc67bd1f758f087496741ce0b3e227d82c6b4a304 (patch)
tree2a6db919c7221e020372bb4eb2b9b42c353a8db1 /src/shared/generator.c
parent0b9b1771c671040032abcf9a87c2d687247385ce (diff)
downloadsystemd-c67bd1f758f087496741ce0b3e227d82c6b4a304.tar.gz
fstab-generator: ignore x-systemd.device-timeout for non-devices (#6368)
If you specify "x-systemd.device-timeout" for an NFS mount point, you get no warning and a meaningless device unit dependency created. Better to have a warning and no dependency.
Diffstat (limited to 'src/shared/generator.c')
-rw-r--r--src/shared/generator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/generator.c b/src/shared/generator.c
index 2f459bf778..86e9356dd1 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -198,6 +198,10 @@ int generator_write_timeouts(
node = fstab_node_to_udev_node(what);
if (!node)
return log_oom();
+ if (!is_device_path(node)) {
+ log_warning("x-systemd.device-timeout ignored for %s", what);
+ return 0;
+ }
r = unit_name_from_path(node, ".device", &unit);
if (r < 0)