Subversion Repositories camp_sysinfo_client_3

Rev

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

Rev 26 Rev 28
Line 1... Line 1...
1
#!/usr/bin/env perl
1
#!/usr/bin/env perl
2
 
2
 
3
use warnings;
3
use warnings;
4
use strict;  
4
use strict;  
5
 
5
 
6
our $VERSION = '1.0';
6
our $VERSION = '1.1.1';
-
 
7
our @moduleDirs;
7
 
8
 
8
# some debian specific things. NOT a stand alone; loaded by install.pl
9
# some debian specific things. NOT a stand alone; loaded by install.pl
9
sub systemSpecificInstall {
10
sub systemSpecificInstall {
10
   if ( &yesno( 'Add link to cron.daily' ) ) {
11
   if ( &yesno( 'Add link to cron.daily' ) ) {
11
      `rm /etc/cron.daily/sysinfo` if -e '/etc/cron.daily/sysinfo';
12
      `rm /etc/cron.daily/sysinfo` if -e '/etc/cron.daily/sysinfo';
Line 25... Line 26...
25
      `ln -s  /opt/camp/sysinfo/sysinfo-client /usr/local/bin/sysinfo-client`;
26
      `ln -s  /opt/camp/sysinfo/sysinfo-client /usr/local/bin/sysinfo-client`;
26
   }
27
   }
27
 
28
 
28
   # set all modules with debian or unix in the name to run
29
   # set all modules with debian or unix in the name to run
29
   foreach my $directory ( @moduleDirs ) {
30
   foreach my $directory ( @moduleDirs ) {
-
 
31
      my $dh;
30
      opendir ( $dh, $directory ) or die "Could not open directory [$directory]\n";
32
      opendir ( $dh, $directory ) or die "Could not open directory [$directory]\n";
31
      my @modules = grep { /^((dpkg)|(unix))/ } readdir $dh;
33
      my @modules = grep { /^((dpkg)|(unix))/ } readdir $dh;
32
      closedir $dh;
34
      closedir $dh;
33
      foreach my $module (@modules) {
35
      foreach my $module (@modules) {
34
         `chmod 0700 $directory/$module`;
36
         `chmod 0700 $directory/$module`;