]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/mount.c
mount: make checks on perpetual mount units more lax
[thirdparty/systemd.git] / src / core / mount.c
index 12b2e512e824102b0874431043c51c80ccb2807d..668c4d7e8955f89db286962623f340796ffddd04 100644 (file)
@@ -537,10 +537,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.");