mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 01:06:04 +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:
parent
ccfdca9021
commit
151c479d7a
15
fhem/fhem.pl
15
fhem/fhem.pl
@ -443,6 +443,11 @@ $attr{global}{motd} = "$sc_text\n\n"
|
|||||||
if(!$attr{global}{motd} || $attr{global}{motd} =~ m/^$sc_text/);
|
if(!$attr{global}{motd} || $attr{global}{motd} =~ m/^$sc_text/);
|
||||||
|
|
||||||
$init_done = 1;
|
$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);
|
DoTrigger("global", "INITIALIZED", 1);
|
||||||
|
|
||||||
$attr{global}{motd} .= "Running with root privileges."
|
$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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user