2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 07:16:03 +00:00

fhem.pl: set IODev attribute as proposed in the Forum#21023

git-svn-id: https://svn.fhem.de/fhem/trunk@5154 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-03-06 20:06:00 +00:00
parent ccfdca9021
commit 151c479d7a

View File

@ -443,6 +443,11 @@ $attr{global}{motd} = "$sc_text\n\n"
if(!$attr{global}{motd} || $attr{global}{motd} =~ m/^$sc_text/);
$init_done = 1;
foreach my $d (keys %defs) {
if(defined($defs{$d}{IODev}) && $defs{$d}{IODev} == 0) {
Log 3, "No I/O device found for $defs{$d}{NAME}";
}
}
DoTrigger("global", "INITIALIZED", 1);
$attr{global}{motd} .= "Running with root privileges."
@ -1558,7 +1563,15 @@ AssignIoPort($;$)
}
}
}
Log 3, "No I/O device found for $hash->{NAME}" if(!$hash->{IODev});
if($hash->{IODev}) {
$attr{$hash->{NAME}}{IODev} = $hash->{IODev}{NAME};
} else {
if($init_done) {
Log 3, "No I/O device found for $hash->{NAME}"
} else {
$hash->{IODev} = 0;
}
}
}