On Tue, Jan 8, 2013 at 8:01 PM, Ashim Acharya <ashimtron@xxxxxxxxx> wrote: > On 01/08/2013 05:39 PM, Sander Jansen wrote: > > I want my media pc to automatically mount several samba shares when > they're > > accessed. In addition it also needs to wake-up the other machine if it is > > currently suspended via WOL. > > > > From a forum post on xbmc.org (1) I know this can be done using autofs, > but > > I'd like to see if this can be using systemd alone. I know systemd can > > handle the automounting, but what about the WOL? > > > > Is it as simple as merely providing a dependency to the specific > automount > > service file to first do the WOL? A oneshot unit? Or perhaps part of the > > same unit file with ExecStartPre (if there is such a thing in a automount > > file)? > > > > Any hints or tips? > > > > Thanks, > > > > Sander > > > > [1] http://forum.xbmc.org/showthread.php?tid=118164 > Might be simpler to set up your wol servers with "ethtool -s ethX wol u" > to wake on unicast messages. > That might be a good idea. I assume the mere attempt to mount / connect to the server would wake it up. I guess the only downside that any other attemps to connect would wake up the machine as well. As opposed to a more controlled way using the magic packet. Sander