2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

fixed an error with an "unset attr{global}{version}" after first update in a fresh 5.2 installation

git-svn-id: https://svn.fhem.de/fhem/trunk@1761 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mfr69bs 2012-07-26 14:53:07 +00:00
parent 12b1c786ac
commit a33630fcbd

View File

@ -1625,7 +1625,17 @@ GlobalAttr($$)
push @INC, $modpath if(!grep(/$modpath/, @INC));
eval {
use vars qw($DISTRIB_DESCRIPTION);
require "FhemUtils/release.pm";
# start of fix
# "Use of uninitialized value" after a fresh 5.2 installation and first time "updatefhem"
# release.pm does not reside in FhemUtils (what it should), so we load it from $modpath
if(-e "$modpath/FhemUtils/release.pm") {
require "FhemUtils/release.pm";
} elsif(-e:"$modpath/release.pm") {
require "release.pm";
} else {
$DISTRIB_DESCRIPTION = "unknown";
}
# end of fix
$attr{global}{version} = "$DISTRIB_DESCRIPTION, $cvsid";
};
my $counter = 0;