mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-07 22:29:19 +00:00
fhem.pl: display warning message on config error, see forum#22105
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5413 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f82aa41349
commit
97c70678d6
17
fhem.pl
17
fhem.pl
@ -433,20 +433,31 @@ while(time() < 2*3600) {
|
|||||||
sleep(5);
|
sleep(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $cfgErrMsg = "There were error messages while initializing FHEM";
|
||||||
|
my $cfgRet="";
|
||||||
if($attr{global}{configfile} eq 'configDB') {
|
if($attr{global}{configfile} eq 'configDB') {
|
||||||
my $ret = cfgDB_ReadAll(undef);
|
my $ret = cfgDB_ReadAll(undef);
|
||||||
Log 1, "configDB: $ret" if($ret);
|
$cfgRet .= "configDB: $ret" if($ret);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
my $ret = CommandInclude(undef, $attr{global}{configfile});
|
my $ret = CommandInclude(undef, $attr{global}{configfile});
|
||||||
Log 1, "configfile: $ret" if($ret);
|
$cfgRet .= "configfile: $ret\n" if($ret);
|
||||||
|
|
||||||
if($attr{global}{statefile} && -r $attr{global}{statefile}) {
|
if($attr{global}{statefile} && -r $attr{global}{statefile}) {
|
||||||
$ret = CommandInclude(undef, $attr{global}{statefile});
|
$ret = CommandInclude(undef, $attr{global}{statefile});
|
||||||
Log 1, "statefile: $ret" if($ret);
|
$cfgRet .= "statefile: $ret" if($ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($cfgRet) {
|
||||||
|
$attr{global}{motd} = "$cfgErrMsg,\ncheck the Logfile for details.";
|
||||||
|
Log 1, $cfgRet;
|
||||||
|
|
||||||
|
} elsif($attr{global}{motd} =~ m/^$cfgErrMsg/) {
|
||||||
|
$attr{global}{motd} = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
SignalHandling();
|
SignalHandling();
|
||||||
|
|
||||||
my $pfn = $attr{global}{pidfilename};
|
my $pfn = $attr{global}{pidfilename};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user