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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@5154 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-03-06 20:06:00 +00:00
parent d966a55699
commit 6654e30a25

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;
}
}
}