Subversion Repositories camp_sysinfo_client_3

Rev

Rev 109 | Rev 111 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 109 Rev 110
Line 47... Line 47...
47
my @confDirs =    ( '/etc/camp/sysinfo-client', '/usr/local/etc/camp/sysinfo-client' );
47
my @confDirs =    ( '/etc/camp/sysinfo-client', '/usr/local/etc/camp/sysinfo-client' );
48
 
48
 
49
 
49
 
50
our @moduleDirs = ( '/opt/camp/sysinfo-client/modules', '/etc/camp/sysinfo-client/modules' );
50
our @moduleDirs = ( '/opt/camp/sysinfo-client/modules', '/etc/camp/sysinfo-client/modules' );
51
our @scriptDirs = ( '/opt/camp/sysinfo-client/scripts', '/etc/camp/sysinfo-client/scripts' );
51
our @scriptDirs = ( '/opt/camp/sysinfo-client/scripts', '/etc/camp/sysinfo-client/scripts' );
52
our $transports = { '99' => (
-
 
53
                      'name'=> 'SaveLocal',
-
 
54
                      'output directory' => '/tmp',
-
 
55
                      'sendScript' => 'save_local'
-
 
56
                     )
-
 
57
   }; # holds transportation mechanisms
52
our $transports = { }; # holds transportation mechanisms
58
# the following are keys which are specific to the different transport channels
53
# the following are keys which are specific to the different transport channels
59
 
54
 
60
our $sysinfo3 = 'sysinfo-client.yaml';
55
our $sysinfo3 = 'sysinfo-client.yaml';
61
 
56
 
62
our $binDir = '/opt/camp/sysinfo-client';
57
our $binDir = '/opt/camp/sysinfo-client';
Line 232... Line 227...
232
      my $UUID = `dmidecode -t 1 | grep -i uuid | cut -d':' -f2` if `which dmidecode`;
227
      my $UUID = `dmidecode -t 1 | grep -i uuid | cut -d':' -f2` if `which dmidecode`;
233
      $UUID =~ s/\s//gi;
228
      $UUID =~ s/\s//gi;
234
      $config{'UUID'} = $UUID;
229
      $config{'UUID'} = $UUID;
235
   }
230
   }
236
 
231
 
-
 
232
   # ensure we have the default SaveLocal transport defined
-
 
233
   unless ( defined $config{'transports'}{'99'} ) {
-
 
234
      $config{'transports'}{'99'} = {
-
 
235
                         'name'=> 'SaveLocal',
-
 
236
                         'output directory' => '/tmp',
-
 
237
                         'sendScript' => 'save_local'
-
 
238
                        };
-
 
239
   }
-
 
240
 
237
   return \%config;
241
   return \%config;
238
}
242
}
239
 
243
 
240
# prompt the user for a response, then allow them to enter it
244
# prompt the user for a response, then allow them to enter it
241
# the first response is considered the default and is printed
245
# the first response is considered the default and is printed