Rev 2 | Rev 11 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#! /usr/bin/perl -w
# gets information on linux systems with lsb on them
BEGIN {
push @INC, shift;
}
use library;
my $CATEGORY = 'operatingsystem';
my $command = 'lsb_release';
if ( $command = &validCommandOnSystem('lsb_release') ) {
print "$CATEGORY\tdistribution\t" . &cleanUp(':', qx($command -i)) . "\n";
print "$CATEGORY\tdescription\t" . &cleanUp(':', qx($command -d)) . "\n";
print "$CATEGORY\trelease\t" . &cleanUp(':', qx($command -r)) . "\n";
print "$CATEGORY\tcodename\t" . &cleanUp(':', qx($command -c)) . "\n";
}
if ( $command = &validCommandOnSystem('uname') ) {
print "$CATEGORY\tos_name\t" . &cleanUp('', qx($command -s)) . "\n";
print "$CATEGORY\tkernel\t" . &cleanUp('', qx($command -r)) . "\n";
}
print "$CATEGORY\tos_version\t" . &cleanUp('', qx(cat /proc/version)) . "\n" if -e '/proc/version';