[rancid] Fwd: Rancid - cmwlogin - HPE switches
henri hemery
henri.hemery at gmail.com
Thu Oct 24 19:28:39 UTC 2019
> I think I found the solution.
>
> I finally can use h3clogin//h3crancid work for my HPE 5130.
> Here is what I modified in the file h3crancid:
>
> I had to modify the first line by this:
>
> #! /usr/bin/perl5.16.3 --» Because it is what we have in
> /usr/bin
>
> And I also modified this line:
>
> my $logincmd = "/usr/local/rancid/bin/h3clogin"; --» because the
> script was unable to locate h3clogin
>
> Thanks for your help all!
>
>
>
> On Thu, Oct 24, 2019 at 10:27 AM Ugo Bellavance <ugob at lubik.ca> wrote:
>
>> There is no such file on my version (2.3).
>>
>> In 2.3, the config was in rancid-fe, I think and it looked like this:
>>
>> 'h3c' => 'h3crancid',
>>
>> The login command was defined it the *rancid script:
>>
>> my $logincmd = "h3clogin";
>>
>>
>> On Thu, Oct 24, 2019 at 8:55 AM henri hemery <henri.hemery at gmail.com>
>> wrote:
>>
>>> Thanks Ugo, so you modified /usr/local/rancid/etc/rancid.types.conf like
>>> this? :
>>>
>>> h3c;script;h3crancid -t cmw
>>> h3c;login;h3clogin
>>>
>>> On Thu, Oct 24, 2019 at 8:11 AM Ugo Bellavance <ugob at lubik.ca> wrote:
>>>
>>>> I don't know if that helps, but I'm running rancid with a 5120, but I'm
>>>> using h3crancid, because I use an old version of rancid.
>>>>
>>>> Regards
>>>>
>>>> On Thu, Oct 24, 2019 at 8:07 AM henri hemery <henri.hemery at gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>>> Have you read this
>>>>>> https://sites.google.com/site/jrbinks/code/rancid/cmwrancid ?
>>>>>>
>>>>>> Yes, I dicovered cmwlogin from this page and I followed every step,
>>>>> but I think this module is not for every type of comware 7 devices
>>>>>
>>>>>
>>>>>> You may want to read this thread:
>>>>>> http://www.shrubbery.net/pipermail/rancid-discuss/2018-February/010065.html
>>>>>>
>>>>>
>>>>> Yes I read that thread, not so much to learn from..But I gonna try to
>>>>> get in touch with the person.
>>>>>
>>>>>>
>>>>>> On Wed, Oct 23, 2019 at 3:57 PM henri hemery <henri.hemery at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I would like to know if some of you succeeded in backing UP HPE
>>>>>>> switches.
>>>>>>>
>>>>>>> I successfully backed up HP FF 7910, HP 2530, but no way to back up
>>>>>>> HPE 5130 and HP 5120.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> If I type this command:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *[rancid at cardlswbkp1 bin]$ ./cmwlogin -c "display version"
>>>>>>> 10.1.170.1*
>>>>>>>
>>>>>>> *10.1.170.1*
>>>>>>>
>>>>>>> *spawn telnet 10.1.170.1*
>>>>>>>
>>>>>>> *Trying 10.1.170.1...*
>>>>>>>
>>>>>>> *Connected to 10.1.170.1.*
>>>>>>>
>>>>>>> *Escape character is '^]'.*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ********************************************************************************
>>>>>>>
>>>>>>> ** Copyright (c) 2010-2017 Hewlett Packard Enterprise Development
>>>>>>> LP **
>>>>>>>
>>>>>>> ** Without the owner's prior written
>>>>>>> consent, **
>>>>>>>
>>>>>>> ** no decompiling or reverse-engineering shall be
>>>>>>> allowed. **
>>>>>>>
>>>>>>>
>>>>>>> ********************************************************************************
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *login: [login]*
>>>>>>>
>>>>>>> *Password:*
>>>>>>>
>>>>>>> *<MGMSW1>undo smart*
>>>>>>>
>>>>>>> * ^*
>>>>>>>
>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>
>>>>>>> *<MGMSW1>undo interactive*
>>>>>>>
>>>>>>> * ^*
>>>>>>>
>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>
>>>>>>> *<MGMSW1>undo terminal monitor*
>>>>>>>
>>>>>>> *The current terminal is disabled to display logs.*
>>>>>>>
>>>>>>> *<MGMSW1>*
>>>>>>>
>>>>>>> *<MGMSW1>terminal length 0*
>>>>>>>
>>>>>>> * ^*
>>>>>>>
>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>
>>>>>>> *<MGMSW1>terminal width 132*
>>>>>>>
>>>>>>> * ^*
>>>>>>>
>>>>>>> *% Unrecognized command found at '^' position.*
>>>>>>>
>>>>>>> *<MGMSW1>display version*
>>>>>>>
>>>>>>> *HPE Comware Software, Version 7.1.070, Release 3208P03*
>>>>>>>
>>>>>>> *Copyright (c) 2010-2017 Hewlett Packard Enterprise Development LP*
>>>>>>>
>>>>>>> *HPE 5130 24G PoE+ 4SFP+ EI Switch uptime is 10 weeks, 4 days, 6
>>>>>>> hours, 28 minutes*
>>>>>>>
>>>>>>> *Last reboot reason : Cold reboot*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *####suppressed output###*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *Boot image: flash:/5130ei-cmw710-boot-r3208p03.bin*
>>>>>>>
>>>>>>> *Boot image version: 7.1.070, Release 3208P03*
>>>>>>>
>>>>>>> * Compiled Dec 14 2017 18:00:00*
>>>>>>>
>>>>>>> *System image: flash:/5130ei-cmw710-system-r3208p03.bin*
>>>>>>>
>>>>>>> *System image version: 7.1.070, Release 3208P03*
>>>>>>>
>>>>>>> * Compiled Dec 14 2017 18:00:00*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *<MGMSW1>exit*
>>>>>>>
>>>>>>> *Connection closed by foreign host.*
>>>>>>>
>>>>>>> *[rancid at cardlswbkp1 bin]$*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> It work. But when I launch rancid-run, I never receive the output.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> When I type: ./cmwlogin -dl 10.1.170.1, the output is stocked here:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *expect: does "" (spawn_id exp6) match regular expression "[\r\n]+"?
>>>>>>> (No Gate, RE only) gate=yes re=no*
>>>>>>>
>>>>>>> *"^(.+[:.])1 ((>\u0007?|#| \(enable\)))"? (No Gate, RE only)
>>>>>>> gate=yes re=no*
>>>>>>>
>>>>>>> *"^.+(>\u0007?|#| \(enable\))"? (No Gate, RE only) gate=yes re=no*
>>>>>>>
>>>>>>> *<MGMSW1>*
>>>>>>>
>>>>>>> *expect: does "<MGMSW1>" (spawn_id exp6) match regular expression
>>>>>>> "[\r\n]+"? (No Gate, RE only) gate=yes re=no*
>>>>>>>
>>>>>>> *"^(.+[:.])1 ((>\u0007?|#| \(enable\)))"? (No Gate, RE only)
>>>>>>> gate=yes re=no*
>>>>>>>
>>>>>>> *"^.+(>\u0007?|#| \(enable\))"? (No Gate, RE only) gate=yes re=yes*
>>>>>>>
>>>>>>> *expect: set expect_out(0,string) "<MGMSW1>"*
>>>>>>>
>>>>>>> *expect: set expect_out(1,string) ">"*
>>>>>>>
>>>>>>> *expect: set expect_out(spawn_id) "exp6"*
>>>>>>>
>>>>>>> *expect: set expect_out(buffer) "<MGMSW1>"*
>>>>>>>
>>>>>>> *tty_raw_noecho: was raw = 0 echo = 1*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Anybody can help?
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Rancid-discuss mailing list
>>>>>>> Rancid-discuss at shrubbery.net
>>>>>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ugo Bellavance (ugob at lubik.ca)
>>>>>> _______________________________________________
>>>>>> Rancid-discuss mailing list
>>>>>> Rancid-discuss at shrubbery.net
>>>>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>>>>>
>>>>>
>>>>
>>>> --
>>>> Ugo Bellavance (ugob at lubik.ca)
>>>>
>>>
>>
>> --
>> Ugo Bellavance (ugob at lubik.ca)
>>
>
--
Ugo Bellavance (ugob at lubik.ca)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20191024/4a4d9d85/attachment.htm>
More information about the Rancid-discuss
mailing list