mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-27 06:54:16 +01:00
Add shortname failure checks for munin plugins.
This commit is contained in:
parent
21b795b852
commit
b8e98e6049
@ -42,6 +42,14 @@ require_once 'ykval-common.php';
|
||||
$urls = otp2ksmurls('ccccccccfnkjtvvijktfrvvginedlbvudjhjnggndtck', 16);
|
||||
|
||||
$shortnames = array_map('shortname', $urls);
|
||||
foreach($shortnames as $shortname)
|
||||
{
|
||||
if ($shortname === FALSE)
|
||||
{
|
||||
echo "Cannot parse URL from ksm url list\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($argc == 2 && strcmp($argv[1], 'autoconf') == 0)
|
||||
{
|
||||
|
@ -38,7 +38,16 @@ require_once 'ykval-config.php';
|
||||
require_once 'ykval-db.php';
|
||||
|
||||
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
|
||||
|
||||
$shortnames = array_map("shortname", $urls);
|
||||
foreach($shortnames as $shortname)
|
||||
{
|
||||
if ($shortname === FALSE)
|
||||
{
|
||||
echo "Cannot parse URL from sync pool list\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($argc == 2 && strcmp($argv[1], "autoconf") == 0)
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ require_once 'ykval-common.php';
|
||||
$urls = $baseParams['__YKVAL_SYNC_POOL__'];
|
||||
|
||||
$shortnames = array_map('shortname', $urls);
|
||||
foreach($shortnames as $val)
|
||||
foreach($shortnames as $shortname)
|
||||
{
|
||||
if ($val === FALSE)
|
||||
if ($shortname === FALSE)
|
||||
{
|
||||
echo "Cannot parse URL from sync pool list\n";
|
||||
exit(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user