From: Frank Schlottmann-G. <fs...@us...> - 2000-11-10 14:08:13
|
Update of /cvsroot/firebird/interbase/utilities In directory slayer.i.sourceforge.net:/tmp/cvs-serv13842/interbase/utilities Modified Files: guard.c ibmgr.c ibmgr.h ibmgrswi.h srvrmgr.c Log Message: Added -s switch to guardian to ignore startup errors and related changes to ibmgr and svrmgr Index: guard.c =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/guard.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** guard.c 2000/10/16 16:09:48 1.2 --- guard.c 2000/11/10 14:08:07 1.3 *************** *** 16,24 **** * All Rights Reserved. * Contributor(s): ______________________________________. */ ! /* contains the main() and not shared routines for ibguard */ #define FOREVER 1 #define ONETIME 2 #define NORMAL_EXIT 0 --- 16,26 ---- * All Rights Reserved. * Contributor(s): ______________________________________. + * $Id$ */ ! /* contains the main() and not shared routines for ibguard */ #define FOREVER 1 #define ONETIME 2 + #define IGNORE 3 #define NORMAL_EXIT 0 *************** *** 82,87 **** option = ONETIME; break; default : ! ib_fprintf (ib_stderr, "Usage: %s [-onetime | -forever (default)]\n", prog_name); exit (-1); --- 84,92 ---- option = ONETIME; break; + case 'S': + option = IGNORE; + break; default : ! ib_fprintf (ib_stderr, "Usage: %s [-signore | -onetime | -forever (default)]\n", prog_name); exit (-1); *************** *** 151,156 **** prog_name, server_args [1] ? server_args [1] : SUPER_SERVER_BINARY, ret_code); ! done = TRUE; /* do not restart we have a startup problem */ ! } else --- 156,175 ---- prog_name, server_args [1] ? server_args [1] : SUPER_SERVER_BINARY, ret_code); ! if (option == IGNORE) ! { ! gds__log ("%s: %s terminated due to startup error (%d)\n Trying again\n", ! prog_name, server_args [1] ? server_args [1] : ! SUPER_SERVER_BINARY, ret_code); ! ! done = FALSE; /* Try it again, Sam (even if it is a startup error) FSG 8.11.2000*/ ! } ! else ! { ! gds__log ("%s: %s terminated due to startup error (%d)\n", ! prog_name, server_args [1] ? server_args [1] : ! SUPER_SERVER_BINARY, ret_code); ! ! done = TRUE; /* do not restart we have a startup problem */ ! } } else *************** *** 159,163 **** server_args [1] ? server_args [1] : SUPER_SERVER_BINARY, ret_code); ! if (option == FOREVER) done = FALSE; } --- 178,182 ---- server_args [1] ? server_args [1] : SUPER_SERVER_BINARY, ret_code); ! if (option == FOREVER || option == IGNORE) done = FALSE; } Index: ibmgr.c =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/ibmgr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ibmgr.c 2000/10/16 16:09:48 1.2 --- ibmgr.c 2000/11/10 14:08:07 1.3 *************** *** 21,24 **** --- 21,25 ---- * All Rights Reserved. * Contributor(s): ______________________________________. + * $Id$ */ *************** *** 412,415 **** --- 413,417 ---- case IN_SW_IBMGR_ONCE: case IN_SW_IBMGR_FOREVER: + case IN_SW_IBMGR_SIGNORE: case IN_SW_IBMGR_SHUT: case IN_SW_IBMGR_NOW: *************** *** 605,608 **** --- 607,611 ---- case IN_SW_IBMGR_ONCE: case IN_SW_IBMGR_FOREVER: + case IN_SW_IBMGR_SIGNORE: case IN_SW_IBMGR_NOW: case IN_SW_IBMGR_NOAT: *************** *** 639,643 **** case IN_SW_IBMGR_ONCE: case IN_SW_IBMGR_FOREVER: ! if (ibmgr_data->operation != OP_START) { err_msg_no = MSG_INVSWOP; --- 642,647 ---- case IN_SW_IBMGR_ONCE: case IN_SW_IBMGR_FOREVER: ! case IN_SW_IBMGR_SIGNORE: ! if (ibmgr_data->operation != OP_START) { err_msg_no = MSG_INVSWOP; *************** *** 646,649 **** --- 650,655 ---- if (in_sw == IN_SW_IBMGR_ONCE) ibmgr_data->suboperation = SOP_START_ONCE; + else if (in_sw == IN_SW_IBMGR_SIGNORE) + ibmgr_data->suboperation = SOP_START_SIGNORE; else ibmgr_data->suboperation = SOP_START_FOREVER; *************** *** 796,800 **** ib_fprintf (OUTFILE, "or ibmgr<RETURN>\n"); ib_fprintf (OUTFILE, " IBMGR> command [-option [parameter]]\n\n"); ! ib_fprintf (OUTFILE, "Commands are: start [-once|-forever] start server\n"); ib_fprintf (OUTFILE, " shut [-now] shutdown server\n"); ib_fprintf (OUTFILE, " show show host and user\n"); --- 802,806 ---- ib_fprintf (OUTFILE, "or ibmgr<RETURN>\n"); ib_fprintf (OUTFILE, " IBMGR> command [-option [parameter]]\n\n"); ! ib_fprintf (OUTFILE, "Commands are: start [-once|-signore|-forever] start server\n"); ib_fprintf (OUTFILE, " shut [-now] shutdown server\n"); ib_fprintf (OUTFILE, " show show host and user\n"); *************** *** 806,810 **** ib_fprintf (OUTFILE, "as an option switches for commands like start or shut.\n"); ib_fprintf (OUTFILE, "For example, to shutdown server you can: \n\n"); ! ib_fprintf (OUTFILE, "ibmgr -shut -password <password>\n\ \n"); ib_fprintf (OUTFILE, "or\n\n"); ib_fprintf (OUTFILE, "ibmgr<RETURN>\n"); --- 812,816 ---- ib_fprintf (OUTFILE, "as an option switches for commands like start or shut.\n"); ib_fprintf (OUTFILE, "For example, to shutdown server you can: \n\n"); ! ib_fprintf (OUTFILE, "ibmgr -shut -password <password>\n\n"); ib_fprintf (OUTFILE, "or\n\n"); ib_fprintf (OUTFILE, "ibmgr<RETURN>\n"); Index: ibmgr.h =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/ibmgr.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** ibmgr.h 2000/10/16 16:09:48 1.2 --- ibmgr.h 2000/11/10 14:08:07 1.3 *************** *** 20,23 **** --- 20,24 ---- * All Rights Reserved. * Contributor(s): ______________________________________. + * $Id$ */ *************** *** 74,78 **** #define SOP_SHUT_IGN 6 #define SOP_PRINT_POOL 7 ! /* Flags that are used in "par_entered" field of the IBMGR_DATA. --- 75,79 ---- #define SOP_SHUT_IGN 6 #define SOP_PRINT_POOL 7 ! #define SOP_START_SIGNORE 8 /* Flags that are used in "par_entered" field of the IBMGR_DATA. Index: ibmgrswi.h =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/ibmgrswi.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** ibmgrswi.h 2000/08/03 20:54:27 1.1.1.1 --- ibmgrswi.h 2000/11/10 14:08:07 1.2 *************** *** 20,23 **** --- 20,24 ---- * All Rights Reserved. * Contributor(s): ______________________________________. + * $Id$ */ *************** *** 47,50 **** --- 48,52 ---- #define IN_SW_IBMGR_PRINT 17 /* Print Stats */ #define IN_SW_IBMGR_POOL 18 /* Print pool */ + #define IN_SW_IBMGR_SIGNORE 19 /* start server, restart when it dies, even if it was a start up error */ #define IN_SW_IBMGR_AMBIG 99 /* ambiguous switch */ *************** *** 54,57 **** --- 56,60 ---- IN_SW_IBMGR_ONCE, 0, "ONCE", 0, 0, 0, FALSE, 0, 1, NULL, /* start server once */ IN_SW_IBMGR_FOREVER, 0, "FOREVER", 0, 0, 0, FALSE, 0, 1, NULL, /* restart when server dies */ + IN_SW_IBMGR_SIGNORE, 0, "SIGNORE", 0, 0, 0, FALSE, 0, 1, NULL, /* dito, ignore start up error */ IN_SW_IBMGR_SHUT, 0, "SHUT", 0, 0, 0, FALSE, 0, 3, NULL, /* shutdown server */ IN_SW_IBMGR_NOW, 0, "NOW", 0, 0, 0, FALSE, 0, 3, NULL, /* immidiate shutdown */ Index: srvrmgr.c =================================================================== RCS file: /cvsroot/firebird/interbase/utilities/srvrmgr.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** srvrmgr.c 2000/08/03 20:54:29 1.1.1.1 --- srvrmgr.c 2000/11/10 14:08:07 1.2 *************** *** 21,24 **** --- 21,25 ---- * All Rights Reserved. * Contributor(s): ______________________________________. + * $Id$ */ *************** *** 486,489 **** --- 487,492 ---- if (data->suboperation == SOP_START_ONCE) argv[1] = "-o"; + else if (data->suboperation == SOP_START_SIGNORE) + argv[1] = "-s"; else argv[1] = "-f"; |