From 53a13dd54fe4154f779c477219d153e84c4088bd Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 26 Sep 2021 20:25:38 +0200 Subject: [PATCH] scripts: move flash.start script away from control scripts Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/fa17da4f0ae8b6b5ea2525978519e23fb9e017bc Author: vanhofen Date: 2021-09-26 (Sun, 26 Sep 2021) Origin message was: ------------------ - scripts: move flash.start script away from control scripts ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/control/Makefile.am | 1 - data/scripts/Makefile.am | 3 +++ data/{control/flash.start => scripts/start_flash.sh} | 2 +- src/global.h | 1 - src/neutrino.cpp | 4 +++- 5 files changed, 7 insertions(+), 4 deletions(-) rename data/{control/flash.start => scripts/start_flash.sh} (70%) mode change 100755 => 100644 diff --git a/data/control/Makefile.am b/data/control/Makefile.am index d21ed933a..ee4ba16cb 100644 --- a/data/control/Makefile.am +++ b/data/control/Makefile.am @@ -8,7 +8,6 @@ install_SCRIPTS = \ audioplayer.end \ deepstandby.on \ deepstandby.off \ - flash.start \ inactivity.on \ migration.sh \ movieplayer.start \ diff --git a/data/scripts/Makefile.am b/data/scripts/Makefile.am index 9c5fc797f..c8d186930 100644 --- a/data/scripts/Makefile.am +++ b/data/scripts/Makefile.am @@ -12,6 +12,9 @@ install_SCRIPTS = \ wakeup.sh \ install.sh +install_SCRIPTS += \ + start_flash.sh \ + if BOXMODEL_CST_HD2 install_SCRIPTS += \ backup_flash.sh \ diff --git a/data/control/flash.start b/data/scripts/start_flash.sh old mode 100755 new mode 100644 similarity index 70% rename from data/control/flash.start rename to data/scripts/start_flash.sh index dec5a6953..afcd2cac9 --- a/data/control/flash.start +++ b/data/scripts/start_flash.sh @@ -3,5 +3,5 @@ # kill start script first to ignore neutrino's exit codes killall start_neutrino -# run shutdown routine depending on flagfile +# run shutdown routine /etc/init.d/rcK diff --git a/src/global.h b/src/global.h index 1211e1f40..9ae58da09 100644 --- a/src/global.h +++ b/src/global.h @@ -47,7 +47,6 @@ #define NEUTRINO_APP_START_SCRIPT "neutrino.start" // control scripts w/o counterparts in /var -#define NEUTRINO_ENTER_FLASH_SCRIPT CONTROLDIR "/flash.start" #define NEUTRINO_CONF_MIGRATION_SCRIPT CONTROLDIR "/migration.sh" #define COVERDIR_TMP "/tmp/.cover" diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 2d2a4afae..5c7760fd1 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -5690,7 +5690,9 @@ void stop_daemons(bool stopall, bool for_flash) if (!backup_flash_sh.empty()) system(backup_flash_sh.c_str()); //don't fork #endif - my_system(NEUTRINO_ENTER_FLASH_SCRIPT); + std::string start_flash_sh = find_executable("start_flash.sh"); + if (!start_flash_sh.empty()) + my_system(start_flash_sh.c_str()); } InfoClock->enableInfoClock(false);