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

Origin commit data
------------------
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
This commit is contained in:
vanhofen
2012-10-29 14:29:03 +01:00
parent e0388860f9
commit 22030620dc
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_ENTER_STANDBY_SCRIPT CONFIGDIR "/standby.on"
#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_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");
if(!wakeup){
const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off";
printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script);
if (my_system(neutrino_leave_deepstandby_script) != 0)
perror( neutrino_leave_deepstandby_script );
puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT ".");
if (my_system(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT) != 0)
perror(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT " failed");
}
#endif
@@ -2913,10 +2912,9 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
saveSetup(NEUTRINO_SETTINGS_FILE);
if(retcode) {
const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on";
printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script);
if (my_system(neutrino_enter_deepstandby_script) != 0)
perror(neutrino_enter_deepstandby_script );
puts("[neutrino.cpp] executing " NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT ".");
if (my_system(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT) != 0)
perror(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT " failed");
printf("entering off state\n");
mode = mode_off;