update and rename migration script; execute migration script before loading config

Origin commit data
------------------
Branch: ni/coolstream
Commit: dceffe31f0
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-11-22 (Thu, 22 Nov 2018)

Origin message was:
------------------
- update and rename migration script; execute migration script before loading config

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2018-11-22 00:00:28 +01:00
parent 98443e66fc
commit 0de0cc45a2
5 changed files with 34 additions and 21 deletions

View File

@@ -338,6 +338,11 @@ int CNeutrinoApp::loadSetup(const char * fname)
char cfg_value[20]; //NI mode_icons_flag
int erg = 0;
// execute migration script before loading configfile
puts("[neutrino.cpp] executing " NEUTRINO_CONF_MIGRATION_SCRIPT ".");
if (my_system(NEUTRINO_CONF_MIGRATION_SCRIPT) != 0)
perror(NEUTRINO_CONF_MIGRATION_SCRIPT " failed");
configfile.clear();
// load settings; setup defaults
if (!configfile.loadConfig(fname))
@@ -5685,9 +5690,4 @@ void CNeutrinoApp::migrateConfig(const char *fname)
configfile.deleteKey(from);
}
/* more complex migration, including converting values etc. could be done here */
//NI
puts("[neutrino.cpp] executing " NEUTRINO_NI_MIGRATION_SCRIPT ".");
if (my_system(NEUTRINO_NI_MIGRATION_SCRIPT) != 0)
perror(NEUTRINO_NI_MIGRATION_SCRIPT " failed");
}