I made a sh script to mount my Synology shared folders via LFS.
It works like a charm, here's the code (xxxxx stands for the IP adress of my nas)
#!/bin/sh
#Mount the following folders on Komputer with LFS protocol:
#1. data
#2. games
#3. Youtubing
sudo mount xxxxxxxxxxxx:/volume1/data /mnt/nas_media/
sudo mount xxxxxxxxxxxx:/volume1/Games /mnt/nas_games/
sudo mount xxxxxxxxxxxx:/volume1/youtubing /mnt/youtubing/
When I run the code, the folders are mounted correctly in the mounting points in /mnt/.
I created a crontab entry with
crontab -e
and i wrote the following:
#Mount useful NAS folders when starting up:
@reboot /etc/nas_mount.sh
When I reboot the system, however, the folders are not mounted. I tried inserting a sleep 30 in my script to await for all the network services to be online, to no avail.
Any ideas?
Thanks.