public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RANCID on Cygwin
@ 2013-10-08 13:53 Jakub Horbacewicz
  2013-10-08 14:54 ` Ryan Johnson
  2013-10-08 18:55 ` David Stacey
  0 siblings, 2 replies; 7+ messages in thread
From: Jakub Horbacewicz @ 2013-10-08 13:53 UTC (permalink / raw)
  To: cygwin

Hello,

I have to use Windows server for making backups of network devices. To
accomplish that I have to run Rancid, so I need to install Cygwin. Can
you help me with compiling Rancid through Cygwin? I cannot find any
tutorial or tips in google.

Regards.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RANCID on Cygwin
  2013-10-08 13:53 RANCID on Cygwin Jakub Horbacewicz
@ 2013-10-08 14:54 ` Ryan Johnson
  2013-10-08 18:55 ` David Stacey
  1 sibling, 0 replies; 7+ messages in thread
From: Ryan Johnson @ 2013-10-08 14:54 UTC (permalink / raw)
  To: cygwin

On 08/10/2013 9:53 AM, Jakub Horbacewicz wrote:
> Hello,
>
> I have to use Windows server for making backups of network devices. To
> accomplish that I have to run Rancid, so I need to install Cygwin. Can
> you help me with compiling Rancid through Cygwin? I cannot find any
> tutorial or tips in google.
Hopefully that is good news in that the vanilla Linux instructions work 
like a charm. If not, the errors that result from trying to follow the 
Linux directions will be helpful for troubleshooting.

Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RANCID on Cygwin
  2013-10-08 13:53 RANCID on Cygwin Jakub Horbacewicz
  2013-10-08 14:54 ` Ryan Johnson
@ 2013-10-08 18:55 ` David Stacey
  2013-10-11 20:51   ` Lee
  2013-10-16 13:20   ` Jakub Horbacewicz
  1 sibling, 2 replies; 7+ messages in thread
From: David Stacey @ 2013-10-08 18:55 UTC (permalink / raw)
  To: cygwin

On 08/10/2013 14:53, Jakub Horbacewicz wrote:
> I have to use Windows server for making backups of network devices. To
> accomplish that I have to run Rancid, so I need to install Cygwin. Can
> you help me with compiling Rancid through Cygwin? I cannot find any
> tutorial or tips in google.

If you download and unpack the RANCID sources, there is a 'README' file 
in there with some quick installation instructions. Simply follow the 12 
steps listed in that document.

I don't know much about RANCID, but this might get you started: It 
appears that RANCID is mostly written in script languages (perl, 
expect), with a very small amount of C code that has to be compiled. So, 
from a Cygwin terminal:

     # Download and unpack the sources.
     wget ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.8.tar.gz
     tar -xf rancid-2.3.8.tar.gz
     cd rancid-2.3.8

     # Configure.
     ./configure --prefix=/usr
     # This gets stuck checking for 'ping'.
     # I had to open up Windows Task Manager and kill 'ping.exe'.

     # Compile.
     make

Then you can 'make install' to do the installation. This gets you past 
step 2 of the installation instructions in the README file; I'll leave 
it up to you to read and complete the remaining steps.

Cheers,

