/usr/share/pyshared/provisioningserver/power/templates/ether_wake.template is in python-maas-provisioningserver 1.2+bzr1373+dfsg-0ubuntu1~12.04.6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # -*- mode: shell-script -*-
#
# Control node power through WOL, via `wakeonlan` or `etherwake`.
#
mac_address={{mac_address}}
power_change={{power_change}}
if [ "${power_change}" != 'on' ]
then
echo "There is no way to power down a node through etherwake." >&2
exit 1
elif [ -x /usr/bin/wakeonlan ]
then
/usr/bin/wakeonlan $mac_address
elif [ -x /usr/sbin/etherwake ]
then
/usr/sbin/etherwake $mac_address
else
echo "No wakeonlan or etherwake program found." >&2
fi
exit 0
|