You are not logged in.
Hi,
I try to set the WOL flag every time my computer is started to be able starting it up with wol again.
executing
/usr/bin/ethtool -s enp2s1 wol g
sets the Wake-on flag to 'g'
ethtool enp2s1 | grep Wake-on
Supports Wake-on: umbg
Wake-on: g
shutting down the computer and booting up via
wol [mac]
is working
Now I need to set the Wake-on flag every time the computer comes up.
I have installed the wol-systemd package from aur because I am using NetworkManager on a headless system.
with
systemctrl start wol@enp2s1
the flag is set correctly
BUT
enabling the systemd file fails during startup with
Sep 07 20:56:15 ThinkX40 systemd[1]: Starting Wake-on-LAN for enp2s1...
Sep 07 20:56:15 ThinkX40 ethtool[232]: Cannot get current wake-on-lan settings: No such device
Sep 07 20:56:15 ThinkX40 ethtool[232]: not setting wol
Sep 07 20:56:15 ThinkX40 systemd[1]: Started Wake-on-LAN for enp2s1.
I think that the unit gets executed too early when the interface isn't up.
I tried several After= targets without luck.
[Unit]
Description=Wake-on-LAN for %i
Requires=network.target
Wants=network.target network-online.target
After=network.target network-online.target
[Service]
ExecStart=/usr/bin/ethtool -s %i wol g
Type=oneshot
[Install]
WantedBy=multi-user.target
Any ideas?
Last edited by _pheinrich_ (2015-09-07 19:04:25)
Offline
From the wiki:
/etc/systemd/system/wol@.service
[Unit]
Description=Wake-on-LAN for %i
Requires=network.target
After=network.target
[Service]
ExecStart=/usr/bin/ethtool -s %i wol g
Type=oneshot
[Install]
WantedBy=multi-user.target
Same as my homeserver, always worked for me...
I think that the unit gets executed too early when the interface isn't up
Maybe is waiting for network-online.target
Last edited by losko (2015-09-07 19:48:08)
"Greetings from the Banana Republic"
Offline
Try 'man systemd.link'. I have never tried it myself but it should work.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
If you use systemd-networkd for the link configuration then you can setup WOL using [Link] config option https://wiki.archlinux.org/index.php/Wa … th_systemd Do not use third-party systemd services for WOL.
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline