I have this setup, it will fail since the network is not up and running during boot. But if I “sudo systemctl start home-osmc-nas.mount” from the command line after boot it works fine.
I know I am missing something on the [Unit] After settings.
[Unit]
Description=cifs mount script
After = remote-fs.target network-online.target
Before=mediacenter.service
[Mount]
What=//192.168.0.1/volume9
Where=/home/osmc/nas
Options=username=user,password=password,rw
Type=cifs
[Install]
WantedBy=multi-user.target
Thank you,
j
You could enable “wait for network” in the OSMC networking settings - this will cause any service/unit with After=network-online.target to wait for the network to come up before running, however this will also delay Kodi until the network is up.
You may be better off using an /etc/fstab entry instead of trying to create your own mount unit (systemd documentation actually recommends this) in which case adding the mount options x-systemd.automount,noauto will do what you want.
http://www.freedesktop.org/software/systemd/man/systemd.mount.html
Thank you for the info…
I setup FSTAB, and it works out fine…