Hi all
I have the follow script written in perl, it should look in /var/log/X0rg.0.log and if there is an error reproted in the return a message but i cannot get it to return anything, i have tired chaning the word i grep for to something very simple, like Error but still it returns nothing
#!/usr/bin/perl
use strict;
use Data::Dumper;
use Set::Scalar;
use List::Util qw(first);
use Sys::Hostname;
use lib qw(/tools/SITE/perl);
use dnutil qw(isRenderNode);
exit 0 if (isRenderNode(hostname));
my $PROG = 'xorgchk';
my $xorgconf = '/etc/X11/xorg.conf';
my $xorglog = '/user_data/XorgLog';
# check the X log file for dumb stuff
if (0) {
if (-e "$xorglog") {
open my $xorg_log, $xorglog or die "$PROG: can't open $xorglog: $!\n";
my @xorglog = <$xorg_log>;
close $xorg_log;
if (grep { "Error" } @xorglog) {
print "incorrectly configured Wacom - device not found\n";
}
# XXX more...
}
}
any ideas