Rev 13 | Blame | Last modification | View Log | RSS feed
#!/usr/bin/env perl
use warnings;
my $thisDir = `pwd`;
chomp $thisDir;
my $targetDir = '/opt/camp/sysinfo-client';
my $modulesDir = $targetDir . '/modules';
my $scriptsDir = $targetDir . '/scripts';
my $confDir = '/etc/camp';
# an extremely basic installer for sysinfo-client
for $dir ( $targetDir, $modulesDir, $scriptsDir, $confDir, $confDir . '/modules', $confDir . '/scripts' ) {
next if -d $dir;
`mkdir -p $dir`;
`chmod 0700 $dir`;
`chown root:root $dir`;
}
for $dir ( 'modules', 'scripts' ) {
`cp -av $dir $targetDir`;
`chmod 0700 $targetDir/$dir/*` if $dir eq 'scripts';
`chown root:root $targetDir/$dir/*`;
}
for $file ( 'sysinfo-client','notes', 'sysinfo-client.conf.template','configure.pl' ) {
`cp $file $targetDir`;
`chmod 0600 $targetDir/$file`;
`chown root:root $targetDir/$file`;
}
# Create a link into /usr/local/bin
`chmod 0700 $targetDir/sysinfo-client`;
`chmod 0700 $targetDir/configure.pl`;
`ln -s $targetDir/sysinfo-client /usr/local/bin/sysinfo-client`;
exec( "$thisDir/configure.pl" );
1;
# rm -fRv /opt/camp/sysinfo-client/ /etc/camp/modules/ /etc/camp/scripts/ /usr/local/bin/sysinfo-client
Generated by GNU Enscript 1.6.5.90.