From 6806f5e33f2394693a3dffa939f62c50329f5e77 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Tue, 11 Oct 2022 12:56:35 +0000 Subject: [PATCH] configDB.pm: do not write a statefile in rescue mode git-svn-id: https://svn.fhem.de/fhem/trunk@26521 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/configDB.pm | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/fhem/configDB.pm b/fhem/configDB.pm index 23555ec2e..9981c96a3 100644 --- a/fhem/configDB.pm +++ b/fhem/configDB.pm @@ -545,6 +545,9 @@ sub cfgDB_SaveCfg { ## prototype used in fhem.pl sub cfgDB_SaveState { my ($out,$val,$r,$rd,$t,@rowList); + # don't write statefile in rescue mode + return if ($configDB{attr}{rescue} == 1); + _cfgDB_deleteRF; $t = localtime; @@ -640,41 +643,17 @@ sub cfgDB_MigrationImport { push @files, $fn; } -# find RSS layouts +# find RSS and Infopanel layouts @def = ''; - @def = _cfgDB_findDef('TYPE=RSS','LAYOUTFILE'); + @def = _cfgDB_findDef('TYPE=(RSS|InfoPanel)','LAYOUTFILE'); foreach my $fn (@def) { next unless $fn; push @files, $fn; } -# find InfoPanel layouts +# find weekprofile/LightScene/RHASSPY configurations @def = ''; - @def = _cfgDB_findDef('TYPE=InfoPanel','LAYOUTFILE'); - foreach my $fn (@def) { - next unless $fn; - push @files, $fn; - } - -# find weekprofile configurations - @def = ''; - @def = _cfgDB_findDef('TYPE=weekprofile','CONFIGFILE'); - foreach my $fn (@def) { - next unless $fn; - push @files, $fn; - } - -# find LightScene configurations - @def = ''; - @def = _cfgDB_findDef('TYPE=LightScene','CONFIGFILE'); - foreach my $fn (@def) { - next unless $fn; - push @files, $fn; - } - -# find RHASSPY configurations - @def = ''; - @def = _cfgDB_findDef('TYPE=RHASSPY','CONFIGFILE'); + @def = _cfgDB_findDef('TYPE=(weekprofile|LightScene|RHASSPY)','CONFIGFILE'); foreach my $fn (@def) { next unless $fn; push @files, $fn; @@ -696,7 +675,6 @@ sub cfgDB_MigrationImport { $filename = "$modpath/FHEM/FhemUtils/uniqueID"; push @files,$filename if (-e $filename); - # do the import foreach my $fn (@files) { if ( -r $fn ) {