[rancid] Error handler for rancid.types.conf/base files.

Per-Olof Olsson peo at chalmers.se
Tue Nov 9 12:58:24 UTC 2021


Hello.

1.
If you miss or typo the "script" line in rancid.types.conf you end up 
with: (rancid 3.13)


 >/etc/rancid.types.conf -t <type> <hostname>
Use of uninitialized value $prog in pattern match (m//) at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 569.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Use of uninitialized value $prog in join or string at 
/home/rancid/peo/rancid/lib/rancid/rancid.pm line 573.
Can't exec "<hostname>": No such file or directory at 
/home/rancid/peo/rancid/bin/rancid line 107.
exec(<hostname>) failed: No such file or directory


What I can see is the "script" line mandatory so is i possible to do 
some test on that this line exists?

---------------------------------------------------------------
$ diff -u rancid.in.org rancid.in
--- rancid.in.org       2021-11-08 16:46:35.000637103 +0100
+++ rancid.in   2021-11-08 16:47:08.133136600 +0100
@@ -41,6 +41,9 @@
  if (loadtype($devtype)) {
      die "Couldn't load device type spec for $rancid::devtype\n";
  }
+if (! defined($script)) {
+    die "script not defined for device type $rancid::devtype\n";
+}
  if (! defined($lscript)) {
      die "login script not defined for device type $rancid::devtype\n";
  }
---------------------------------------------------------------------------

Have been nice and stop me from digging deep into perl scripts any more. 
Just point me to my typos in rancid.types.*.



2.
Also a minor type in rancid.conf.sample.in
#ACLFILTERSEQ=YES; export FILTERSEQ

Expect to export the variable that is been defined.
#ACLFILTERSEQ=YES; export ACLFILTERSEQ



/Peo
----------------------------------------------------------
Per-Olof Olsson               Email: peo at chalmers.se
Chalmers tekniska högskola    IT-avdelningen
Sven Hultins gata 8           412 96 Göteborg
Tel: 031/772 6738     Mob: 0707 88 3708
----------------------------------------------------------



More information about the Rancid-discuss mailing list