diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-01-17 15:09:01 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-02-05 17:31:47 +0100 |
commit | 5c9455657e0d10882b4e6b0eb9c47e8c990dd012 (patch) | |
tree | 2f27d74f5af33ad85b302a96bcde78b3b6e4369a | |
parent | 28c58beca172e3c15c7b4bf128907db05f5c6385 (diff) | |
download | systemd-5c9455657e0d10882b4e6b0eb9c47e8c990dd012.tar.gz |
mount: make checks on perpetual mount units more lax
We don#t really care where perpetual mounts are mounted from, since they
have to exist since before we run anyway.
(cherry picked from commit 0879fbd6fedc2f813aebcb1a4eba005a99525bde)
(cherry picked from commit ea67fd42067b0c4fa9ac7e74b646e3790eccfb82)
-rw-r--r-- | src/core/mount.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index ba1e1af10c..eef362f0c8 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -533,10 +533,9 @@ static int mount_verify(Mount *m) { } p = get_mount_parameters_fragment(m); - if (p && !p->what) { - log_unit_error(UNIT(m), "What= setting is missing. Refusing."); - return -ENOEXEC; - } + if (p && !p->what && !UNIT(m)->perpetual) + return log_unit_error_errno(UNIT(m), SYNTHETIC_ERRNO(ENOEXEC), + "What= setting is missing. Refusing."); if (m->exec_context.pam_name && m->kill_context.kill_mode != KILL_CONTROL_GROUP) { log_unit_error(UNIT(m), "Unit has PAM enabled. Kill mode must be set to control-group'. Refusing."); |