diff -ruN old/etc/conf.d/wol new/etc/conf.d/wol --- old/etc/conf.d/wol 1969-12-31 16:00:00.000000000 -0800 +++ new/etc/conf.d/wol 2008-08-04 08:18:25.000000000 -0700 @@ -0,0 +1,3 @@ +# Comment out the following line to support Wake On Lan +#WOL_ARGS="-i" + diff -ruN old/etc/rc.d/network new/etc/rc.d/network --- old/etc/rc.d/network 2008-08-04 08:19:44.000000000 -0700 +++ new/etc/rc.d/network 2008-08-04 08:16:20.000000000 -0700 @@ -2,6 +2,7 @@ . /etc/rc.conf . /etc/rc.d/functions +. /etc/conf.d/wol # wireless settings [ -f /etc/conf.d/wireless ] && . /etc/conf.d/wireless @@ -48,7 +49,11 @@ fi fi # Always bring the interface itself down - /sbin/ifconfig ${1} down >/dev/null 2>&1 + if [ -n $WOL_ARGS ]; then + /sbin/ifconfig ${1} down >/dev/null 2>&1 + else + ethtool -s ${1} wol g + fi return $? } diff -ruN old/etc/rc.shutdown new/etc/rc.shutdown --- old/etc/rc.shutdown 2008-08-04 08:19:21.000000000 -0700 +++ new/etc/rc.shutdown 2008-08-04 08:18:44.000000000 -0700 @@ -5,6 +5,7 @@ . /etc/rc.conf . /etc/rc.d/functions +. /etc/conf.d/wol # avoid staircase effect /bin/stty onlcr @@ -123,7 +124,7 @@ if [ "$RUNLEVEL" = "0" ]; then printsep printhl "${C_H2}POWER OFF" - /sbin/poweroff -d -f -h -i + /sbin/poweroff -d -f -h $WOL_ARGS else printsep printhl "${C_H2}REBOOTING"