I would like to mount one of two partitions to a common mount point based
on an option passed on the kernel's command line. I tried to implement this
with two cfg-A.mount and cfg-B.mount units with an appropriate
ConditionKernelCommandLine=... stanzas, but this did not work because a
.mount unit apparently needs to have a name which exactly matches its
mountpoint. I don't know how I can have two units with a different content
sharing the same unit name, though.
Here's my cfg-A.mount, the other one was very similar:
[Unit]
Description=Persistent configuration: slot A
ConditionKernelCommandLine=rauc.slot=A
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target
After=swap.target
[Mount]
What=/dev/mmcblk0p2
Where=/cfg
Type=auto
Options=relatime,nosuid,nodev
In the end, I kinda-solved this by a custom oneshot service which simply
calls `mount` explicitly, but that's probably not a very systemd-ish
solution.
How should I solve this elegantly?
With kind regards,
Jan
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel