#!/bin/sh
#Enables wol for $IFACE.

echo "`/bin/date`: Setting wol for $IFACE" >> /tmp/wol
set -e

#If $IFACE isn't defined, just exit
if [ -z "$IFACE" ]; then
   exit 0
fi

# Don't do anything for the lo interface
if [ "$IFACE" = "lo" ]; then
   exit 0
fi

ethtool -s "$IFACE" wol g
