tmp.mount.hm4: After swap.target - #3087
Conversation
fix issue #2930
|
Hm, shouldn't we also add this to tmp.mount units that are generated via /etc/fstab to be consistent? |
Dunno. We could, but after all, the point of adding |
|
I agree with @keszybz i must say. |
|
my main concern is, that most users probably won't add x-systemd.requires=swap.target simply because they don't know, they should. Can we at least fix this with better documentation (somewhere) then? |
|
OTOH, adding Requires makes things more prone to error (most systems will run just fine without swap.target, so Wants, as added in this PR, is much more appropriate). So I'd first add support for x-systemd.wants= in the fstab, and then add a recommendation to use x-systemd.wants=swap.target. |
|
@mbiebl I don't think that "most" users really should add that. People generally add an fstab entry for /tmp to make it a physical disk. But in that case it doesn't matter whether it is unmounted before or after the swap is torn down. I mean, if you want /tmp to be on tmpfs, then you use our defaults. You only would add an fstab entry for /tmp, if you really don't want our defaults. |
|
@keszybz i don't think that either Wants= or Requires= is right here. After= is fully sufficient. Whether swap is enabled or not, should be an admin decision, but not a requirement of mounting /tmp! |
|
Right, After is even better. But we only provide x.systemd-requires=. Maybe we should add x.systemd-{wants,after,before}=. |
fix issue systemd#2930 Cherry-picked from: a11fe93 Resolves: #1298355
fix issue systemd#2930 (cherry picked from commit a11fe93)
fix issue #2930