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.
This commit is contained in:
NeilBrown
2017-07-17 10:03:34 +02:00
committed by Lennart Poettering
parent 0b9b1771c6
commit c67bd1f758
+4
View File
@@ -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)