2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-10 01:55:38 +00:00

fhem.pl: SecurityCheck call reordering

git-svn-id: https://svn.fhem.de/fhem/trunk@15680 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-12-24 08:05:59 +00:00
parent 2535c75008
commit fcb408d37e

View File

@ -558,16 +558,6 @@ if(configDBUsed()) {
}
}
if($cfgRet) {
$attr{global}{autosave} = 0;
$attr{global}{motd} = "$cfgErrMsg\n$cfgRet\nAutosave deactivated";
Log 1, $cfgRet;
} elsif($attr{global}{motd} && $attr{global}{motd} =~ m/^$cfgErrMsg/) {
$attr{global}{motd} = "";
}
my $pfn = $attr{global}{pidfilename};
if($pfn) {
die "$pfn: $!\n" if(!open(PID, ">$pfn"));
@ -590,7 +580,19 @@ foreach my $d (keys %defs) {
}
}
SecurityCheck();
if($cfgRet) {
$attr{global}{autosave} = 0;
$attr{global}{motd} = "$cfgErrMsg\n$cfgRet\nAutosave deactivated";
Log 1, $cfgRet;
} elsif($attr{global}{motd} && $attr{global}{motd} =~ m/^$cfgErrMsg/) {
$attr{global}{motd} = "";
} else {
SecurityCheck();
}
$fhem_started = time;
DoTrigger("global", "INITIALIZED", 1);