[Nagiosplug-checkins] nagiosplug NPTest.pm,1.12,1.13

Ton Voon tonvoon at users.sourceforge.net
Thu Oct 26 23:32:10 CEST 2006


Update of /cvsroot/nagiosplug/nagiosplug
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19688

Modified Files:
	NPTest.pm 
Log Message:
New test variables default to "none", so no changes required to tinderbox satelites


Index: NPTest.pm
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/NPTest.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- NPTest.pm	12 Oct 2006 13:58:43 -0000	1.12
+++ NPTest.pm	26 Oct 2006 21:32:08 -0000	1.13
@@ -54,8 +54,8 @@
 which will then be returned as "" for the test to skip if appropriate.
 
 If a parameter needs to be entered and the test is run without a tty 
-attached (such as a cronjob), this routine will die causing the test to 
-fail.
+attached (such as a cronjob), the parameter will be assigned as if it 
+was "none". Tests can check for the parameter and skip if not set.
 
 Responses are stored in an external, file-based
 cache so subsequent test runs will use these values. The user is able
@@ -346,7 +346,8 @@
     return $default;
   }
 
-  die "Need to manually enter test parameter $param" unless (-t STDERR);
+  # Set "none" if no terminal attached (eg, tinderbox build servers when new variables set)
+  return "" unless (-t STDERR);
 
   my $userResponse = "";
 





More information about the Commits mailing list