You are not logged in.
I have some shares (smb) that I want to mount on boot. My NAS is set to fall asleep after some time to save energy but can be woken up with wol. Is there a way to automatically send a wol packet to my nas before mounting the shares when booting? If so, how would I do that?
Offline
Here is an idea. Btw, I don't have samba on my pcs neither I haven't used (yet) systemd.mount so there is a lot of speculation here
You can mount filesystems using systemd. Check man systemd.mount for more info.
But, assuming is possible to mount samba shares with systemd.mount, and that you can add a Before statement on them, requiring a service, you could add Before=wol.service
And wol.service would be a oneshot unit that will call an script that sends a wol package to the destiny machine and then pings to it. If the other machine responds the ping, the script ends. If not, then sleep for some seconds and then repeat. That way, it will not end until the other machine is answering, and then, the samba systemd mount will do its stuff.
...lots of guessing, I know. But hey, I haven't used systemd.mounts yet.
If you try it, let know how things turn out!
"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.
Offline