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

Diff of /monit/p.y

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

revision 1.99 by martinp, Tue Aug 5 15:03:48 2003 UTC revision 1.100 by martinp, Wed Aug 6 13:10:51 2003 UTC
# Line 506  allow           : ALLOW STRING':'STRING Line 506  allow           : ALLOW STRING':'STRING
506                  ;                  ;
507    
508  checkproc       : CHECKPROC SERVICENAME PIDFILE PATH {  checkproc       : CHECKPROC SERVICENAME PIDFILE PATH {
509                     createservice(TASK_PROCESS, $<string>2,$4);                     createservice(TYPE_PROCESS, $<string>2,$4);
510                     check_name($<string>2);                     check_name($<string>2);
511                    }                    }
512                  | CHECKPROC SERVICENAME PATHTOK PATH {                  | CHECKPROC SERVICENAME PATHTOK PATH {
513                     createservice(TASK_PROCESS, $<string>2,$4);                     createservice(TYPE_PROCESS, $<string>2,$4);
514                     check_name($<string>2);                     check_name($<string>2);
515                    }                    }
516                  ;                  ;
517    
518  checkfile       : CHECKFILE SERVICENAME PATHTOK PATH {  checkfile       : CHECKFILE SERVICENAME PATHTOK PATH {
519                     createservice(TASK_FILE, $<string>2,$4);                     createservice(TYPE_FILE, $<string>2,$4);
520                     check_name($<string>2);                     check_name($<string>2);
521                    }                    }
522                  ;                  ;
523    
524  checkdev        : CHECKDEV SERVICENAME PATHTOK PATH {  checkdev        : CHECKDEV SERVICENAME PATHTOK PATH {
525                     createservice(TASK_DEVICE, $<string>2,$4);                     createservice(TYPE_DEVICE, $<string>2,$4);
526                     check_name($<string>2);                     check_name($<string>2);
527                    }                    }
528                  ;                  ;
529    
530  checkdir        : CHECKDIR SERVICENAME PATHTOK PATH {  checkdir        : CHECKDIR SERVICENAME PATHTOK PATH {
531                     createservice(TASK_DIRECTORY, $<string>2,$4);                     createservice(TYPE_DIRECTORY, $<string>2,$4);
532                     check_name($<string>2);                     check_name($<string>2);
533                    }                    }
534                  ;                  ;
# Line 968  static void initialize() { Line 968  static void initialize() {
968   * Create a new service object and add any current objects to the   * Create a new service object and add any current objects to the
969   * service list.   * service list.
970   */   */
971  static void createservice(int task, char *name, char *path) {  static void createservice(int type, char *name, char *path) {
972    
973    ASSERT(name);    ASSERT(name);
974    ASSERT(path);    ASSERT(path);
# Line 991  static void createservice(int task, char Line 991  static void createservice(int task, char
991    current->uid= -1;    current->uid= -1;
992    current->gid= -1;    current->gid= -1;
993    
994    current->task= task;    current->type= type;
995    current->name= name;    current->name= name;
996    current->path= path;    current->path= path;
997    
# Line 1303  static void addsize(struct SizeSet *ss) Line 1303  static void addsize(struct SizeSet *ss)
1303    
1304    
1305  /*  /*
1306   * Add a new device to the current tasks device list   * Add a new device to the current service's device list
1307   */   */
1308  static void adddevice(struct DeviceSet *ds) {  static void adddevice(struct DeviceSet *ds) {
1309    

Legend:
Removed from v.1.99  
changed lines
  Added in v.1.100

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