Skip to content

Instantly share code, notes, and snippets.

@jazzl0ver
Last active April 25, 2025 11:04
Show Gist options
  • Save jazzl0ver/c99a8c177ab18327c0d04287cb13209a to your computer and use it in GitHub Desktop.
Save jazzl0ver/c99a8c177ab18327c0d04287cb13209a to your computer and use it in GitHub Desktop.
fixing "Use of uninitialized value $t in substitution (s///) at /usr/bin/cfgmaker line 1377"
--- cfgmaker.orig 2014-06-10 01:31:00.000000000 +0000
+++ cfgmaker 2025-04-25 11:02:32.424611033 +0000
@@ -16,7 +16,8 @@
# snpo - SNMP Polling
# snpd - SNMP Detail
#@main::DEBUG=qw(base);
-@main::DEBUG=qw(base snpo snpd);
+#@main::DEBUG=qw(base snpo snpd);
+@main::DEBUG=qw();
require 5.005;
use strict;
@@ -176,7 +177,7 @@
if ($1 > 11.2) {push @Variables, "vmVlan";};
if ($1 > 11.3) {push @Variables, "vlanTrunkPortDynamicStatus";};
} elsif ( $routers->{$router}{deviceinfo}{Vendor} =~ /(?:hp|juniper|dlink|wwp|foundry|dellLan|force10|3com|extremenetworks|openBSD|arista|enterasys|zyxel|vyatta)/i) {
- push @Variables, "ifAlias";
+ push @Variables, "ifAlias" if ($routers->{$router}{deviceinfo}{sysDescr} !~ /DGS-1100/);
}
my $descr = $routers->{$router}{deviceinfo}{sysDescr};
@@ -1370,6 +1371,7 @@
for my $g (@{$$opt{"global"}}) {
my ($t,$fs);
$g =~ /^options\[([_^\$])\]:\s*(.*)$/i;
+ next unless (defined $1 && defined $2);
$t = $1;
$fs = $2;
$t =~ s/_/default/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment