diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-19 09:25:19 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-19 09:25:19 +0000 |
commit | 9c89de133bb6271765075b320a98a6ca9d827202 (patch) | |
tree | 8b0ba594679ef921f7bc1c741842bdaf524dd8db /NPTest.pm | |
parent | 268ad0af8d439a0035f59211677907ee321d4066 (diff) | |
download | monitoring-plugins-9c89de133bb6271765075b320a98a6ca9d827202.tar.gz |
Break out of testing if a new parameter is required
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1301 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'NPTest.pm')
-rw-r--r-- | NPTest.pm | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -53,6 +53,10 @@ developer to interactively request test parameter information from the | |||
53 | user. The user can accept the developer's default value or reply "none" | 53 | user. The user can accept the developer's default value or reply "none" |
54 | which will then be returned as "" for the test to skip if appropriate. | 54 | which will then be returned as "" for the test to skip if appropriate. |
55 | 55 | ||
56 | If a parameter needs to be entered and the test is run without a tty | ||
57 | attached (such as a cronjob), this routine will die causing the test to | ||
58 | fail. | ||
59 | |||
56 | Responses are stored in an external, file-based | 60 | Responses are stored in an external, file-based |
57 | cache so subsequent test runs will use these values. The user is able | 61 | cache so subsequent test runs will use these values. The user is able |
58 | to change the values by amending the values in the file /var/tmp/NPTest.pm, | 62 | to change the values by amending the values in the file /var/tmp/NPTest.pm, |
@@ -342,6 +346,8 @@ sub getTestParameter | |||
342 | return $default; | 346 | return $default; |
343 | } | 347 | } |
344 | 348 | ||
349 | die "Need to manually enter test parameter $param" unless (-t STDERR); | ||
350 | |||
345 | my $userResponse = ""; | 351 | my $userResponse = ""; |
346 | 352 | ||
347 | while ( $userResponse eq "" ) | 353 | while ( $userResponse eq "" ) |