Rev 236 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#!/usr/bin/env perl
use strict;
use warnings;
use Cwd 'abs_path';
use File::Basename;
our $VERSION = '1.2';
# sysinfo module for sysinfo client
# Author: R. W. Rodolico
# Date: 2016-04-08
# Grabs the version of the installed sysinfo-client
#
# 20171124 RWR
# Modified for FreeBSD
#
# 20240519 RWR v1.2
# Assume sysinfo-client in parent directory, so just run it and have it tell us it's version
# assume sysinfo-client is in our parent directory
my $sysinfo = dirname( abs_path( __FILE__ ) ) . '/../';
$sysinfo = abs_path( $sysinfo ) . '/sysinfo-client';
# exit failure unless we can run it. Should never happen
exit 1 unless ( -x $sysinfo );
# run it with the --version flag
my $output = `$sysinfo --version`;
chomp $output;
my $CATEGORY = 'software';
my ($install, $version ) = split ' ', $output;
print "$CATEGORY\t$install\tversion\t$version\n" if $install eq 'sysinfo-client';
exit 0;
Generated by GNU Enscript 1.6.5.90.