/[monit]/monit/p.y
ViewVC logotype

Diff of /monit/p.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.74 by chopp, Wed Jun 11 15:00:16 2003 UTC revision 1.75 by hauk, Fri Jun 13 00:37:13 2003 UTC
# Line 214  Line 214 
214  %token DEFAULT HTTP FTP SMTP POP IMAP NNTP SSH DWP LDAP2 LDAP3 CERTMD5  %token DEFAULT HTTP FTP SMTP POP IMAP NNTP SSH DWP LDAP2 LDAP3 CERTMD5
215  %token <string> STRING PATH MAILADDR MAILFROM MAILSUBJECT  %token <string> STRING PATH MAILADDR MAILFROM MAILSUBJECT
216  %token <string> MAILBODY  %token <string> MAILBODY
217  %token <number> NUMBER  %token <number> NUMBER PERCENT
218  %token <real> REAL  %token <real> REAL
219  %token CPUUSAGE MEMUSAGE MEMKBYTE TOTALMEMKBYTE TOTALMEMUSAGE CHILDREN  %token CPUUSAGE MEMUSAGE MEMKBYTE TOTALMEMKBYTE TOTALMEMUSAGE CHILDREN
220  %token RESOURCE MEMORY TOTALMEMORY CPU LOADAVG1 LOADAVG5 LOADAVG15  %token RESOURCE MEMORY TOTALMEMORY CPU LOADAVG1 LOADAVG5 LOADAVG15
221  %token AUTOSTART MODE ACTIVE PASSIVE MANUAL  %token AUTOSTART MODE ACTIVE PASSIVE MANUAL
# Line 223  Line 223 
223  %token UID GID ENVIRONMENT  %token UID GID ENVIRONMENT
224  %token TIMESTAMP SECOND MINUTE HOUR DAY  %token TIMESTAMP SECOND MINUTE HOUR DAY
225  %token SSLAUTO SSLV2 SSLV3 TLSV1  %token SSLAUTO SSLV2 SSLV3 TLSV1
226  %token PERCENT BYTE KILOBYTE MEGABYTE GIGABYTE  %token BYTE KILOBYTE MEGABYTE GIGABYTE
227  %token DIRECTORY FILETOK DEVICE PROCESS  %token DIRECTORY FILETOK DEVICE PROCESS
228  %token INODE SPACE PERM  %token INODE SPACE PERM
229    
# Line 423  ssl             : ssldisable { Run.httpd Line 423  ssl             : ssldisable { Run.httpd
423                  | sslenable pemfile clientpemfile allowselfcert {                  | sslenable pemfile clientpemfile allowselfcert {
424                    Run.httpdssl= TRUE;                                      Run.httpdssl= TRUE;                  
425                    if(!have_ssl()) {                    if(!have_ssl()) {
426                      log("%s: SSL is not supported at line %d\n",                      YERROR("SSL is not supported\n");
427                          prog, lineno-1);                    }
                      cfg_errflag++;  
                    }  
428                   }                   }
429                  ;                  ;
430    
# Line 446  pemfile         : PEMFILE PATH { Line 444  pemfile         : PEMFILE PATH {
444                       Run.httpsslpem= $2;                       Run.httpsslpem= $2;
445                       if(!check_file(Run.httpsslpem,                       if(!check_file(Run.httpsslpem,
446                                      "SSL server PEM file", S_IRWXU))                                      "SSL server PEM file", S_IRWXU))
447                           yyerror("Parse error");                           YERROR("SSL server PEM file");
448                    }                    }
449                  ;                  ;
450    
# Line 457  clientpemfile   : /* EMPTY */ Line 455  clientpemfile   : /* EMPTY */
455                       if(!check_file(Run.httpsslclientpem,                       if(!check_file(Run.httpsslclientpem,
456                                      "SSL client PEM file",                                      "SSL client PEM file",
457                                      S_IRWXU | S_IRGRP | S_IROTH))                                      S_IRWXU | S_IRGRP | S_IROTH))
458                           yyerror("Parse error");                           YERROR("SSL client PEM file");
459                    }                    }
460                  ;                  ;
461    
# Line 657  program         : PATH { addchecksum($1, Line 655  program         : PATH { addchecksum($1,
655                  ;                  ;
656    
657  autostart       : AUTOSTART {  autostart       : AUTOSTART {
658                      YERROR("Warning: 'autostart' is deprecated - "                      YERROR("Error: 'autostart' is obsolete - "
659                             "use the 'mode' statement instead");                             "use the 'mode' statement instead");
660                    }                    }
661                  ;                  ;
# Line 684  dependant       : STRING { adddependant( Line 682  dependant       : STRING { adddependant(
682    
683  resource        : /* Old syntax */  resource        : /* Old syntax */
684                    CPUUSAGE operator value {                    CPUUSAGE operator value {
685                      YERROR("Error: 'CPUUSAGE' is deprecated -"                      YERROR("Error: 'CPUUSAGE' is obsolete -"
686                             " use the 'CPU' statement instead");                             " use the 'CPU' statement instead");
687                    }                    }
688                  | MEMUSAGE operator value {                  | MEMUSAGE operator value {
689                      YERROR("Error: 'MEMUSAGE' is deprecated -"                      YERROR("Error: 'MEMUSAGE' is obsolete -"
690                             " use the 'MEMORY' statement instead");                             " use the 'MEMORY' statement instead");
691                    }                    }
692                  | MEMKBYTE operator value {                  | MEMKBYTE operator value {
693                      YERROR("Error: 'MEMKBYTE' is deprecated -"                      YERROR("Error: 'MEMKBYTE' is obsolete -"
694                             " use the 'MEMORY' statement instead");                             " use the 'MEMORY' statement instead");
695                    }                    }
696                  /* New syntax */                  /* New syntax */
# Line 702  resource        : /* Old syntax */ Line 700  resource        : /* Old syntax */
700                      resourceset.limit= (int) ($<real>3 *                      resourceset.limit= (int) ($<real>3 *
701                                                ($<number>4 / 1024.0));                                                ($<number>4 / 1024.0));
702                    }                    }
703                  | MEMORY operator value PERCENT {                  | MEMORY operator PERCENT {
704                      resourceset.resource_id= RESOURCE_ID_MEM_PERCENT;                      resourceset.resource_id= RESOURCE_ID_MEM_PERCENT;
705                      resourceset.operator= $<number>2;                      resourceset.operator= $<number>2;
706                      resourceset.limit= (int) ($<real>3 * 10.0);                      resourceset.limit= (int) ($<number>3 * 10.0);
707                    }                    }
708                  | TOTALMEMORY operator value unit {                  | TOTALMEMORY operator value unit {
709                      resourceset.resource_id= RESOURCE_ID_TOTAL_MEM_KBYTE;                      resourceset.resource_id= RESOURCE_ID_TOTAL_MEM_KBYTE;
# Line 713  resource        : /* Old syntax */ Line 711  resource        : /* Old syntax */
711                      resourceset.limit= (int) ($<real>3 *                      resourceset.limit= (int) ($<real>3 *
712                                                ($<number>4 / 1024.0));                                                ($<number>4 / 1024.0));
713                    }                    }
714                  | TOTALMEMORY operator value PERCENT {                  | TOTALMEMORY operator PERCENT  {
715                      resourceset.resource_id= RESOURCE_ID_TOTAL_MEM_PERCENT;                      resourceset.resource_id= RESOURCE_ID_TOTAL_MEM_PERCENT;
716                      resourceset.operator= $<number>2;                      resourceset.operator= $<number>2;
717                      resourceset.limit= (int) ($<real>3 * 10.0);                      resourceset.limit= (int) ($<number>3 * 10.0);
718                    }                    }
719                  | CPU operator value PERCENT {                  | CPU operator PERCENT {
720                      resourceset.resource_id= RESOURCE_ID_CPU_PERCENT;                      resourceset.resource_id= RESOURCE_ID_CPU_PERCENT;
721                      resourceset.operator= $<number>2;                      resourceset.operator= $<number>2;
722                      resourceset.limit= (int) ($<real>3 * 10.0);                      resourceset.limit= (int) ($<number>3 * 10.0);
723                    }                    }
724                  /* Remaining syntax */                  /* Remaining syntax */
725                  | CHILDREN operator NUMBER {                  | CHILDREN operator NUMBER {
# Line 782  inode           : INODE operator NUMBER Line 780  inode           : INODE operator NUMBER
780                      deviceset.limit_absolute= $3;                      deviceset.limit_absolute= $3;
781                      deviceset.action= $<number>4;                      deviceset.action= $<number>4;
782                    }                    }
783                  | INODE operator NUMBER PERCENT action {                  | INODE operator PERCENT action {
784                      deviceset.resource= RESOURCE_INODE;                      deviceset.resource= RESOURCE_INODE;
785                      deviceset.operator= $<number>2;                      deviceset.operator= $<number>2;
786                      deviceset.limit_percent= $<number>3;                      deviceset.limit_percent= $<number>3;
787                      deviceset.action= $<number>5;                      deviceset.action= $<number>4;
788                    }                    }
789                  ;                  ;
790    
# Line 806  space           : SPACE operator value u Line 804  space           : SPACE operator value u
804                      free(di);                      free(di);
805    
806                    }                    }
807                  | SPACE operator NUMBER PERCENT action {                  | SPACE operator PERCENT action {
808                      deviceset.resource= RESOURCE_SPACE;                      deviceset.resource= RESOURCE_SPACE;
809                      deviceset.operator= $<number>2;                      deviceset.operator= $<number>2;
810                      deviceset.limit_percent= $<number>3;                      deviceset.limit_percent= $<number>3;
811                      deviceset.action= $<number>5;                      deviceset.action= $<number>4;
812                    }                    }
813                  ;                  ;
814    

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26