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:
parent
12b1c786ac
commit
a33630fcbd
10
fhem/fhem.pl
10
fhem/fhem.pl
@ -1625,7 +1625,17 @@ GlobalAttr($$)
|
|||||||
push @INC, $modpath if(!grep(/$modpath/, @INC));
|
push @INC, $modpath if(!grep(/$modpath/, @INC));
|
||||||
eval {
|
eval {
|
||||||
use vars qw($DISTRIB_DESCRIPTION);
|
use vars qw($DISTRIB_DESCRIPTION);
|
||||||
|
# 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";
|
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";
|
$attr{global}{version} = "$DISTRIB_DESCRIPTION, $cvsid";
|
||||||
};
|
};
|
||||||
my $counter = 0;
|
my $counter = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user