[rancid] wrancid/vpn3k additions
Lance Vermilion
rancid at gheek.net
Mon Oct 2 21:54:15 UTC 2006
All that are interested,
I made a few changes to vpn3k that Michael Stefaniuc posted a while back.
I basically made it run similar to the other rancid scripts, where it reads
in the Environment variables that come from "etc/rancid.conf".
I also changed it so it would auto-yes all ssh questions, instead of failing
when it was asked a question.
my $scp_session = Net::SCP::Expect->new(user=>"$backup_user",password=>"$backup_pass");
+my $scp_session = Net::SCP::Expect->new(user=>"$backup_user",password=>"$backup_pass",auto_yes=>'1');
my $line;
while ($line = <$tempfh>) {
+ if ($ENV{"FILTER_PWDS"} =~ /yes/i)
+ {
if ($line =~ /^#/)
{
next;
}
+ elsif ($line =~ /^trapcomm.*/)
+ {
+ my $line = "trapcomm=<removed>\n";
+ print($fh $line);
+ }
+ elsif ($line =~ /^password.*/)
+ {
+ my $line = "password=<removed>\n";
+ print($fh $line);
+ }
+ else
+ {
print($fh $line);
+ }
+ }
+ else
+ {
+ print($fh $line);
+ }
}
--
-Lance <rancid at gheek.net>
More information about the Rancid-discuss
mailing list