Dave.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RANCID on Cygwin
  2013-10-08 18:55 ` David Stacey
@ 2013-10-11 20:51   ` Lee
  2013-10-16 13:20   ` Jakub Horbacewicz
  1 sibling, 0 replies; 7+ messages in thread
From: Lee @ 2013-10-11 20:51 UTC (permalink / raw)
  To: cygwin

On 10/8/13, David Stacey <drstacey@tiscali.co.uk> wrote:
> On 08/10/2013 14:53, Jakub Horbacewicz wrote:
>> I have to use Windows server for making backups of network devices. To
>> accomplish that I have to run Rancid, so I need to install Cygwin. Can
>> you help me with compiling Rancid through Cygwin? I cannot find any
>> tutorial or tips in google.
>
> If you download and unpack the RANCID sources, there is a 'README' file
> in there with some quick installation instructions. Simply follow the 12
> steps listed in that document.
>
> I don't know much about RANCID, but this might get you started: It
> appears that RANCID is mostly written in script languages (perl,
> expect), with a very small amount of C code that has to be compiled. So,
> from a Cygwin terminal:
>
>      # Download and unpack the sources.
>      wget ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.8.tar.gz
>      tar -xf rancid-2.3.8.tar.gz
>      cd rancid-2.3.8
>
>      # Configure.
>      ./configure --prefix=/usr
>      # This gets stuck checking for 'ping'.
>      # I had to open up Windows Task Manager and kill 'ping.exe'.

probably the fix for that is to set PING_PATH in configure - eg:

$ cat MYconfigure
#!/bin/sh
# rancid config

# default prefix        is /usr/local/rancid -- make it ~/rancid
# default oldincludedir is /usr/include      -- make it ~/rancid/old/include
# windoze only - cygwin ping does not return non-zerfo status for ping fail so
#                use the windoze ping instead

./configure --prefix=${HOME}/rancid \
            --oldincludedir=${HOME}/rancid/old/include \
            PING_PATH=/cygdrive/c/windows/system32/ping.exe


And if you have any long device names ( > 12 characters??  I don't
remember) you might have to modify the code in clogin:


        # match cisco config mode prompts too, such as router(config-if)#,
        # but catalyst does not change in this fashion.
        # -LR- regsub -all fails on cygwin + long device name.  {1,21} works
        # -LR- regsub -all {^(.{1,11}).*([#>])$} $prompt
{\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
        regsub -all {^(.{1,21}).*([#>])$} $prompt
{\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
        expect {
            -re $reprompt       {}
            -re "\[\n\r]+"      { exp_continue }
        }

Regards,
Lee

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RANCID on Cygwin
  2013-10-08 18:55 ` David Stacey
  2013-10-11 20:51   ` Lee
@ 2013-10-16 13:20   ` Jakub Horbacewicz
  2013-10-17  0:29     ` Lee
  1 sibling, 1 reply; 7+ messages in thread
From: Jakub Horbacewicz @ 2013-10-16 13:20 UTC (permalink / raw)
  To: cygwin

OK, thank you guys for your help. Fortunately I've installed Rancid
(with http://openmaniak.com/rancid_tutorial.php help) on cygwin but
now facing next problem - can't login into any device using clogin. I
can ping, telnet/ssh to any device from my test environment, but
Rancid can not. Always happens nothing, just like that:

Administrator@backup /home/rancid
$ /home/rancid/bin/clogin 10.1.1.4
Administrator@backup /home/rancid

I guess I have correct statements in my .cloginrc and router.db files:
add method 10.1.1.4 telnet
add user 10.1.1.4 username
add password 10.1.1.4 password enablePassword

And:
10.1.1.4:cisco:up

Can anyone help with that? I'm not sure if it's cygwin or only-rancid issue.

Regards,
jh

2013/10/8 David Stacey <drstacey@tiscali.co.uk>:
> On 08/10/2013 14:53, Jakub Horbacewicz wrote:
>>
>> I have to use Windows server for making backups of network devices. To
>> accomplish that I have to run Rancid, so I need to install Cygwin. Can
>> you help me with compiling Rancid through Cygwin? I cannot find any
>> tutorial or tips in google.
>
>
> If you download and unpack the RANCID sources, there is a 'README' file in
> there with some quick installation instructions. Simply follow the 12 steps
> listed in that document.
>
> I don't know much about RANCID, but this might get you started: It appears
> that RANCID is mostly written in script languages (perl, expect), with a
> very small amount of C code that has to be compiled. So, from a Cygwin
> terminal:
>
>     # Download and unpack the sources.
>     wget ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.8.tar.gz
>     tar -xf rancid-2.3.8.tar.gz
>     cd rancid-2.3.8
>
>     # Configure.
>     ./configure --prefix=/usr
>     # This gets stuck checking for 'ping'.
>     # I had to open up Windows Task Manager and kill 'ping.exe'.
>
>     # Compile.
>     make
>
> Then you can 'make install' to do the installation. This gets you past step
> 2 of the installation instructions in the README file; I'll leave it up to
> you to read and complete the remaining steps.
>
> Cheers,
>
> Dave.
>
>
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RANCID on Cygwin
  2013-10-16 13:20   ` Jakub Horbacewicz
@ 2013-10-17  0:29     ` Lee
  2013-10-21  4:04       ` Jakub Horbacewicz
  0 siblings, 1 reply; 7+ messages in thread
From: Lee @ 2013-10-17  0:29 UTC (permalink / raw)
  To: cygwin

