Discussion:
[rancid] Mutating prompts
Howard Jones
2014-04-15 18:38:13 UTC
Permalink
My previously working multi-context ASA/FWSM script appears to have been
more by luck than judgement, and fails if the hostname has a '-' in it,
I guess because there is somewhere it is being interpreted as a regexp
character.

I've just been taking a look at it again, and making a fwsmlogin from
clogin, which understands that the prompt changes when there's a
'changeto' command to move between firewall contexts. Am I right in
thinking I need to redo this stuff in BOTH '*login' and '*rancid' in two
different languages?

Thanks,

Howie
heasley
2014-04-19 16:05:55 UTC
Permalink
Post by Howard Jones
My previously working multi-context ASA/FWSM script appears to have been
more by luck than judgement, and fails if the hostname has a '-' in it,
I guess because there is somewhere it is being interpreted as a regexp
character.
possibly; but - is only a regex atom in []s. clogin tries to escape regex
atoms before using the prompt (see proc run_commands).
Post by Howard Jones
I've just been taking a look at it again, and making a fwsmlogin from
clogin, which understands that the prompt changes when there's a
'changeto' command to move between firewall contexts. Am I right in
thinking I need to redo this stuff in BOTH '*login' and '*rancid' in two
different languages?
Thanks,
Howie
Loading...