In my experience, there is often more than using ethtool to achieve wol,
but you may be lucky. Here is my /etc/network/interfaces file, which
never fails me:
Code:
--------------------
    # The primary network interface
  allow-hotplug eth0
  iface eth0 inet static
        address 192.168.1.50
        netmask 255.255.255.0
        broadcast 192.168.1.255
        network 192.168.1.0
        gateway 192.168.1.1
        post-up /etc/network/enable_wol g
  
--------------------
I am using a static conf but this surely works with DHCP as well. The
/etc/network/enable_wol is a snippet I added to the system:
Code:
--------------------
    #!/bin/sh
  
  if [ ! -x /usr/sbin/ethtool ]; then
        exit 0
  fi
  
  if [ "$METHOD" = loopback ]; then
        exit 0
  fi
  # wol pg => wake on any physical activity
  # wol g => wake on magic packets only
  # wol d => disable wol
  if [ "$1" ]; then
  VAL=$1
  MSG="cannot set WOL on $IFACE: unsupported code"
  case "$VAL" in
        "pg" )  MSG="Enabling $IFACE WOL on PHY+Magic Packets"
                /usr/sbin/ethtool -s $IFACE wol $VAL
        ;;
        "p" )   MSG="Enabling $IFACE WOL on PHY"
                /usr/sbin/ethtool -s $IFACE wol $VAL
        ;;
        "g" )   MSG="Enabling $IFACE WOL on Magic Packets"
                /usr/sbin/ethtool -s $IFACE wol $VAL
        ;;
        "d" )   MSG="Disabling $IFACE WOL"
                /usr/sbin/ethtool -s $IFACE wol $VAL
        ;;
  esac
  /usr/bin/logger "[$0] $MSG ($VAL)"
  fi
  exit
  
--------------------
HTH


-- 
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=54091

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix

Reply via email to