On 10/16/13, Jakub Horbacewicz <kubih@partyinfo.com.pl> wrote:
> OK, thank you guys for your help. Fortunately I've installed Rancid
> (with http://openmaniak.com/rancid_tutorial.php help) on cygwin but
> now facing next problem - can't login into any device using clogin. I
> can ping, telnet/ssh to any device from my test environment, but
> Rancid can not. Always happens nothing, just like that:
>
> Administrator@backup /home/rancid
> $ /home/rancid/bin/clogin 10.1.1.4
> Administrator@backup /home/rancid
>
> I guess I have correct statements in my .cloginrc and router.db files:

nope, cloginrc is incorrect

> add method 10.1.1.4 telnet
> add user 10.1.1.4 username
> add password 10.1.1.4 password enablePassword

man cloginrc
   ...
   Note: the braces ({}) surrounding the values is significant when
the values include TCL meta-characters.

I'd suggest always using curly braces - eg:
add user         {10.10.10.10}    {me}
add password  {10.10.10.l0}    {foo}
add method    *  {ssh}

Regards,
Lee


>
> And:
> 10.1.1.4:cisco:up
>
> Can anyone help with that? I'm not sure if it's cygwin or only-rancid
> issue.
>
> Regards,
> jh
>
> 2013/10/8 David Stacey <drstacey@tiscali.co.uk>:
>> On 08/10/2013 14:53, Jakub Horbacewicz wrote:
>>>
>>> I have to use Windows server for making backups of network devices. To
>>> accomplish that I have to run Rancid, so I need to install Cygwin. Can
>>> you help me with compiling Rancid through Cygwin? I cannot find any
>>> tutorial or tips in google.
>>
>>
>> If you download and unpack the RANCID sources, there is a 'README' file
>> in
>> there with some quick installation instructions. Simply follow the 12
>> steps
>> listed in that document.
>>
>> I don't know much about RANCID, but this might get you started: It
>> appears
>> that RANCID is mostly written in script languages (perl, expect), with a
>> very small amount of C code that has to be compiled. So, from a Cygwin
>> terminal:
>>
>>     # Download and unpack the sources.
>>     wget ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.8.tar.gz
>>     tar -xf rancid-2.3.8.tar.gz
>>     cd rancid-2.3.8
>>
>>     # Configure.
>>     ./configure --prefix=/usr
>>     # This gets stuck checking for 'ping'.
>>     # I had to open up Windows Task Manager and kill 'ping.exe'.
>>
>>     # Compile.
>>     make
>>
>> Then you can 'make install' to do the installation. This gets you past
>> step
>> 2 of the installation instructions in the README file; I'll leave it up
>> to
>> you to read and complete the remaining steps.
>>
>> Cheers,
>>
>> Dave.
>>
>>
>>
>>
>> --
>> Problem reports:       http://cygwin.com/problems.html
>> FAQ:                   http://cygwin.com/faq/
>> Documentation:         http://cygwin.com/docs.html
>> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RANCID on Cygwin
  2013-10-17  0:29     ` Lee
@ 2013-10-21  4:04       ` Jakub Horbacewicz
  0 siblings, 0 replies; 7+ messages in thread
From: Jakub Horbacewicz @ 2013-10-21  4:04 UTC (permalink / raw)
  To: cygwin

Hello,

2013/10/17 Lee <ler762@gmail.com>:
> On 10/16/13, Jakub Horbacewicz <kubih@partyinfo.com.pl> wrote:
>> OK, thank you guys for your help. Fortunately I've installed Rancid
>> (with http://openmaniak.com/rancid_tutorial.php help) on cygwin but
>> now facing next problem - can't login into any device using clogin. I
>> can ping, telnet/ssh to any device from my test environment, but
>> Rancid can not. Always happens nothing, just like that:
>>
>> Administrator@backup /home/rancid
>> $ /home/rancid/bin/clogin 10.1.1.4
>> Administrator@backup /home/rancid
>>
>> I guess I have correct statements in my .cloginrc and router.db files:
>
> nope, cloginrc is incorrect
>
>> add method 10.1.1.4 telnet
>> add user 10.1.1.4 username
>> add password 10.1.1.4 password enablePassword
>
> man cloginrc
>    ...
>    Note: the braces ({}) surrounding the values is significant when
> the values include TCL meta-characters.
>
> I'd suggest always using curly braces - eg:
> add user         {10.10.10.10}    {me}
> add password  {10.10.10.l0}    {foo}
> add method    *  {ssh}
>

@Lee - nope, that's not an issue. You can sucessfully put variables
without braces. I could not run Rancid on Cygwin. Fortunately I was
finally allowed to change operating system on that machine so now
Rancid is working perfectly on native Linux OS.

Thank you guys for your help.

Regards.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-20 15:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-08 13:53 RANCID on Cygwin Jakub Horbacewicz
2013-10-08 14:54 ` Ryan Johnson
2013-10-08 18:55 ` David Stacey
2013-10-11 20:51   ` Lee
2013-10-16 13:20   ` Jakub Horbacewicz
2013-10-17  0:29     ` Lee
2013-10-21  4:04       ` Jakub Horbacewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).