The title says it all doesn't it? Let me try to explain what I'm trying to do:I have a partition (mmcblk0p9) that may or may not exist. If it does exist, it contains a /var directory to be mounted over the top of /var on the rootfs partition. (Therefore, the /var on the rootfs partition acts as a backup in case we're not able to mount the real /var).The problem seems to be that the dependencies of a unit seem to be checked before the conditions.This is my mnt-data.mount (located in /etc/systemd/system/)[Unit]Description=Data PartitionConflicts=shutdown.target rescue.serviceConditionPathExists=/dev/mmcblk0p9ConditionKernelCommandLine=|boot_a |boot_b[Mount]What=/dev/mmcblk0p9Where=/mnt/dataType=ext4Options=noexec,rwAs you can see, /mnt/data is the mount point for mmcblk0p9 but is conditional upon /dev/mmcblk0p9 existing and the passing of either of two parameters in the kernel bootparam's.This is my var.mount (located in /etc/systemd/system/local-fs.target.wants/):[Unit]Description=Bind Data's var directory at /varConflicts=shutdown.target rescue.serviceAfter=mnt-data.mountConditionPathIsMountPoint=/mnt/data[Mount]What=/mnt/data/varWhere=/varType=noneOptions=bindAs you can see, I am trying to make this mount operation conditional upon whether mnt-data.mount was successful in creating a mount point at /mnt/data.What I am expecting to see is that when it comes time for mnt-data.mount to start, it will not fail, but skip based on the conditions not matching. Then when var.mount is to start, it would also skip based on /mnt/data/ not being a mount point.Instead, what I'm seeing is mnt-data.mount times out (fails) waiting for dev-mmcblk0p9.device (automatically generated). Then var.mount fails due to a dependency on mnt-data.mount which then causes every other unit that uses /var to fail because of the implicit dependency on var.mount.Am I missing some trick or parameter? Any help would be appreciated.
Systemd - Conditional Mount Causing Dependency Failures on Implicitly Dependent Units
systemd