WakeOnLan functions not working for me
Sam Morris
sam at robots.org.uk
Sat Apr 19 06:33:38 PDT 2008
I was playing around with the WakeOnLan functions but they don't seem to
work for me. First I wanted to find out if WoL was supported on my
system:
$ dbus-send --system --dest=org.freedesktop.Hal --print-reply /org/freedesktop/Hal/devices/net_00_13_77_60_aa_1d org.freedesktop.Hal.Device.WakeOnLan.GetSupported
method return sender=:1.2 -> dest=:1.492 reply_serial=2
int32 1
That's odd, shouldn't it have returned a boolean?
I added some tracing info to the hal-system-wol-linux script and
observed the following:
+ SUPPORT_FLAGS=
+ IFACE=eth0
+ which ethtool
+ '[' 1 '!=' 0 ']'
+ echo org.freedesktop.Hal.Device.WakeOnLan.NoEthtool
+ exit 1
So it seems the exception is not being returned to the caller.
After I installed ethtool, calling GetSupported returned '0' instead of
'true', despite:
+ SUPPORT_FLAGS=
+ IFACE=eth0
+ which ethtool
+ '[' 0 '!=' 0 ']'
+ case "`basename $0`" in
++ basename /usr/lib/hal/scripts/linux/hal-system-wol-supported-linux
+ wol_supported
+ wol_get_flags
++ ethtool eth0
++ awk '/Supports Wake-on:/{if ($3 ~ /g/) print $3 }'
+ SUPPORT_FLAGS=pg
+ '[' -n pg ']'
+ return 0
+ '[' -n pg ']'
+ return 0
+ exit 0
And GetEnabled returned 1 instead of false, despite:
+ SUPPORT_FLAGS=
+ IFACE=eth0
+ which ethtool
+ '[' 0 '!=' 0 ']'
+ case "`basename $0`" in
++ basename /usr/lib/hal/scripts/linux/hal-system-wol-enabled-linux
+ wol_enabled
++ ethtool eth0
++ awk '/[^s ]Wake-on:/{if ($2 ~ /g/) print $2 }'
+ ENABLED=
+ '[' -n '' ']'
+ return 1
+ exit 1
I'm using hal 0.5.11~rc2.
--
Sam Morris <sam at robots.org.uk>
More information about the hal
mailing list