CatOS "write term all"

john heasley heas at shrubbery.net
Sun Apr 6 20:46:55 UTC 2003


another CatOS request (<insert grumble about not having one to test
this>).

apparently newer CatOS version support an "all" argument to "write
term".  would be great if someone could test the following patch.
it works for those which do not support it.  for those that do, it
should collect both versions of the command, but only display the
"all" version.

thanks

Index: cat5rancid.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/cat5rancid.in,v
retrieving revision 1.27
diff -r1.27 cat5rancid.in
793a794,795
> 	last if (/^Unknown host /);		# error when write term all
> 						# is not supported
794a797
> 	return(0) if ($found_end);
997a1001
> 	'write term all'	=> "WriteTerm",
1012a1017
> 	"write term all",
1065c1070,1074
< 	if (!defined($prompt)) {$prompt = ($_ =~ /^([^>]+>)/)[0]; }
---
> 	if (!defined($prompt)) {
> 	    $prompt = ($_ =~ /^([^>]+>)/)[0];
> 	    $prompt =~ s/([][}{)(\\])/\\$1/g;
> 	    print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
> 	}




More information about the Rancid-discuss mailing list