my_system fix

This commit is contained in:
satbaby
2012-09-15 11:20:49 +02:00
parent e45aa72605
commit 87342fd0d9
7 changed files with 36 additions and 23 deletions

View File

@@ -1737,7 +1737,7 @@ void wake_up( bool &wakeup)
if(!wakeup){
const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off";
printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script);
if (file_exists(neutrino_leave_deepstandby_script) && my_system(neutrino_leave_deepstandby_script,NULL,NULL) != 0)
if (my_system(neutrino_leave_deepstandby_script) != 0)
perror( neutrino_leave_deepstandby_script );
}
#endif
@@ -2677,8 +2677,8 @@ _repeat:
return messages_return::handled;
}
else if( msg == NeutrinoMessages::ANNOUNCE_RECORD) {
if(file_exists(NEUTRINO_RECORDING_TIMER_SCRIPT))
my_system(NEUTRINO_RECORDING_TIMER_SCRIPT,NULL,NULL);
my_system(NEUTRINO_RECORDING_TIMER_SCRIPT);
if (g_settings.recording_type == RECORDING_FILE) {
char * recordingDir = ((CTimerd::RecordingInfo*)data)->recordingDir;
for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) {
@@ -2938,14 +2938,14 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
if(retcode) {
const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on";
printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script);
if (file_exists(neutrino_enter_deepstandby_script) && my_system(neutrino_enter_deepstandby_script,NULL,NULL) != 0)
if (my_system(neutrino_enter_deepstandby_script) != 0)
perror(neutrino_enter_deepstandby_script );
printf("entering off state\n");
mode = mode_off;
//CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN));
system("/etc/init.d/rcK");
my_system("/etc/init.d/rcK");
system("/bin/sync");
system("/bin/umount -a");
sleep(1);
@@ -3217,7 +3217,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
standby_channel_id = CZapit::getInstance()->GetCurrentChannelID();
puts("[neutrino.cpp] executing " NEUTRINO_ENTER_STANDBY_SCRIPT ".");
if (file_exists(NEUTRINO_ENTER_STANDBY_SCRIPT) && my_system(NEUTRINO_ENTER_STANDBY_SCRIPT,NULL,NULL) != 0)
if (my_system(NEUTRINO_ENTER_STANDBY_SCRIPT) != 0)
perror(NEUTRINO_ENTER_STANDBY_SCRIPT " failed");
if(!CRecordManager::getInstance()->RecordingStatus())
@@ -3261,7 +3261,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
}
puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_STANDBY_SCRIPT ".");
if (file_exists(NEUTRINO_LEAVE_STANDBY_SCRIPT) && my_system(NEUTRINO_LEAVE_STANDBY_SCRIPT,NULL,NULL) != 0)
if (my_system(NEUTRINO_LEAVE_STANDBY_SCRIPT) != 0)
perror(NEUTRINO_LEAVE_STANDBY_SCRIPT " failed");
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);