Projet

Général

Profil

Révision 773d5ed4

ID773d5ed4cf06e389ae4cab6acae0f613345808da
Parent 1d56b584
Enfant 2cdb57ae

Ajouté par Steve Schnepp il y a presque 13 ans

mnc: implem first commands

Voir les différences:

tools/munin-node-c/main.c
63 63
		cmd = strtok(line, " \t\n");
64 64
		arg = strtok(line, " \t\n");
65 65

  
66
		if (strlen(cmd) == 0) continue;
67

  
68
		if (strcmp(cmd, "version") == 0) {
66
		if (strlen(cmd) == 0) {
67
		} else if (strcmp(cmd, "version") == 0) {
68
			printf("munin c node version: %s\n", VERSION);
69 69
		} else if (strcmp(cmd, "nodes") == 0) {
70
			printf("%s\n", host);
71
			printf(".\n");
70 72
		} else if (strcmp(cmd, "quit") == 0) {
73
			return(0);
71 74
		} else if (strcmp(cmd, "list") == 0) {
72 75
		} else if (strcmp(cmd, "config") == 0) {
73 76
		} else if (strcmp(cmd, "fetch") == 0) {
74 77
		} else if (strcmp(cmd, "cap") == 0) {
78
			printf("cap ");
79
			if (strlen(spoolfetch_dir)) {
80
				printf("spool ");
81
			}
82
			printf("\n");
75 83
		} else if (strcmp(cmd, "spoolfetch") == 0) {
84
		} else {
85
			printf("# unknown cmd: %s\n", cmd);
76 86
		}
77 87
	}
78 88

  

Formats disponibles : Unified diff