|
|
1.1 root 1: /*
2: * File: cohtune_ent.c
3: *
4: * Purpose: Invoke "cohtune" script from a C program.
5: *
6: * Revised: Sun Aug 1 14:14:16 1993 CDT
7: */
8:
9: /*
10: * ----------------------------------------------------------------------
11: * Includes.
12: */
13: #include "build0.h"
14:
15: /*
16: * ----------------------------------------------------------------------
17: * Definitions.
18: * Constants.
19: * Macros with argument lists.
20: * Typedefs.
21: * Enums.
22: */
23: #define COHTUNE_SH "/etc/conf/bin/cohtune"
24:
25: /*
26: * ----------------------------------------------------------------------
27: * Functions.
28: * Import Functions.
29: * Export Functions.
30: * Local Functions.
31: */
32: void cohtune_ent __PROTO((char * devName, char * tag, char * line));
33:
34: /*
35: * ----------------------------------------------------------------------
36: * Global Data.
37: * Import Variables.
38: * Export Variables.
39: * Local Variables.
40: */
41:
42: /*
43: * ----------------------------------------------------------------------
44: * Code.
45: */
46:
47: /************************************************************************
48: * cohtune_ent
49: *
50: ***********************************************************************/
51: #if __USE_PROTO__
52: void cohtune_ent (char * devName, char * tag, char * line)
53: #else
54: void
55: cohtune_ent (devName, tag, line)
56: char * devName;
57: char * tag;
58: char * line;
59: #endif
60: {
61: char line1[512];
62: char line2[512];
63:
64: sprintf(line1, "%s %s %s '\"%s\"'", COHTUNE_SH, devName, tag, line);
65: sprintf(line2, "/bin/echo %s >> %s", line1, IDCMDFILE);
66: sys(line2, S_FATAL);
67: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.