#include #include #include "epicsPrint.h" #include "recGbl.h" #include "dbDefs.h" #include "subRecord.h" #include "dbCommon.h" #include "dbAccess.h" #include "recSup.h" #include "callback.h" static char sys_command[1024]; int reboot_init( psub ) struct subRecord* psub; { /* printf( "Input A is set to: <%s> \n", (char*) ((psub->inpa).value.constantStr) ) ; */ /* printf( "Input B is set to: <%s> \n", (char*) ((psub->inpb).value.constantStr) ) ; */ /* printf( "Input C is set to: <%s> \n", (char*) ((psub->inpc).value.constantStr) ) ; */ /* sprintf( sys_command, "%s %s %s", */ /* (char*) ((psub->inpa).value.constantStr), */ /* (char*) ((psub->inpb).value.constantStr), */ /* (char*) ((psub->inpc).value.constantStr) ); */ /* sprintf( sys_command, "%s","/etc/init.d/softioc restart" ) ; */ sprintf( sys_command, "%s","sudo /etc/init.d/softioc restart" ) ; printf("The rebooting command is <%s> \n", sys_command ); return(0); } int reboot_proc( psub ) struct subRecord* psub; { /* printf( "Rebooting IOC \n" ); */ printf( "Rebooting IOC with <%s>\n", sys_command ); /* system( "/etc/init.d/softioc restart" ); */ system( sys_command ); /* system( (char*) ((psub->inpa).value.constantStr) ); */ return 0; }