scripts: move migration script away from control scripts

Origin commit data
------------------
Branch: ni/coolstream
Commit: 58f91648c0
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-09-26 (Sun, 26 Sep 2021)

Origin message was:
------------------
- scripts: move migration script away from control scripts

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-09-26 20:25:38 +02:00
parent 53a13dd54f
commit 4dd533048a
5 changed files with 6 additions and 10 deletions

View File

@@ -1,6 +1,3 @@
EXTRA_DIST = \
migration.sh migration.sh.in
installdir = $(CONTROLDIR)
install_SCRIPTS = \
@@ -9,7 +6,6 @@ install_SCRIPTS = \
deepstandby.on \
deepstandby.off \
inactivity.on \
migration.sh \
movieplayer.start \
movieplayer.end \
neutrino.start \

View File

@@ -2,13 +2,15 @@ EXTRA_DIST = \
backup.sh backup.sh.in \
restore.sh restore.sh.in \
backup_flash.sh backup_flash.sh.in \
restore_flash.sh restore_flash.sh.in
restore_flash.sh restore_flash.sh.in \
migration.sh migration.sh.in
installdir = $(bindir)
install_SCRIPTS = \
backup.sh \
restore.sh \
migration.sh \
wakeup.sh \
install.sh

View File

@@ -60,6 +60,5 @@ for controlscript in $controlscripts; do
fi
done
# these control scripts hasn't counterparts in @CONTROLDIR_VAR@
rm -f migration.sh
rm -f flash.start

View File

@@ -46,9 +46,6 @@
#define NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT "deepstandby.off"
#define NEUTRINO_APP_START_SCRIPT "neutrino.start"
// control scripts w/o counterparts in /var
#define NEUTRINO_CONF_MIGRATION_SCRIPT CONTROLDIR "/migration.sh"
#define COVERDIR_TMP "/tmp/.cover"
#define LOGODIR_TMP "/tmp/.logo"

View File

@@ -365,7 +365,9 @@ int CNeutrinoApp::loadSetup(const char *fname)
int erg = 0;
// execute migration script before loading configfile
my_system(NEUTRINO_CONF_MIGRATION_SCRIPT);
std::string migration_sh = find_executable("migration.sh");
if (!migration_sh.empty())
my_system(migration_sh.c_str());
configfile.clear();
// load settings; setup defaults