return false;
}
+static bool mount_is_nofail(const Mount *m) {
+ assert(m);
+
+ if (!m->from_fragment)
+ return false;
+
+ return fstab_test_yes_no_option(m->parameters_fragment.options, "nofail\0" "fail\0");
+}
+
static bool mount_is_loop(const MountParameters *p) {
assert(p);
UnitDependencyMask mask) {
const char *after, *before, *e;
- bool nofail;
int r;
assert(m);
- nofail = m->from_fragment ? fstab_test_yes_no_option(m->parameters_fragment.options, "nofail\0" "fail\0") : false;
-
e = path_startswith(m->where, "/sysroot");
if (e && in_initrd()) {
/* All mounts under /sysroot need to happen later, at initrd-fs.target time. IOW,
before = SPECIAL_LOCAL_FS_TARGET;
}
- if (!nofail && !mount_is_automount(p)) {
+ if (!mount_is_nofail(m) && !mount_is_automount(p)) {
r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, before, true, mask);
if (r < 0)
return r;