[systemd-devel] when mount is delayed - start unit which depends on it - ?
Mantas Mikulėnas
grawity at gmail.com
Sat Sep 18 08:41:21 UTC 2021
On Fri, Sep 17, 2021 at 2:40 PM lejeczek <peljasz at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210918/031b7527/attachment.htm>
More information about the systemd-devel
mailing list