WOL with autofs


If I set up a video source using the Kodi-level NFS client mechanism, and if I activate the option Settings -> System -> Power saving -> Try to wakeup remote servers on access, then this seems to work as expected - if I browse into the source folder while the server is in sleep mode, the Vero 4K+ sends a WOL packet and wakes it up.

However, if the source is mounted at OS level using autofs, it doesn’t send a WOL packet (possibly because Kodi thinks the folder is in local storage, and it’s only at the OS level that it knows it’s a mounted remote NFS export).

Is it possible to get the Vero 4K+ to send a WOL packet under those circumstances?


Have a look at this: http://tech-bodges.blogspot.com/2010/06/linux-autofs-and-wake-on-lan-bodge.html

I think that will do what you are looking for. I haven’t tested it since I don’t use WOL.

That would be correct, Kodi thinks they are local files.


@angry.sardine (or should I call you Bagpuss :wink: ) I got curious about this, so I setup one of my laptops to test WOL. If you can give me a few days, I think I can come up with a nice easy to setup solution for this. The idea I’m working on is to use a Python script instead of the shell script I linked, and will not require installing anything via apt. I’ve got the script so it can do the WOL, I just need to get it working with autofs now.


Yes, please. :slight_smile:


Gave you 9. :slight_smile: Did you make any progress on this?


Sorry, I was thinking of giving you an update. I had almost gave up on the idea as it seemed that the --timeout option didn’t work. After several days, I finally figured that one out.

So I have a basic WOL autofs script working, it just needs fine tuning now.


@angry.sardine I have a basic python script working now that does the WOL (if needed), waits for the mount (smb or nfs) to become available and then does the mount. It’s a bit finicky right now. To help me understand it it will work for you, could you get me your auto.master and auto.maps so I can understand how you are using autofs and if the script will work for you? If you don’t want to share them here, please PM them to me.


/etc/auto.master :

# Include central master map if it can be found using    
# nsswitch sources.
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes 
# precedence.                                            
 /- /etc/auto.nfs.shares --timeout 15 browse

/etc/auto.nfs.shares :


I’m afraid I don’t know where to find auto.maps :frowning_face:


That’s what I needed. One more question, are there files in the directories, or is everything in a subdirectory.

i.e. are there any files in /Interim, or is everything in directories under that like /Interim/x?


Note that my previous post initially went a bit wonky - I’ve edited it, and I think it’s correct now. (Formatted text needed some kicking when input from a mobile web browser).

There are likely to be both files and subfolders in all of those shares, I’m afraid. :slight_smile:


Unfortunately, what I’ve been able to get working will not allow files in the parent directory, only in sub directories. It seems to be a limitation of autofs that I haven’t been able to work around yet.

With that I have working, you would be able to access anything in a directory under /Interim, but not able to access files in /Interim.

That’s one of the reasons why it’s taken me some time to get back to you as I’ve been struggling with a way to mimic the /- way in autofs. For some reason when using a script with autofs the /- syntax that allows access to files in the parent directory does not work.

I will keep trying. I will have a script for you to test in the next few days (REALLY THIS TIME!!!) with that limitation.



Okay, thanks. :sunglasses: