2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 04:36:02 +00:00

- busy log entrance in repeat mode only in verbose mode 4

- bug fix in EW mode

git-svn-id: https://svn.fhem.de/fhem/trunk@4970 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dietmar63 2014-02-17 19:13:37 +00:00
parent eec286b838
commit 35d5118c1e

View File

@ -166,7 +166,7 @@ sub wake($){
readingsBeginUpdate ($hash);
Log3 $hash, 3, "WOL keeping $name with MAC $mac IP $host busy";
Log3 $hash, 4, "WOL keeping $name with MAC $mac IP $host busy";
if ($hash->{MODE} eq "BOTH" || $hash->{MODE} eq "EW" ) {
wol_by_ew ($hash, $mac);
@ -209,9 +209,20 @@ sub wol_by_udp {
sub wol_by_ew($$) {
my ($hash, $mac) = @_;
my $sysCmd = AttrVal($hash->{NAME}, "sysCmd", "/usr/bin/ether-wake");
# Fritzbox Raspberry
my @commands = "/usr/bin/ether-wake", "/usr/sbin/etherwake";
my $standardEtherwake = "no etherwake installed";
foreach my $sysCmd (@commands) {
if (-e $sysCmd) {
$standardEtherwake = $sysCmd;
}
}
my $sysCmd = AttrVal($hash->{NAME}, "sysCmd", $standardEtherwake);
if (-e $sysCmd) {
qx ("$sysCmd $mac");
$sysCmd = "$sysCmd $mac";
qx ($sysCmd);
} else {
Log3 $hash, 1, "[$hash->{NAME}] system command '$sysCmd' not found";
}