[rancid] fix for cygwin/vista ping failure?

Lee ler762 at gmail.com
Sat Aug 14 13:38:14 UTC 2010


I'm trying to get rancid working with cygwin on Windows Vista and
there's a problem with ping.

If I install the cygwin version of ping it doesn't work unless it's
run as the admin.  I don't normally log in as the administrator, so
http://cygwin.com/ml/cygwin/2007-12/msg00374.html says to use the
native windoze ping.  Uninstall the cygwin version of ping, try
configure again & I get the
  "can't figure out how to pass count == 1 to $PING_PATH."
error msg from configure.  So I changed the configure script to also
check for the windows flavor of ping:

$PING_PATH -c 1 -v 127.0.0.1 > /dev/null 2>&1
if test $? -eq 0 ; then
    LG_PING_CMD="$PING_PATH -c 1"
else
    $PING_PATH 127.0.0.1 56 1 > /dev/null 2>&1
    if test $? -eq 0 ; then
        LG_PING_CMD="$PING_PATH"
    else
        # cygwin using windows ping?
        $PING_PATH -n 1 127.0.0.1 > /dev/null 2>&1
        if test $? -eq 0 ; then
            LG_PING_CMD="$PING_PATH -n 1"
        else
            as_fn_error "can't figure out how to pass count == 1 to
$PING_PATH." "$LINENO" 5
            exit 1
        fi
    fi
fi

./configure && make && make install
works now as does clogin :)

Now that I've got this far - how do I test it?  As far as I can tell
only lg.cgi uses ping & I'm not planning on using any of the
lookingglass stuff..

Thanks,
Lee


More information about the Rancid-discuss mailing list