[monitoring-plugins] Restrict the nickname length of the test user for ...

Sven Nierlein git at monitoring-plugins.org
Wed Oct 20 11:20:12 CEST 2021


    Module: monitoring-plugins
    Branch: master
    Commit: ead405515fb4bf84ce18d2fe3f621058f09a8aa2
    Author: Lorenz Kästle <lorenz.kaestle at netways.de>
 Committer: Sven Nierlein <sven at nierlein.org>
      Date: Mon Oct 18 10:41:44 2021 +0200
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ead4055

Restrict the nickname length of the test user for check_ircd

check_ircd was using the string `ircd` plus the PID as a nickname
for connecting to a IRC network by default.
This caused errors, when the PID was too high and the network
restricted the length of the nickname to 9 characters.
This patch "fixes" this by just cutting it of, if it gets too big.

---

 plugins-scripts/check_ircd.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl
index 22d21c2..e7ab80c 100755
--- a/plugins-scripts/check_ircd.pl
+++ b/plugins-scripts/check_ircd.pl
@@ -69,7 +69,7 @@ $ENV{'ENV'}='';
 # -----------------------------------------------------------------[ Global ]--
 
 $PROGNAME = "check_ircd";
-my $NICK="ircd$$";
+my $NICK="ircd" . $$ % 10000;
 my $USER_INFO="monitor localhost localhost : ";
 	
 # -------------------------------------------------------------[ connection ]--



More information about the Commits mailing list