diff --git a/data/control/Makefile.am b/data/control/Makefile.am index ee4ba16cb..dd09f4394 100644 --- a/data/control/Makefile.am +++ b/data/control/Makefile.am @@ -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 \ diff --git a/data/scripts/Makefile.am b/data/scripts/Makefile.am index c8d186930..8852a3a05 100644 --- a/data/scripts/Makefile.am +++ b/data/scripts/Makefile.am @@ -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 diff --git a/data/control/migration.sh.in b/data/scripts/migration.sh.in similarity index 95% rename from data/control/migration.sh.in rename to data/scripts/migration.sh.in index 3f546f266..a7059e19c 100644 --- a/data/control/migration.sh.in +++ b/data/scripts/migration.sh.in @@ -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 diff --git a/src/global.h b/src/global.h index 9ae58da09..37fecaae3 100644 --- a/src/global.h +++ b/src/global.h @@ -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" diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 5c7760fd1..fa056e385 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -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