From 151a7133cd069b4813b702420867cc6c584e23f2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 13 Jan 2020 11:22:11 +0100 Subject: [PATCH 1/2] man: document that we mkdir() on What= in .mount units too As suggested here: https://lists.freedesktop.org/archives/systemd-devel/2020-January/043914.html --- man/systemd.mount.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index b2c9d60681..1adcba28e2 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -422,12 +422,16 @@ What= - Takes an absolute path of a device node, file or other resource to mount. See mount8 for details. If - this refers to a device node, a dependency on the respective device unit is automatically created. (See - systemd.device5 for more - information.) This option is mandatory. Note that the usual specifier expansion is applied to this setting, - literal percent characters should hence be written as %%. + Takes an absolute path of a device node, file or other resource to mount. See + mount8 for + details. If this refers to a device node, a dependency on the respective device unit is automatically + created. (See + systemd.device5 + for more information.) This option is mandatory. Note that the usual specifier expansion is applied + to this setting, literal percent characters should hence be written as %%. If this + mount is a bind mount and the specified path does not exist yet it is created as + directory. From f9951b0cf0e5ed4f0c544f28f8acc85a54772d98 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 13 Jan 2020 11:23:14 +0100 Subject: [PATCH 2/2] man: we support bind mounting regular files too Let's be precise here: we accept non-directories here too, even though we create things as directories if we find the Where= not to exist. --- man/systemd.mount.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index 1adcba28e2..fe8a6f00ce 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -436,12 +436,10 @@ Where= - Takes an absolute path of a directory for the - mount point; in particular, the destination cannot be a symbolic - link. If the mount point does not exist at the time of - mounting, it is created. This string must be reflected in the - unit filename. (See above.) This option is - mandatory. + Takes an absolute path of a file or directory for the mount point; in particular, the + destination cannot be a symbolic link. If the mount point does not exist at the time of mounting, it + is created as directory. This string must be reflected in the unit filename. (See above.) This option + is mandatory.