/usr/share/powernap/powernap-ethtool is in powernap 2.21-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/bin/sh -e
if [ -x /etc/powernap/ethtool-command ]; then
# Allow for admin-customized ethtool commands here
/etc/powernap/ethtool-command
else
# Otherwise, try to enable Wake-on-LAN on valid interface(s)
for i in $(LANG=C /sbin/ifconfig | grep "encap:Ethernet" | awk '{print $1}'); do
if /usr/sbin/ethtool $i | grep -qs "Supports Wake-on: .*g"; then
/usr/sbin/ethtool -s $i wol g
fi
done
fi
|