[Nagiosplug-checkins] nagiosplug NPTest.pm,1.6,1.7
Ton Voon
tonvoon at users.sourceforge.net
Mon Dec 19 01:26:04 CET 2005
Update of /cvsroot/nagiosplug/nagiosplug
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26349
Modified Files:
NPTest.pm
Log Message:
Break out of testing if a new parameter is required
Index: NPTest.pm
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/NPTest.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- NPTest.pm 15 Dec 2005 17:06:54 -0000 1.6
+++ NPTest.pm 19 Dec 2005 09:25:19 -0000 1.7
@@ -53,6 +53,10 @@
user. The user can accept the developer's default value or reply "none"
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.
+
Responses are stored in an external, file-based
cache so subsequent test runs will use these values. The user is able
to change the values by amending the values in the file /var/tmp/NPTest.pm,
@@ -342,6 +346,8 @@
return $default;
}
+ die "Need to manually enter test parameter $param" unless (-t STDERR);
+
my $userResponse = "";
while ( $userResponse eq "" )
More information about the Commits
mailing list