Re: when mount is delayed - start unit which depends on it - ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Sep 17, 2021 at 2:40 PM lejeczek <peljasz@xxxxxxxxxxx> wrote:
Hi guys.

I'm trying to have unit to start...
well,
I have a luks device which waits for manual passphrase
input, when that happens 'systemd' mounts, without user
intervention(which is great), that luks device.
fstab:
/dev/mapper/luks.devs /devs   ext4
noatime,nobarrier,noatime,x-systemd.device-timeout=2,nofail 1 2
and now I'll have many units/services which depend on that
mount, because they need to get to paths to get their
configs & other bits.

Question - how do I make such a unit to re/start when
'systemd' does the mount? Naturally, ideally without any
ways external to 'systemd'.

If units need this mount, then *actually* make them depend on this mount – as in, "Requires=devs.mount" and "After=devs.mount" in each service's [Unit].

--
Mantas Mikulėnas

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux