Hi.
I’m trying to enable Wake On Lan on my Dell Precision M4800 running openSUSE Leap 42.1. I can do it manually by running
sudo ethtool --change em1 wol g
after every boot. Next time I suspend the machine I can wake it up using a mobile phone or another computer. But the setting is not persistent, I need to enable this manually after every boot.
I created a systemd service named enable-wol.service in /etc/systemd/system:
micke@deimos:/etc/systemd/system> lltotal 28
drwxr-xr-x 1 root root 34 29 okt 21.50 bluetooth.target.wants
lrwxrwxrwx 1 root root 41 29 okt 21.50 dbus-org.bluez.service -> /usr/lib/systemd/system/bluetooth.service
lrwxrwxrwx 1 root root 44 29 okt 21.52 dbus-org.freedesktop.Avahi.service -> /usr/lib/systemd/system/avahi-daemon.service
lrwxrwxrwx 1 root root 44 29 okt 21.50 dbus-org.freedesktop.ModemManager1.service -> /usr/lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root 57 29 okt 21.52 dbus-org.freedesktop.nm-dispatcher.service -> /usr/lib/systemd/system/NetworkManager-dispatcher.service
lrwxrwxrwx 1 root root 40 6 nov 10.45 default.target -> /usr/lib/systemd/system/graphical.target
drwxr-xr-x 1 root root 228 29 okt 21.53 default.target.wants
-rw-r--r-- 1 root root 185 3 mar 09.28 enable-wol.service
-rw-r--r-- 1 root root 0 3 mar 09.24 enable-wol.service~
drwxr-xr-x 1 root root 36 29 okt 21.48 getty.target.wants
drwxr-xr-x 1 root root 496 3 mar 09.28 multi-user.target.wants
lrwxrwxrwx 1 root root 46 6 nov 10.45 network.service -> /usr/lib/systemd/system/NetworkManager.service
drwxr-xr-x 1 root root 26 18 dec 08.04 remote-fs.target.wants
drwxr-xr-x 1 root root 88 18 dec 08.04 sockets.target.wants
drwxr-xr-x 1 root root 68 6 nov 10.42 sysinit.target.wants
drwxr-xr-x 1 root root 60 29 okt 21.48 system-update.target.wants
I think the service is executed correctly, this is the output from Yast/System/Service Manager/Show Details;
enable-wol.service - Enable Wake On Lan on interface em1 using MagicPacket
Loaded: loaded (/etc/systemd/system/enable-wol.service; enabled)
Active: inactive (dead) since tor 2016-03-03 09:38:35 CET; 10min ago
Process: 966 ExecStart=/bin/sh -c ethtool --change em1 wol g (code=exited, status=0/SUCCESS)
Main PID: 966 (code=exited, status=0/SUCCESS)
It says status=SUCCESS which should be fine but when I check the interface with ethtool WOL will be disabled, I have to enable it manually again Is it not possible to use systemd to execute ethtool at startup and enable Wake On Lan?
Regards, Micke.