diff --git a/src/core/automount.c b/src/core/automount.c index e01b3ed9d34..cbcc8abb2b1 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -224,7 +224,7 @@ static int automount_load(Unit *u) { assert(u->load_state == UNIT_STUB); /* Load a .automount file */ - r = unit_load_fragment_and_dropin_optional(u); + r = unit_load_fragment_and_dropin(u); if (r < 0) return r; diff --git a/src/core/swap.c b/src/core/swap.c index cfe9d91cedb..f37a81f56c7 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -292,7 +292,10 @@ static int swap_load(Unit *u) { assert(u->load_state == UNIT_STUB); /* Load a .swap file */ - r = unit_load_fragment_and_dropin_optional(u); + if (SWAP(u)->from_proc_swaps) + r = unit_load_fragment_and_dropin_optional(u); + else + r = unit_load_fragment_and_dropin(u); if (r < 0) return r;