Rev 11 | Blame | Last modification | View Log | RSS feed
#! /usr/bin/perl -w
# an extremely basic installer for sysinfo-client
for $dir ( '/opt/camp/sysinfo', '/opt/camp/sysinfo/modules', '/opt/camp/sysinfo/scripts', '/etc/camp', '/etc/camp/usermodules' ) {
`mkdir -p $dir`;
`chmod 0700 $dir`;
`chown root:root $dir`;
}
for $dir ( 'modules', 'scripts' ) {
`cp -av $dir/* /opt/camp/sysinfo/$dir/`;
`chmod 0700 /opt/camp/sysinfo/$dir/*` if $dir eq 'scripts';
`chown root:root /opt/camp/sysinfo/$dir/*`;
}
for $file ( 'sysinfo-client','notes', 'sysinfo-client.conf.template','configure.pl' ) {
`cp $file /opt/camp/sysinfo/`;
`chmod 0600 /opt/camp/sysinfo/$file`;
`chown root:root /opt/camp/sysinfo/$file`;
}
# Create a link into /usr/local/bin
`chmod 0700 /opt/camp/sysinfo/sysinfo-client`;
`chmod 0700 /opt/camp/sysinfo/configure.pl`;
`ln -s /opt/camp/sysinfo/sysinfo-client /usr/local/bin/sysinfo-client`;
`configure.pl`;
1;