neutrino.cpp: handle deepstandy-scripts in same way as the other scripts

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5284ffa3d6
Author: vanhofen <vanhofen@gmx.de>
Date: 2012-10-29 (Mon, 29 Oct 2012)

Origin message was:
------------------
- neutrino.cpp: handle deepstandy-scripts in same way as the other scripts

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2012-10-29 14:29:03 +01:00
parent 080f34ee3a
commit ebdca86596
2 changed files with 8 additions and 8 deletions

View File

@@ -66,6 +66,8 @@
#define NEUTRINO_RECORDING_ENDED_SCRIPT CONFIGDIR "/recording.end" #define NEUTRINO_RECORDING_ENDED_SCRIPT CONFIGDIR "/recording.end"
#define NEUTRINO_ENTER_STANDBY_SCRIPT CONFIGDIR "/standby.on" #define NEUTRINO_ENTER_STANDBY_SCRIPT CONFIGDIR "/standby.on"
#define NEUTRINO_LEAVE_STANDBY_SCRIPT CONFIGDIR "/standby.off" #define NEUTRINO_LEAVE_STANDBY_SCRIPT CONFIGDIR "/standby.off"
#define NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.on"
#define NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.off"
#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"

View File

@@ -1751,10 +1751,9 @@ void wake_up( bool &wakeup)
} }
printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no"); printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no");
if(!wakeup){ if(!wakeup){
const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off"; puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT ".");
printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script); if (my_system(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT) != 0)
if (my_system(neutrino_leave_deepstandby_script) != 0) perror(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT " failed");
perror( neutrino_leave_deepstandby_script );
} }
#endif #endif
@@ -2913,10 +2912,9 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
saveSetup(NEUTRINO_SETTINGS_FILE); saveSetup(NEUTRINO_SETTINGS_FILE);
if(retcode) { if(retcode) {
const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on"; puts("[neutrino.cpp] executing " NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT ".");
printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script); if (my_system(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT) != 0)
if (my_system(neutrino_enter_deepstandby_script) != 0) perror(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT " failed");
perror(neutrino_enter_deepstandby_script );
printf("entering off state\n"); printf("entering off state\n");
mode = mode_off; mode = mode_off;