Subversion Repositories camp_sysinfo_client_3

Rev

Rev 251 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 251 Rev 254
Line 1... Line -...
1
Modules should accept one parameter, the name of the directory which has library.pm in it
-
 
2
This is generally the current directory.
1
Modules look for library.pm in the modules directory
3
 
2
 
4
Thus, to call the module linux_networking, you should say
3
Modules should have a call to checkOS (in library.pm) which verifies the 
5
./linux_networking .
4
module is for the current OS.
6
or, if you're in a different directory and the modules are in /opt/camp/sysinfo-client/modules
-
 
7
/opt/camp/sysinfo-client/modules/linux_networking /opt/camp/sysinfo-client/modules
-
 
8
 
5
 
9
Modules will only be executed if:
6
In Unix, the script will be run only if
10
   They are owned by root
7
   It is owned by root
11
   Their execution bit is set for root and all others are set to 0, ie 0700
8
   It's execution bit is set for root and all others are set to 0, ie 0700
-
 
9
On all platforms, the file name must begin with an alpha-numeric, 
12
   The file name begins with an alpha-numeric, and contains only alpha-numerics and underscores. Case does not matter
10
and contains only alpha-numerics and underscores. Case does not matter.
13
 
11
 
14
Each module should test to determine if it can be executed. For example, a module using ipmitool should test for its existence and
12
Each module should test to determine if it can be executed. For example,
-
 
13
a module using ipmitool should test for its existence and simply 
15
simply return nothing if it does not. In other words, no STDERR.
14
return nothing if it does not. In other words, no STDERR. 
-
 
15
 
-
 
16
Modules should return a code
-
 
17
   0 - Everything is fine, and results returned on STDOUT
-
 
18
   1 - Incorrect operating system
-
 
19
   2 - One or more programs needed are not found
-
 
20
   greater than 2 is an arbitrary value which is currently ignored
-
 
21
   
-
 
22
See template.basic for a sample of how to write a module.
-
 
23