summaryrefslogtreecommitdiff
path: root/src/shared/generator.h
diff options
context:
space:
mode:
authorMichal Koutný <mkoutny@suse.com>2017-01-24 17:04:32 +0100
committerMichal Koutný <mkoutny@suse.com>2017-04-25 18:00:36 +0200
commit4195077ab4c823c385cdc3c868a56178f8d93723 (patch)
treebeff318e11312d7568c8f8d17baff37394228d79 /src/shared/generator.h
parenta2df3ea4ae058693bc7bf203d144e8af3c9493d2 (diff)
downloadsystemd-4195077ab4c823c385cdc3c868a56178f8d93723.tar.gz
fstab-generator: Apply _netdev option also to device units
In case the device field of fstab record is an actual device (not an address) apply same dependencies to the device unit as to the mount unit, i.e. > After=network-online.target network.target > Wants=network-online.targe It makes sense to start the device expecting job only when network is actually ready (consider e.g. iSCSI devices) since it is device's implicit dependency. The eventual implementation should better obtain network flag from udev database and would also take into account device hierarchy (see [1]). This patch approximates that by taking the `_netdev` option as a hint from the user both about the filesystem and underlying device. (For local devices with network filesystems (e.g. ocfs2), this hint leads to unused dependencies.) [1] https://lists.freedesktop.org/archives/systemd-devel/2014-October/024718.html
Diffstat (limited to 'src/shared/generator.h')
-rw-r--r--src/shared/generator.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/generator.h b/src/shared/generator.h
index a6017c1b76..825d934c8e 100644
--- a/src/shared/generator.h
+++ b/src/shared/generator.h
@@ -35,6 +35,12 @@ int generator_write_timeouts(
const char *opts,
char **filtered);
+int generator_write_device_deps(
+ const char *dir,
+ const char *what,
+ const char *where,
+ const char *opts);
+
int generator_write_initrd_root_device_deps(
const char *dir,
const char *what);