Lines Matching refs:svctag

126 	char *svctag = NULL;	/* argument to -s */
219 svctag = optarg;
220 if (strlen(svctag) > SVCTAGSIZE) {
221 svctag[SVCTAGSIZE] = '\0';
222 (void) fprintf(stderr, "svctag too long, truncated to <%s>\n", svctag);
224 for (p = svctag; *p; p++) {
312 if (!sawaflag || (pmtag && type) || (!pmtag && !type) || !svctag || !id || !pmspec || (version < 0))
314 add_svc(pmtag, type, svctag, id, pmspec, flags, version, comment, script);
321 if (!pmtag || !svctag || type || script)
323 rem_svc(pmtag, svctag);
330 if (!pmtag || !svctag || type || script)
332 ed_svc(pmtag, svctag, ENABLE);
339 if (!pmtag || !svctag || type || script)
341 ed_svc(pmtag, svctag, DISABLE);
349 list_svcs(pmtag, type, svctag, conflag);
356 if ((pmtag && type) || (!pmtag && !type) || !svctag || (type && !script))
358 doconf(script, pmtag, type, svctag);
380 (void) fprintf(stderr, "Usage:\t%s -a [ -p pmtag | -t type ] -s svctag -i id -m \"pmspecific\"\n", cmdname);
382 (void) fprintf(stderr, "\t%s -r -p pmtag -s svctag\n", cmdname);
383 (void) fprintf(stderr, "\t%s -e -p pmtag -s svctag\n", cmdname);
384 (void) fprintf(stderr, "\t%s -d -p pmtag -s svctag\n", cmdname);
385 (void) fprintf(stderr, "\t%s -l [ -p pmtag | -t type ] [ -s svctag ]\n", cmdname);
386 (void) fprintf(stderr, "\t%s -L [ -p pmtag | -t type ] [ -s svctag ]\n", cmdname);
387 (void) fprintf(stderr, "\t%s -g -p pmtag -s svctag [ -z script ]\n", cmdname);
388 (void) fprintf(stderr, "\t%s -g -s svctag -t type -z script\n", cmdname);
399 * svctag - service's tag
409 add_svc(tag, type, svctag, id, pmspec, flags, version, comment, script)
412 char *svctag;
481 if (find_svc(fp, tp->t_tag, svctag)) {
484 (void) sprintf(buf, "Invalid request, %s already exists under %s", svctag, tag);
489 (void) fprintf(stderr, "warning - %s already exists under %s - ignoring\n", svctag, tp->t_tag);
502 (void) sprintf(fname, "%s/%s", tp->t_tag, svctag);
522 svctag, (flags ? pflags(flags, FALSE) : ""), id, pmspec,
546 * svctag - tag of the service to be removed
550 rem_svc(pmtag, svctag)
552 char *svctag;
581 if ((line = find_svc(fp, pmtag, svctag)) == 0) {
582 (void) sprintf(buf, "Invalid request, %s does not exist under %s", svctag, pmtag);
620 (void) sprintf(buf, "%s/%s/%s", HOME, pmtag, svctag);
632 * svctag - tag of service to be enabled or disabled
637 ed_svc(pmtag, svctag, flag)
639 char *svctag;
673 if ((line = find_svc(fp, pmtag, svctag)) == 0) {
674 (void) sprintf(buf, "Invalid request, %s does not exist under %s", svctag, pmtag);
774 * svctag - tag of service whose config script we're operating on
778 doconf(script, tag, type, svctag)
782 char *svctag;
829 if (!find_svc(fp, tp->t_tag, svctag)) {
832 (void) sprintf(buf, "Invalid request, %s does not exist under %s", svctag, tag);
837 (void) fprintf(stderr, "warning - %s does not exist under %s - ignoring\n", svctag, tp->t_tag);
846 (void) sprintf(fname, "%s/%s", tp->t_tag, svctag);
934 * svctag - tag of service to be listed (may be null)
939 list_svcs(pmtag, type, svctag, oflag)
942 char *svctag;
994 if (!svctag || !strcmp(pp->p_tag, svctag)) {
1024 if (svctag)
1025 (void) fprintf(stderr, "Service <%s> does not exist\n", svctag);
1039 * svctag - tag of service we're looking for
1043 find_svc(FILE *fp, char *tag, char *svctag)
1056 if (!(strcmp(pmtab.p_tag, svctag)))