On Mon, 04.01.16 12:26, Rainer Dorsch (m...@bokomoko.de) wrote: > Hi, > > I am facing an issue with a .mount unit file. The task is simple: mount a > partition at the > *right* time. > > The system is OpenElec 6.0, which is based on CoreOS. /etc/fstab is on a > squashfs, i.e. > it cannot be easily modified and is empty: > > OpenELEC:~/.config/system.d # cat /etc/fstab > OpenELEC:~/.config/system.d # > > I would like to mount /storage/.kodi/.local/storage/sdcard after /storage is > mounted > and before systemd-tmpfiles-setup.service starts executing:
Note that on systemd mounts automatically gain requirement and ordering dependencies on all mounts that are prefixes of it. Thus, the "after" dep you ask for above is automatically added anyway. > > I created this .mount unit file: > > OpenELEC:~/.config/system.d # cat storage-.kodi-.local-storage-sdcard.mount > [Unit] > Description=sdcard mount script > > #Requires=storage.mount > #After=storage.mount > ConditionPathExists=/storage/.kodi/.local/storage/sdcard This appears unnecessary? Why would you condition on that? > Conflicts=umount.target > Before=umount.target systemd-tmpfiles-setup.service These two lines are entirely unnecessary. Unless you set "DefaultDependencies=no" all mount units will gain automatic deps on umount.target anyway, and are ordered before local-fs.target. As systemd-tmpfiles-setup.service is ordered after local-fs.target it will thus run anyway after your mount. > A start job is running for dev-mmcblk0p1.device (xys / 1min 30s) This indicates that this block device is not actually noticed by systemd. Make sure that the "systemd" tag is set on the block device. Check it with "udevadm info" on it. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel