mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
configDB.pm: add modpath changes (Forum #51036)
git-svn-id: https://svn.fhem.de/fhem/trunk@11085 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
290d6c2dbd
commit
226e59952e
@ -495,6 +495,7 @@ sub cfgDB_SaveState() {
|
|||||||
sub cfgDB_MigrationImport() {
|
sub cfgDB_MigrationImport() {
|
||||||
|
|
||||||
my ($ret, $filename, @files, @def);
|
my ($ret, $filename, @files, @def);
|
||||||
|
my $modpath = AttrVal("global","modpath",".");
|
||||||
|
|
||||||
# find eventTypes file
|
# find eventTypes file
|
||||||
$filename = '';
|
$filename = '';
|
||||||
@ -506,16 +507,13 @@ sub cfgDB_MigrationImport() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# import templateDB.gplot
|
# import templateDB.gplot
|
||||||
$filename = $attr{global}{modpath};
|
$filename = "$modpath/www/gplot/template.gplot";
|
||||||
$filename .= "/www/gplot/template.gplot";
|
|
||||||
push @files, $filename;
|
push @files, $filename;
|
||||||
$filename = $attr{global}{modpath};
|
$filename = "$modpath/www/gplot/templateDB.gplot";
|
||||||
$filename .= "/www/gplot/templateDB.gplot";
|
|
||||||
push @files, $filename;
|
push @files, $filename;
|
||||||
|
|
||||||
# import template.layout
|
# import template.layout
|
||||||
$filename = $attr{global}{modpath};
|
$filename = "$modpath/FHEM/template.layout";
|
||||||
$filename .= "/FHEM/template.layout";
|
|
||||||
push @files, $filename;
|
push @files, $filename;
|
||||||
|
|
||||||
# find used gplot files
|
# find used gplot files
|
||||||
@ -524,7 +522,7 @@ sub cfgDB_MigrationImport() {
|
|||||||
@def = _cfgDB_findDef('TYPE=SVG','GPLOTFILE');
|
@def = _cfgDB_findDef('TYPE=SVG','GPLOTFILE');
|
||||||
foreach $filename (@def) {
|
foreach $filename (@def) {
|
||||||
next unless $filename;
|
next unless $filename;
|
||||||
push @files, "./www/gplot/".$filename.".gplot";
|
push @files, "$modpath/www/gplot/".$filename.".gplot";
|
||||||
}
|
}
|
||||||
|
|
||||||
# find DbLog configs
|
# find DbLog configs
|
||||||
@ -560,9 +558,14 @@ sub cfgDB_MigrationImport() {
|
|||||||
@def = _cfgDB_findDef('TYPE=holiday','NAME');
|
@def = _cfgDB_findDef('TYPE=holiday','NAME');
|
||||||
foreach $filename (@def) {
|
foreach $filename (@def) {
|
||||||
next unless $filename;
|
next unless $filename;
|
||||||
push @files, "./FHEM/".$filename.".holiday";
|
push @files, "$modpath/FHEM/".$filename.".holiday";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# import uniqueID file
|
||||||
|
$filename = "$modpath/FHEM/FhemUtils/uniqueID";
|
||||||
|
push @files,$filename if (-e $filename);
|
||||||
|
|
||||||
|
|
||||||
# do the import
|
# do the import
|
||||||
$filename = '';
|
$filename = '';
|
||||||
foreach $filename (@files) {
|
foreach $filename (@files) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user