On Do, 20.10.22 09:18, kAja Ziegler (ziegl...@gmail.com) wrote:

> Hello,
>
> Is there any way to turn off the automatic directory (directories) creation
> during mount unit start/run? To make the [auto-generated] mount unit behave
> the same as the mount command - to end with an error?

Add a .mount drop-in for your unit that sets AssertPathExists= to your
path in the [Unit] section.

i.e. create /etc/systemd/system/mnt-x.mount.d/50-myassert.conf, and
add:

    [Unit]
    AsserPathExists=/mnt/x

into it.

Lennart

--
Lennart Poettering, Berlin

Reply via email to