Re: systemd automount + wake-on-lan dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.
>

Ok. Bad news is that "u" will break the suspend/resume on my box for some
reason. It suspends fine, but once resuming, it gets stuck in a suspend /
resume loop where it will wake up for a second before turning off again
(rinse and repeat).

Good news was that I was able to get a systemd share.mount unit working
with a wol.service unit. Starting the mount unit will correctly start the
wol.service unit and wake the machine using the magic packet. What I
haven't got working is the automount:  So far it only tries to mount the
share, but not activate the wol.service unit. Perhaps the automount units
also needs to depend on the wol.service?

Sander


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux