The new (0.99.2) qpage.alert script fails to run on Solaris. It probably
fails on a lot more than that. Reading through the script I found the
problem (incorrect test on results from system command) and a seriously
redundant conditional.
Here's a patch which clarifies the conditional and fixes the problem.
** qpage.alert-broken Tue Jun 26 08:45:27 2001
--- qpage.alert Wed Jul 17 03:40:12 2002
***************
*** 50,77 ****
$ALERT = $opt_u ? "UPALERT" : "ALERT";
foreach $pagedest (@ARGV) {
! if ($opt_v)
! {
! if (open(QPAGE, "| qpage -p $pagedest 2>/dev/null"))
{
! print QPAGE "$ALERT $opt_g/$opt_s: $summary ($wday $mon $day $tm)\n";
! print QPAGE @MSG;
! close QPAGE;
}
-
else
{
! die "could not open pipe to qpage: $!\n";
}
- }
-
- else
- {
- if (!system ("qpage -p $pagedest " .
- "'$ALERT $opt_g/$opt_s: $summary ($wday $mon $day $tm)'" .
- "2>/dev/null"))
- {
- die "could not open pipe to qpage: $?\n";
- }
- }
}
--- 50,66 ----
$ALERT = $opt_u ? "UPALERT" : "ALERT";
foreach $pagedest (@ARGV) {
! if (open(QPAGE, "| qpage -p $pagedest 2>/dev/null"))
{
! print QPAGE "$ALERT $opt_g/$opt_s: $summary ($wday $mon $day $tm)\n";
! if ($opt_v)
! {
! print QPAGE @MSG;
! }
! close QPAGE;
}
else
{
! die "could not open pipe to qpage: $!\n";
}
}
--
Joe Rhett Chief Geek
[EMAIL PROTECTED] ISite Services, Inc.