Discussion:
[rancid] Netscreen jlogin
Raymond Eustaquio
2012-12-18 20:47:03 UTC
Permalink
I am attempting to run this command.



/home/rancid/bin/flogin -x /usr/bin/isis_foundry_sfo device1 >>
/var/tmp/sw/device1





The scripts never exits because the Netscreen awaits a reply for the
following question:





FW1.SVX:FW1a.SVX(M)-> exit

Configuration modified, save? [y]/n



How can I send a reply of 'n' or skip the question all together?



Ray
heasley
2012-12-18 21:10:33 UTC
Permalink
Post by Raymond Eustaquio
I am attempting to run this command.
/home/rancid/bin/flogin -x /usr/bin/isis_foundry_sfo device1 >>
/var/tmp/sw/device1
The scripts never exits because the Netscreen awaits a reply for the
FW1.SVX:FW1a.SVX(M)-> exit
Configuration modified, save? [y]/n
How can I send a reply of 'n' or skip the question all together?
ah, new reasons to hate foundry. try the following flogin patch and lmk
if it works.

Index: flogin.in
===================================================================
--- flogin.in (revision 2654)
+++ flogin.in (working copy)
@@ -513,7 +513,7 @@

# Run commands given on the command line.
proc run_commands { prompt command } {
- global in_proc
+ global do_saveconfig in_proc
set in_proc 1

send -h "skip-page-display\r"
@@ -543,6 +543,14 @@
return 0
}
eof { return 0 }
+ -re "Configuration modified, save\? \[\r\n]*" {
+ if {$do_saveconfig} {
+ catch {send "y\r"}
+ } else {
+ catch {send "n\r"}
+ }
+ exp_continue
+ }
}
set in_proc 0
}

Loading...