CNeutrinoApp: add hook for neutrino start

Script will be executed on start of neutrino before. Handling is similar
like all other possible hooks, see global.h.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 78f1b294a9
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-06-15 (Thu, 15 Jun 2017)



------------------
This commit was generated by Migit
This commit is contained in:
2017-06-15 01:01:55 +02:00
parent ddee4406ca
commit 915d9f0676
2 changed files with 5 additions and 0 deletions

View File

@@ -42,6 +42,7 @@
#define MOVIEPLAYER_START_SCRIPT CONFIGDIR "/movieplayer.start" #define MOVIEPLAYER_START_SCRIPT CONFIGDIR "/movieplayer.start"
#define MOVIEPLAYER_END_SCRIPT CONFIGDIR "/movieplayer.end" #define MOVIEPLAYER_END_SCRIPT CONFIGDIR "/movieplayer.end"
#define NEUTRINO_ENTER_FLASH_SCRIPT CONFIGDIR "/flash.start" #define NEUTRINO_ENTER_FLASH_SCRIPT CONFIGDIR "/flash.start"
#define NEUTRINO_APP_START_SCRIPT CONFIGDIR "/neutrino.start"
#define NEUTRINO_SCAN_SETTINGS_FILE CONFIGDIR "/scan.conf" #define NEUTRINO_SCAN_SETTINGS_FILE CONFIGDIR "/scan.conf"
#define NEUTRINO_PARENTALLOCKED_FILE DATADIR "/neutrino/.plocked" #define NEUTRINO_PARENTALLOCKED_FILE DATADIR "/neutrino/.plocked"

View File

@@ -2143,6 +2143,10 @@ void wake_up( bool &wakeup)
int CNeutrinoApp::run(int argc, char **argv) int CNeutrinoApp::run(int argc, char **argv)
{ {
puts("[neutrino] executing " NEUTRINO_APP_START_SCRIPT ".");
if (my_system(NEUTRINO_APP_START_SCRIPT) != 0)
perror(NEUTRINO_APP_START_SCRIPT " failed");
CmdParser(argc, argv); CmdParser(argc, argv);
TIMER_START(); TIMER_START();