Hallo,
mein Versuch ein Script beim Systemstart meines Debian Servers auszuführen scheint nicht zu klappen.
Nach dieser Anleitung habe ich ein Script erstellt um eth0 zu sagen dass es auf ein Magic Packet hört.
/etc/init.d/aktiviere_wol
Code
#! /bin/sh
test -f /sbin/ethtool || exit 0
. /lib/lsb/init-functions
log_begin_msg "Aktiviere Wake-On-LAN auf eth0 ..."
ethtool -s eth0 wol g
#log_begin_msg "Aktiviere Wake-On-LAN auf eth1 ..."
#ethtool -s eth1 wol g
log_end_msg $?
Display More
Wie in der Anleitung weiter beschrieben habe ich das Script ausführbar gemacht und unter "/etc/rc2.d/" einen SymLink erstellt "S98aktiviere_wol"
lrwxrwxrwx 1 root root 23 21. Sep 19:12 S98aktiviere_wol -> ../init.d/aktiviere_wol
Wenn ich das Script von Hand ausführe ...
Code
root@SERVER:/etc/rc2.d# /etc/rc2.d/S98aktiviere_wol
Aktiviere Wake-On-LAN auf eth0 ....
root@SERVER:/etc/rc2.d# ethtool eth0
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: g
Link detected: yes
root@SERVER:/etc/rc2.d#
Display More
... wird WOL an eth0 aktiviert und ich kann die Maschine über WOL starten.
nach dem Zeustart steht Woke-on wieder auf "d" ?!?
Code
root@SERVER:~# ethtool eth0
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: yes
root@SERVER:~#
Display More
wurde das Script nicht ausgeführt?
rijo