[rancid] Re: Rancid & Enterasys B2/B3/N3/N7 switch

Valentino Vaia valvai81 at gmail.com
Fri Jan 29 13:29:45 UTC 2010


relychaure at free.fr ha scritto:
> Selon Valentino Vaia <valvai81 at gmail.com>:
>
>   
>> relychaure at free.fr ha scritto:
>>     
>>> Selon Valentino Vaia <valvai81 at gmail.com>:
>>>
>>>
>>>       
>>>> My mail address is  valvai81 at gmail.com .
>>>>
>>>> To correct the error
>>>>
>>>> sh: B2login: command not found
>>>> 192.168.1.1: missed cmd(s): show version,show config
>>>> 192.168.1.1: End of run not found
>>>>
>>>>
>>>> you must add to the $PATH variable the path of yours scripts  for example:
>>>> PATH=$PATH:/usr/local/rancid/bin
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>         
>>> Hi,
>>> When I add PATH=$PATH:/home/rancid/bin in B2rancid script, I have an error
>>>       
>> :
>>     
>>> rancid at nsradminfedlog:~/bin$ ./B2rancid 192.168.1.1
>>> Can't modify constant item in scalar assignment at ./B2rancid line 48, near
>>> "$PATH:"
>>> syntax error at ./B2rancid line 48, near "$PATH:"
>>> "use" not allowed in expression at ./B2rancid line 49, at end of line
>>> Execution of ./B2rancid aborted due to compilation errors.
>>>
>>> I try with the user root but with the same result.
>>>
>>> So I add the PATH on rancid-run script.
>>> rancid at nsradminfedlog:~/bin$ ./rancid-run 192.168.1.1
>>>
>>> I have no error but when I verify the result on
>>> /home/rancid/var/logs/SW_SC_R.20100128.102727, I have nothing !!
>>>
>>> starting: jeudi 28 janvier 2010, 10:27:27 (UTC+0100)
>>>
>>> ending: jeudi 28 janvier 2010, 10:27:27 (UTC+0100)
>>>
>>> So I put the PATH on B2login :
>>> rancid at nsradminfedlog:~/bin$ ./B2rancid 192.168.1.1
>>> sh: B2login: command not found
>>> 192.168.1.1: missed cmd(s): show config
>>> 192.168.1.1: End of run not found
>>> !
>>> rancid at nsradminfedlog:~/bin$ ./B2login 192.168.1.1
>>> can't read "PATH": no such variable
>>>     while executing
>>> "PATH=$PATH:/home/rancid/bin"
>>>     (file "./B2login" line 53)
>>>
>>>
>>>
>>>
>>>
>>> ....
>>> An idea ??
>>>
>>>
>>>
>>>       
>> You haven't to modify the script.
>> At the shell prompt you must modify the $PATH for example
>>
>> rancid at nsradminfedlog:~/bin$ PATH=$PATH:/home/rancid/bin
>>
>>
>> When you execute the rancid-run the $PATH variable is correct, but when
>> you want try the script (perl B2rancid) you must specificate the correct
>> PATH. This is true not only for my scripts (B2rancid and B2login) but
>> also to all the Rancid scripts.
>> You can also modify the B2rancid in the line where is called the B2login
>> from:
>>
>> system "B2login -t $timeo -c "$cisco_cmds" $host </dev/null > $host.raw
>> 2>&1" || die "B2login failed for $host: $!n";
>>
>>
>> to:
>>
>> system "/home/rancid/bin/B2login -t $timeo -c "$cisco_cmds" $host
>> </dev/null > $host.raw 2>&1" || die "B2login failed for $host: $!n";
>>
>>
>>
>>
>>
>>
>>     
>
> rien, nada, nothing ... I have the same results, with or without the PATH
> modification.
>
> rancid at nsradminfedlog:~/bin$ ./B2rancid 192.168.1.1
> 192.168.1.1: End of run not found
> Error: TIMEOUT reached
>
> Just to check, B2login is correct :
> rancid at nsradminfedlog:~/bin$ ./B2login 192.168.1.1
> 192.168.1.1
> spawn ssh -c 3des -x -l ro 192.168.1.1
> ro at 192.168.1.1's password:
>
>
> Enterasys SecureStack B2
> Command Line Interface
>
> Enterasys Networks, Inc.
> 50 Minuteman Rd.
> Andover, MA 01810-1008 U.S.A.
>
> Phone: +1 978 684 1000
> E-mail: support at enterasys.com
> WWW: http://www.enterasys.com
>
> (c) Copyright Enterasys Networks, Inc. 2007
>
> Chassis Serial Number:
> Chassis Firmware Revision:  04.02.01.0006
>
>
> FED-SW-GSI-003-E1(ro)->exit
> Connection to 192.168.1.1 closed by remote host.
> Connection to 192.168.1.1 closed.
>
> Is their any debug mode I can activate ?
>
>   
For me the output is different after the modification of the $PATH variable.
To debug you can try the -d option for example

rancid at nsradminfedlog:~/bin$ ./B2rancid -d 192.168.1.1


in this way in the bin directory you will find a file named 
192.168.1.1.new with the output of the B2login script.
You receive a login timeout from the B2rancid, have you added in the 
.clogin.rc file the username and the password of the switch?
for example:
add user 192.168.1.1 your-username
add userpassword 192.168.1.1 your-password





More information about the Rancid-discuss mailing list