Hallo!
Ich habe auf meiner Netbox nt-330i WOL laut dem Wiki-Artikel eingerichtet, wenn ich das Flag mittels ethtool manuell setze, funktioniert auch alles. Allerdings wird weder der Hook in der /etc/network/interfaces aufgerufen noch funktioniert die Abarbeitung via /etc/rc.local. Das Flag wird einfach nicht gesetzt. Selbst ein Testaufruf von
pre-down touch /tmp/PRE_DOWN
funktioniert nicht, erzeugt also keine Datei.
$ lspci | grep Network 06:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
$ lsmod | grep ath ath9k 71369 0 ath9k_common 5719 1 ath9k ath9k_hw 281016 2 ath9k,ath9k_common ath 8041 2 ath9k,ath9k_hw mac80211 232535 2 ath9k,ath9k_common cfg80211 146764 4 ath9k,ath9k_common,ath,mac80211 led_class 2864 1 ath9k
$ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.2.10 netmask 255.255.255.0 gateway 192.168.2.1 # pre-down /usr/sbin/ethtool -s eth0 wol g pre-down touch /tmp/PRE_DOWN
BTW: Da es sich um eine XBMC-Installation handelt, läuft kein network-manager o.ä. Woran kann das denn liegen? Ist es eventuell der Fall, dass nur noch die if-*.d-Skripte in /etc/network/ abgearbeitet werden? Dort habe ich nämlich einige ethtool-Einträge gefunden, mit denen ich aber nichts anzufangen weiß:
$ cat if-pre-up.d/ethtool
#!/bin/sh
ETHTOOL=/usr/sbin/ethtool
test -x $ETHTOOL || exit 0
[ "$IFACE" != "lo" ] || exit 0
# Gather together the mixed bag of settings applied with -s/--change
SETTINGS="\
${IF_ETHERNET_PORT:+ port $IF_ETHERNET_PORT}\
${IF_DRIVER_MESSAGE_LEVEL:+ msglvl $IF_DRIVER_MESSAGE_LEVEL}\
"
[ -z "$SETTINGS" ] || $ETHTOOL --change "$IFACE" $SETTINGS$ cat if-up.d/ethtool
#!/bin/sh
ETHTOOL=/usr/sbin/ethtool
test -x $ETHTOOL || exit 0
[ "$IFACE" != "lo" ] || exit 0
# Find settings with a given prefix and print them as they appeared in
# /etc/network/interfaces, only with the prefix removed.
gather_settings () {
env | awk -F= "/^IF_$1/ {
sub(\"^IF_$1\", \"\");
gsub(\"_\", \"-\");
print tolower(\$1), \$2
}"
}
# Gather together the mixed bag of settings applied with -s/--change
SETTINGS="\
${IF_LINK_SPEED:+ speed $IF_LINK_SPEED}\
${IF_LINK_DUPLEX:+ duplex $IF_LINK_DUPLEX}\
"
# WOL has an optional pass-key
set -- $IF_ETHERNET_WOL
SETTINGS="$SETTINGS${1:+ wol $1}${2:+ sopass $2}"
# Autonegotiation can be on|off or an advertising mask
case "$IF_ETHERNET_AUTONEG" in
'') ;;
on|off) SETTINGS="$SETTINGS autoneg $IF_ETHERNET_AUTONEG" ;;
*) SETTINGS="$SETTINGS autoneg on $IF_ETHERNET_AUTONEG" ;;
esac
[ -z "$SETTINGS" ] || $ETHTOOL --change "$IFACE" $SETTINGS
SETTINGS="$(gather_settings ETHERNET_PAUSE_)"
[ -z "$SETTINGS" ] || $ETHTOOL --pause "$IFACE" $SETTINGS
SETTINGS="$(gather_settings HARDWARE_IRQ_COALESCE_)"
[ -z "$SETTINGS" ] || $ETHTOOL --coalesce "$IFACE" $SETTINGS
SETTINGS="$(gather_settings HARDWARE_DMA_RING_)"
[ -z "$SETTINGS" ] || $ETHTOOL --set-ring "$IFACE" $SETTINGS
SETTINGS="$(gather_settings OFFLOAD_)"
[ -z "$SETTINGS" ] || $ETHTOOL --offload "$IFACE" $SETTINGSEdit: Eigentlich sollte das ins Erweiterte-Netzwerk-Forum, kann es bitte jemand verschieben? Danke! ☺
Moderiert von praseodym:
Thema auf Wunsch verschoben!