add deepstandby.off/on script

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1080 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2011-01-28 12:38:32 +00:00
parent ac97ccbf39
commit 5408966cd0
2 changed files with 13 additions and 1 deletions

View File

@@ -3422,6 +3422,11 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
} }
if(retcode) { if(retcode) {
const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on";
printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script);
if (system(neutrino_enter_deepstandby_script) != 0)
perror(neutrino_enter_deepstandby_script );
printf("entering off state\n"); printf("entering off state\n");
mode = mode_off; mode = mode_off;
//CVFD::getInstance()->ShowText((char *) g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN)); //CVFD::getInstance()->ShowText((char *) g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN));

View File

@@ -38,6 +38,7 @@
#include <coolstream/cs_vfd.h> #include <coolstream/cs_vfd.h>
#include <vector> #include <vector>
#include <cstdlib>
#ifndef FP_IOCTL_CLEAR_WAKEUP_TIMER #ifndef FP_IOCTL_CLEAR_WAKEUP_TIMER
#define FP_IOCTL_CLEAR_WAKEUP_TIMER 10 #define FP_IOCTL_CLEAR_WAKEUP_TIMER 10
@@ -77,9 +78,15 @@ void CTimerManager::Init(void)
close(fd); close(fd);
} }
printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no"); printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no");
if(wakeup) if(wakeup){
creat("/tmp/.wakeup", 0); creat("/tmp/.wakeup", 0);
}else{
const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off";
printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script);
if (system(neutrino_leave_deepstandby_script) != 0)
perror( neutrino_leave_deepstandby_script );
}
loadRecordingSafety(); loadRecordingSafety();
//thread starten //thread starten