<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 4, 2016 at 1:26 PM, Rainer Dorsch <span dir="ltr"><<a href="mailto:ml@bokomoko.de" target="_blank">ml@bokomoko.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><u></u>
<div style="font-family:monospace;font-size:10pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">Hi,</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">I am facing an issue with a .mount unit file. The task is simple: mount a partition at the *right* time. </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">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:</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">OpenELEC:~/.config/system.d # cat /etc/fstab</p>
<p style="margin:0px;text-indent:0px">OpenELEC:~/.config/system.d # </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">I would like to mount /storage/.kodi/.local/storage/sdcard after /storage is mounted and before systemd-tmpfiles-setup.service starts executing:</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">I created this .mount unit file:</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">OpenELEC:~/.config/system.d # cat storage-.kodi-.local-storage-sdcard.mount </p>
<p style="margin:0px;text-indent:0px">[Unit]</p>
<p style="margin:0px;text-indent:0px">Description=sdcard mount script</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">#Requires=storage.mount</p>
<p style="margin:0px;text-indent:0px">#After=storage.mount</p>
<p style="margin:0px;text-indent:0px">ConditionPathExists=/storage/.kodi/.local/storage/sdcard</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Conflicts=umount.target</p>
<p style="margin:0px;text-indent:0px">Before=umount.target systemd-tmpfiles-setup.service</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">[Mount]</p>
<p style="margin:0px;text-indent:0px">What=/dev/mmcblk0p1</p>
<p style="margin:0px;text-indent:0px">Where=/storage/.kodi/.local/storage/sdcard</p>
<p style="margin:0px;text-indent:0px">Options=</p>
<p style="margin:0px;text-indent:0px">Type=ext4</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">[Install]</p>
<p style="margin:0px;text-indent:0px">WantedBy=local-fs.target</p>
<p style="margin:0px;text-indent:0px"><br></p></div></blockquote><div><br></div><div>Having no CoreOS experience, is "~/.config/system.d/" something specific to OpenELEC? I hope you are not trying to use systemd's own ~/.config/systemd/ here, as that just plain doesn't make sense. (The main init system will not look in each user's homedirs, and the per-user instances do not have mount privileges...)</div><div><br></div>Can you check the output of `systemctl status storage-.kodi-.local-storage-sdcard.mount`?</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>