On Fri, Sep 17, 2021 at 2:40 PM lejeczek <pelj...@yahoo.co.uk> 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

Reply via email to