From c7812a0e34a37adbc4254472faa35a12b3558691 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 5 Apr 2014 06:23:39 +0000 Subject: [PATCH] fhem.pl: add errors to initial error message, remove list of modules from the error message, if a module is not found. git-svn-id: https://svn.fhem.de/fhem/trunk@5442 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 8e9f1c8c7..ab07784e5 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -433,7 +433,7 @@ while(time() < 2*3600) { sleep(5); } -my $cfgErrMsg = "There were error messages while initializing FHEM"; +my $cfgErrMsg = "Error messages while initializing FHEM:"; my $cfgRet=""; if($attr{global}{configfile} eq 'configDB') { my $ret = cfgDB_ReadAll(undef); @@ -450,7 +450,7 @@ if($attr{global}{configfile} eq 'configDB') { } if($cfgRet) { - $attr{global}{motd} = "$cfgErrMsg,\ncheck the Logfile for details."; + $attr{global}{motd} = "$cfgErrMsg\n$cfgRet"; Log 1, $cfgRet; } elsif($attr{global}{motd} =~ m/^$cfgErrMsg/) { @@ -1521,11 +1521,7 @@ CommandDefine($$) return "Cannot load module $m" if($newm eq "UNDEFINED"); $m = $newm; - if(!$modules{$m} || !$modules{$m}{DefFn}) { - my @m = grep { $modules{$_}{DefFn} || !$modules{$_}{LOADED} } - sort keys %modules; - return "Unknown module $m, choose one of @m"; - } + return "Unknown module $m" if(!$modules{$m} || !$modules{$m}{DefFn}); my %hash;