summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorunknown <unknown@unknown>2008-12-17 03:43:51 +0000
committerunknown <unknown@unknown>2008-12-17 03:43:51 +0000
commit09f0f026fd4931b90016d0090778983da01c294a (patch)
treed47c450de794595ce6395bde6ff084d75dac48a4
parentb73f299e731fbddae095c0b5eff04717b6dce1af (diff)
downloadrancid-09f0f026fd4931b90016d0090778983da01c294a.zip
rancid-09f0f026fd4931b90016d0090778983da01c294a.tar.gz
rancid-09f0f026fd4931b90016d0090778983da01c294a.tar.xz
Imported from rancid-2.3.2a9.tar.gz.rancid-2.3.2a9
-rw-r--r--CHANGES78
-rw-r--r--COPYING2
-rw-r--r--FAQ6
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in26
-rw-r--r--aclocal.m438
-rw-r--r--bin/Makefile.am13
-rw-r--r--bin/Makefile.in74
-rw-r--r--bin/agmrancid.in5
-rw-r--r--bin/alogin.in32
-rw-r--r--bin/arancid.in27
-rw-r--r--bin/avologin.in351
-rw-r--r--bin/avorancid.in48
-rw-r--r--bin/blogin.in41
-rw-r--r--bin/brancid.in2
-rw-r--r--bin/cat5rancid.in2
-rw-r--r--bin/clogin.in151
-rw-r--r--bin/control_rancid.in22
-rw-r--r--bin/cssrancid.in20
-rw-r--r--bin/elogin.in27
-rw-r--r--bin/erancid.in2
-rw-r--r--bin/f10rancid.in44
-rw-r--r--bin/f5rancid.in645
-rw-r--r--bin/flogin.in54
-rw-r--r--bin/fnrancid.in2
-rw-r--r--bin/francid.in20
-rw-r--r--bin/hlogin.in51
-rw-r--r--bin/hpuifilter.c4
-rw-r--r--bin/hrancid.in16
-rw-r--r--bin/htlogin.in33
-rw-r--r--bin/htrancid.in2
-rw-r--r--bin/jerancid.in14
-rw-r--r--bin/jlogin.in33
-rw-r--r--bin/jrancid.in2
-rw-r--r--bin/lg.cgi.in2
-rw-r--r--bin/lgform.cgi.in2
-rw-r--r--bin/mrancid.in2
-rw-r--r--bin/mrvlogin.in774
-rw-r--r--bin/mrvrancid.in522
-rw-r--r--bin/nlogin.in37
-rw-r--r--bin/nrancid.in2
-rw-r--r--bin/nslogin.in124
-rw-r--r--bin/nsrancid.in42
-rw-r--r--bin/nxrancid.in1835
-rw-r--r--bin/par.in2
-rwxr-xr-xbin/prancid.in2
-rw-r--r--bin/rancid-cvs.in6
-rw-r--r--bin/rancid-fe.in8
-rw-r--r--bin/rancid-run.in2
-rw-r--r--bin/rancid.in109
-rw-r--r--bin/rivlogin.in18
-rw-r--r--bin/rivrancid.in2
-rw-r--r--bin/rrancid.in2
-rwxr-xr-xbin/srancid.in2
-rw-r--r--bin/tlogin.in815
-rw-r--r--bin/tntlogin.in33
-rw-r--r--bin/tntrancid.in2
-rw-r--r--bin/trancid.in300
-rw-r--r--bin/xrancid.in11
-rwxr-xr-xbin/zrancid.in2
-rwxr-xr-xconfigure3207
-rw-r--r--configure.in6
-rw-r--r--etc/Makefile.in5
-rw-r--r--include/Makefile.in18
-rw-r--r--include/version.h2
-rw-r--r--include/version.h.in2
-rw-r--r--man/Makefile.am6
-rw-r--r--man/Makefile.in11
-rw-r--r--man/clogin.14
-rw-r--r--man/nxrancid.11
-rw-r--r--man/rancid.111
-rw-r--r--man/router.db.516
-rw-r--r--man/tlogin.11
-rw-r--r--man/trancid.11
-rw-r--r--share/Makefile.am4
-rw-r--r--share/Makefile.in7
-rw-r--r--share/rancid.spec113
77 files changed, 7564 insertions, 2398 deletions
diff --git a/CHANGES b/CHANGES
index 798b1c7..ae85a0c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,60 @@
2.3.2
+ nxrancid: add "show version build-info". sort snmp-server user.
+
+ rancid: filter filesize and date of tracelogs dir on IOS-XE
+
+ rancid: summarize bytes free for IOS-XE like XR
+
+ nsrancid/nslogin: updates for netscalar version 8 - Marco Schirrmeister
+
+ f10rancid: updated support for all devices running FTOS: E-Series,
+ C-Series and S-Series - Greg Hankins
+
+ clogin: force10/SFTOS fixes for username & logout prompts - Doug Hughes
+
+ f10rancid: SFTOS config end marker has trailing space - Marcus
+ Stoegbauer
+
+ mrvrancid: support for the MRV fiber switch
+
+ rancid: collect GSR linecard route memory - Kritian Larsson
+
+ clogin: new CSS configuration change prompt syntax - Kritian Larsson
+
+ *login: add -- to other sends that take input from the user
+
+ *login: terminate send options with -- to avoid interpretation of -'s
+ in arguments - partly from Ric Anderson
+
+ nxrancid: add support for cisco Nexus boxes; use type cisco-nx
+
+ rancid: Skip "Cryptochecksum:" line on ASA, PIX, et al
+
+ hrancid: K.13 s/w changed cmd 'show system information' - Richard Golier
+
+ rancid: Spot yet another flash disk in show version output.
+
+ rancid: Some support for Cisco Nexus.
+
+ rancid: corrupted flash is not a rancid failure - from John Payne
+
+ rancid.spec: Linux spec file - blame Steve Snodgrass
+
+ rancid: changes for cisco SAN - from Mark Favas
+
+ clogin: escape regex grouping atom '()' in the catalyst prompt - From
+ Casey Deccio
+
+ flogin: handle strange characters like space in prompt w/ the method
+ from clogin for handling regex characters
+
+ francid: filter SSL secret - From Jethro Binks
+
+ francid: privlvl 5 does not allow write term, also run show
+ running-config - from Jethro Binks
+
*login: Return/exit non-zero if there are failures for any of the
- devices on the cmd-line.
+ devices on the cmd-line.
nslogin: password prompt change in newer code - from Derek Andree
@@ -47,14 +101,14 @@
Changes so the RANCID-CONTENT-TYPE is the same as the
documented entry in router.db.5 and the same as the call
in rancid-fe. These RANCID-CONTENT-TYPEs changed:
- brancid from bay to baynet
- cat5rancid from cisco-cat to cat5
- cssrancid from cisco-css to css
- erancid from adc-ezt3 to ezt3
- fnrancid from Fortigate to fortigate
- hrancid from hp-procurve to hp
- jerancid from Juniper_ERX to erx
- srancid from dell to smc
+ brancid from bay to baynet
+ cat5rancid from cisco-cat to cat5
+ cssrancid from cisco-css to css
+ erancid from adc-ezt3 to ezt3
+ fnrancid from Fortigate to fortigate
+ hrancid from hp-procurve to hp
+ jerancid from Juniper_ERX to erx
+ srancid from dell to smc
f5rancid: F5 BigIPs
@@ -80,12 +134,12 @@
Ravin, adjusted to catch the close.
jrancid: Adapt M160 PCG freq rounding to new format - noted by Mark
- Davis
+ Davis
rancid: collect flash size on the FWSM - from Aaron Gee-clough
francid: Fix temperature/show chassis filtering for newer Foundry boxes
- - noted and tested by Gary Roberts
+ - noted and tested by Gary Roberts
rancid: fix Cisco 3825,3845 show version parsing - Michael Stefaniuc
@@ -156,7 +210,7 @@
add -ko to cvs diff commands - Michael Shields
- Add a MAILHEADERS configuration variable for user-defined mail headers
+ Add a MAILHEADERS configuration variable for user-defined mail headers
rancid: match HSRP group numbers greater than 1 char wide - Ed Ravin
diff --git a/COPYING b/COPYING
index ace731a..e6c3846 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/FAQ b/FAQ
index 7d7dfed..5c57bbc 100644
--- a/FAQ
+++ b/FAQ
@@ -67,7 +67,8 @@ A. This is the tty/pty handling of either your O/S or ZebOS. Supposedly,
Q. I am new to CVS, where can I find additional information?
A. The manual page for CVS is quite complete, but can be be overwhelming even
for someone familiar with RCS. There are some excellent resources on the
- web. See http://www.loria.fr/~molli/cvs-index.html
+ web. See http://en.wikipedia.org/wiki/Concurrent_Versions_System and
+ http://cvshome.org/.
Q. Errors are showing up in the logs like:
@@ -141,7 +142,8 @@ A. CVS does not provide a way (AFAIK) to rename files or to rename or delete
If one wanted to move a device to a different group and maintain the
history, the same procedure would work, substituting the new group name
- appropriately, of course.
+ appropriately and editing the router.db of both old and new groups, of
+ course.
SVN provides a rename function; but we suggest that you use it's
copy function instead, and leave the clean-up of the old name
diff --git a/Makefile.am b/Makefile.am
index 3272d16..34f0ad1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@
## $Id$
##
-## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
+## Copyright (C) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This software may be freely copied, modified and redistributed
diff --git a/Makefile.in b/Makefile.in
index 2831d63..4afa063 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -191,6 +191,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
@@ -339,8 +340,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -365,8 +366,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -376,13 +377,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -453,6 +453,10 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -479,6 +483,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -634,7 +640,7 @@ uninstall-am: uninstall-pkgdataDATA
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-shar dist-tarZ dist-zip distcheck distclean \
+ dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
diff --git a/aclocal.m4 b/aclocal.m4
index cc30020..004d2b1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,12 +11,15 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
-You have another version of autoconf. If you want to use that,
-you should regenerate the build system entirely.], [63])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.62],,
+[m4_warning([this file was generated for autoconf 2.62.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -31,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.10], [],
+m4_if([$1], [1.10.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -47,8 +50,10 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10])dnl
-_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -320,7 +325,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
@@ -368,13 +373,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
+# serial 13
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -479,16 +484,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
+_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $1 | $1:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
@@ -786,7 +792,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
-# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 16ad0c1..3ad2a93 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -3,7 +3,7 @@
## $Id$
##
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -49,12 +49,13 @@
AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS = hpuifilter
-bin_SCRIPTS = agmrancid alogin arancid blogin brancid cat5rancid clogin \
- control_rancid cssrancid elogin erancid f10rancid \
+bin_SCRIPTS = agmrancid alogin arancid avologin avorancid blogin brancid \
+ cat5rancid clogin control_rancid cssrancid elogin erancid f10rancid \
flogin fnrancid francid hlogin hrancid htlogin htrancid \
- jerancid jlogin jrancid mrancid nlogin nrancid nslogin \
- nsrancid par prancid rancid-fe rancid rivlogin rivrancid \
- rrancid srancid tntlogin tntrancid xrancid zrancid
+ jerancid jlogin jrancid mrancid mrvlogin mrvrancid nlogin nrancid \
+ nslogin nsrancid nxrancid par prancid rancid-fe rancid rivlogin \
+ rivrancid rrancid srancid tlogin tntlogin tntrancid trancid xrancid \
+ zrancid
bin_SCRIPTS += lg.cgi lgform.cgi rancid-cvs rancid-run
EXTRA_DIST= lg.cgi.in lgform.cgi.in rancid-cvs.in rancid-run.in
diff --git a/bin/Makefile.in b/bin/Makefile.in
index e5f4cd1..51a47bf 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -47,16 +47,19 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/clogin.in $(srcdir)/control_rancid.in \
$(srcdir)/cssrancid.in $(srcdir)/elogin.in \
$(srcdir)/erancid.in $(srcdir)/f10rancid.in \
- $(srcdir)/flogin.in $(srcdir)/fnrancid.in $(srcdir)/francid.in \
- $(srcdir)/hlogin.in $(srcdir)/hrancid.in $(srcdir)/htlogin.in \
+ $(srcdir)/f5rancid.in $(srcdir)/flogin.in \
+ $(srcdir)/fnrancid.in $(srcdir)/francid.in $(srcdir)/hlogin.in \
+ $(srcdir)/hrancid.in $(srcdir)/htlogin.in \
$(srcdir)/htrancid.in $(srcdir)/jerancid.in \
$(srcdir)/jlogin.in $(srcdir)/jrancid.in $(srcdir)/mrancid.in \
+ $(srcdir)/mrvlogin.in $(srcdir)/mrvrancid.in \
$(srcdir)/nlogin.in $(srcdir)/nrancid.in $(srcdir)/nslogin.in \
- $(srcdir)/nsrancid.in $(srcdir)/par.in $(srcdir)/prancid.in \
- $(srcdir)/rancid-fe.in $(srcdir)/rancid.in \
- $(srcdir)/rivlogin.in $(srcdir)/rivrancid.in \
- $(srcdir)/rrancid.in $(srcdir)/srancid.in \
- $(srcdir)/tntlogin.in $(srcdir)/tntrancid.in \
+ $(srcdir)/nsrancid.in $(srcdir)/nxrancid.in $(srcdir)/par.in \
+ $(srcdir)/prancid.in $(srcdir)/rancid-fe.in \
+ $(srcdir)/rancid.in $(srcdir)/rivlogin.in \
+ $(srcdir)/rivrancid.in $(srcdir)/rrancid.in \
+ $(srcdir)/srancid.in $(srcdir)/tlogin.in $(srcdir)/tntlogin.in \
+ $(srcdir)/tntrancid.in $(srcdir)/trancid.in \
$(srcdir)/xrancid.in $(srcdir)/zrancid.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
@@ -67,11 +70,11 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES = control_rancid par rancid-fe agmrancid alogin \
arancid avologin avorancid blogin brancid cat5rancid clogin \
- rancid cssrancid elogin erancid f10rancid flogin francid \
- fnrancid hlogin hrancid htlogin htrancid jlogin jrancid \
- jerancid mrancid nlogin nrancid nslogin nsrancid prancid \
- rivlogin rivrancid rrancid srancid tntlogin tntrancid xrancid \
- zrancid
+ rancid cssrancid elogin erancid f5rancid f10rancid flogin \
+ francid fnrancid hlogin hrancid htlogin htrancid jlogin \
+ jrancid jerancid mrancid mrvlogin mrvrancid nlogin nrancid \
+ nslogin nsrancid nxrancid prancid rivlogin rivrancid rrancid \
+ srancid tlogin tntlogin tntrancid trancid xrancid zrancid
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
@@ -80,7 +83,7 @@ hpuifilter_OBJECTS = $(am_hpuifilter_OBJECTS)
hpuifilter_LDADD = $(LDADD)
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -208,18 +211,20 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#AUTOMAKE_OPTIONS=foreign no-dependencies
AUTOMAKE_OPTIONS = foreign
-bin_SCRIPTS = agmrancid alogin arancid blogin brancid cat5rancid \
- clogin control_rancid cssrancid elogin erancid f10rancid \
- flogin fnrancid francid hlogin hrancid htlogin htrancid \
- jerancid jlogin jrancid mrancid nlogin nrancid nslogin \
- nsrancid par prancid rancid-fe rancid rivlogin rivrancid \
- rrancid srancid tntlogin tntrancid xrancid zrancid lg.cgi \
- lgform.cgi rancid-cvs rancid-run
+bin_SCRIPTS = agmrancid alogin arancid avologin avorancid blogin \
+ brancid cat5rancid clogin control_rancid cssrancid elogin \
+ erancid f10rancid flogin fnrancid francid hlogin hrancid \
+ htlogin htrancid jerancid jlogin jrancid mrancid mrvlogin \
+ mrvrancid nlogin nrancid nslogin nsrancid nxrancid par prancid \
+ rancid-fe rancid rivlogin rivrancid rrancid srancid tlogin \
+ tntlogin tntrancid trancid xrancid zrancid lg.cgi lgform.cgi \
+ rancid-cvs rancid-run
EXTRA_DIST = lg.cgi.in lgform.cgi.in rancid-cvs.in rancid-run.in
#dist_bin_SCRIPTS= $(bin_SCRIPTS:%=%.in)
CLEANFILES = lg.cgi lgform.cgi rancid-cvs rancid-run
@@ -319,6 +324,8 @@ elogin: $(top_builddir)/config.status $(srcdir)/elogin.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
erancid: $(top_builddir)/config.status $(srcdir)/erancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+f5rancid: $(top_builddir)/config.status $(srcdir)/f5rancid.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
f10rancid: $(top_builddir)/config.status $(srcdir)/f10rancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
flogin: $(top_builddir)/config.status $(srcdir)/flogin.in
@@ -343,6 +350,10 @@ jerancid: $(top_builddir)/config.status $(srcdir)/jerancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mrancid: $(top_builddir)/config.status $(srcdir)/mrancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+mrvlogin: $(top_builddir)/config.status $(srcdir)/mrvlogin.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+mrvrancid: $(top_builddir)/config.status $(srcdir)/mrvrancid.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nlogin: $(top_builddir)/config.status $(srcdir)/nlogin.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nrancid: $(top_builddir)/config.status $(srcdir)/nrancid.in
@@ -351,6 +362,8 @@ nslogin: $(top_builddir)/config.status $(srcdir)/nslogin.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
nsrancid: $(top_builddir)/config.status $(srcdir)/nsrancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+nxrancid: $(top_builddir)/config.status $(srcdir)/nxrancid.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
prancid: $(top_builddir)/config.status $(srcdir)/prancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
rivlogin: $(top_builddir)/config.status $(srcdir)/rivlogin.in
@@ -361,10 +374,14 @@ rrancid: $(top_builddir)/config.status $(srcdir)/rrancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
srancid: $(top_builddir)/config.status $(srcdir)/srancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+tlogin: $(top_builddir)/config.status $(srcdir)/tlogin.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
tntlogin: $(top_builddir)/config.status $(srcdir)/tntlogin.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
tntrancid: $(top_builddir)/config.status $(srcdir)/tntrancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+trancid: $(top_builddir)/config.status $(srcdir)/trancid.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
xrancid: $(top_builddir)/config.status $(srcdir)/xrancid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
zrancid: $(top_builddir)/config.status $(srcdir)/zrancid.in
@@ -442,8 +459,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -455,8 +472,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -466,13 +483,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
diff --git a/bin/agmrancid.in b/bin/agmrancid.in
index af6e807..09429cd 100644
--- a/bin/agmrancid.in
+++ b/bin/agmrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -462,7 +462,7 @@ if ($ENV{"FILTER_PWDS"} =~ /no/i) {
$filter_pwds = 1;
}
-ProcessHistory("","","","!RANCID-CONTENT-TYPE: riverhead\n!\n");
+ProcessHistory("","","","!RANCID-CONTENT-TYPE: AGM\n!\n");
ProcessHistory("COMMENTS","keysort","B0","!\n");
ProcessHistory("COMMENTS","keysort","C0","!\n");
TOP: while(<INPUT>) {
@@ -520,7 +520,6 @@ if (scalar(%commands) || !$clean_run || !$found_end) {
printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%commands))) if ($debug);
}
if (!$clean_run || !$found_end) {
-print STDOUT $clean_run . " " . $found_end . "\n";
print STDOUT "$host: End of run not found\n";
print STDERR "$host: End of run not found\n" if ($debug);
system("/usr/bin/tail -1 $host.new");
diff --git a/bin/alogin.in b/bin/alogin.in
index c21b49f..a17bd2a 100644
--- a/bin/alogin.in
+++ b/bin/alogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -385,16 +385,16 @@ proc login { router user userpswd passwd prompt cmethod cyphertype } {
return 1 }
-re "$u_prompt" {
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "$p_prompt" {
sleep 1
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -425,24 +425,14 @@ proc run_commands { prompt command } {
regsub -all "\[)(]" $prompt {\\&} reprompt
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
- expect {
- -re "^\[^\n\r]*$reprompt" {}
- -re "^\[^\n\r ]*>>.*$reprompt" { exp_continue }
- -re "\[\n\r]+" { exp_continue }
- }
- }
- } else {
- send "[subst -nocommands $command]\r"
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
- -re "^\[^\n\r]*$reprompt" {}
- -re "^\[^\n\r ]*>>.*$reprompt" { exp_continue }
- -re "\[\n\r]+" { exp_continue }
+ -re "^\[^\n\r]*$reprompt" {}
+ -re "^\[^\n\r ]*>>.*$reprompt" { exp_continue }
+ -re "\[\n\r]+" { exp_continue }
}
}
send "exit\r"
diff --git a/bin/arancid.in b/bin/arancid.in
index 1ff5f64..366fdd9 100644
--- a/bin/arancid.in
+++ b/bin/arancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -178,11 +178,14 @@ sub ShowVersion {
/^(ACEdirector.*|ACEswitch.*|Alteon.*)/i &&
ProcessHistory("COMMENTS","keysort","A1", "\/\*Model: $1\n") && next;
/^Software Version\s+(.*?)\s\((.*)\)/i &&
- ProcessHistory("COMMENTS","keysort","B1", "\/\*Image: Software: $1 ($2)\n") && next;
+ ProcessHistory("COMMENTS","keysort","B1",
+ "\/\*Image: Software: $1 ($2)\n") && next;
/^Hardware Part No:\s+(.*?)\s+/i &&
- ProcessHistory("COMMENTS","keysort","A2", "\/\*Hardware part no: $1\n") && next;
+ ProcessHistory("COMMENTS","keysort","A2",
+ "\/\*Hardware part no: $1\n") && next;
/^MAC address:\s+([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})/i &&
- ProcessHistory("COMMENTS","keysort","C1", "\/\*Base MAC address: $1\n") && next;
+ ProcessHistory("COMMENTS","keysort","C1",
+ "\/\*Base MAC address: $1\n") && next;
}
return(0);
}
@@ -208,11 +211,11 @@ sub WriteTerm {
next if (/^\/\* Configuration dump taken/i);
next if (/^\/\* Version.*Base MAC.*/i);
- if (/^\/?script end/) {
- $found_end = 1;
- ProcessHistory("","","","$_\n");
- return(1);
- }
+ if (/^\/?script end/) {
+ $found_end = 1;
+ ProcessHistory("","","","$_\n");
+ return(1);
+ }
ProcessHistory("","","","$_\n");
}
@@ -232,8 +235,8 @@ sub DoNothing {print STDOUT;}
@commands = map(keys(%$_), @commandtable);
%commands = map(%$_, @commandtable);
-$cisco_cmds=join(";",@commands);
-$cmds_regexp=join("|",@commands);
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
if (length($host) == 0) {
if ($file) {
@@ -289,7 +292,7 @@ ProcessHistory("COMMENTS","keysort","F0","\/\*\n");
TOP: while(<INPUT>) {
tr/\015//d;
if (/^>>.*$prompt exit/) {
- $clean_run=1;
+ $clean_run = 1;
last;
}
diff --git a/bin/avologin.in b/bin/avologin.in
index ed2617f..b51f841 100644
--- a/bin/avologin.in
+++ b/bin/avologin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (C) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (C) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This software may be freely copied, modified and redistributed
@@ -22,9 +22,9 @@
#
# The login expect scripts were based on Erik Sherk's gwtn, by permission.
#
-# avologin - Cisco login
+# avologin - Avocent login
#
-# Most options are intuitive for logging into a Cisco router.
+# Most options are intuitive for logging into a Avocent/Cyclades term server.
# The default is to enable (thus -noenable). Some folks have
# setup tacacs to have a user login at priv-lvl = 15 (enabled)
# so the -autoenable flag was added for this case (don't go through
@@ -51,31 +51,32 @@ set do_script 0
set avenable 1
# The default is that you login non-enabled (tacacs can have you login already
# enabled)
-set avautoenable 1
+set avautoenable 0
# The default is to look in the password file to find the passwords. This
# tracks if we receive them on the command line.
set do_passwd 1
set do_enapasswd 1
-# attempt at platform switching.
-set platform ""
# Find the user in the ENV, or use the unix userid.
-if {[ info exists env(CISCO_USER) ]} {
+if {[info exists env(CISCO_USER)]} {
set default_user $env(CISCO_USER)
-} elseif {[ info exists env(USER) ]} {
+} elseif {[info exists env(USER)]} {
set default_user $env(USER)
-} elseif {[ info exists env(LOGNAME) ]} {
+} elseif {[info exists env(LOGNAME)]} {
set default_user $env(LOGNAME)
} else {
# This uses "id" which I think is portable. At least it has existed
# (without options) on all machines/OSes I've been on recently -
# unlike whoami or id -nu.
- if [ catch {exec id} reason ] {
+ if [catch {exec id} reason] {
send_error "\nError: could not exec id: $reason\n"
exit 1
}
regexp {\(([^)]*)} "$reason" junk default_user
}
+if {[info exists env(CLOGINRC)]} {
+ set password_file $env(CLOGINRC)
+}
# Sometimes routers take awhile to answer (the default is 10 sec)
set timeout 45
@@ -91,24 +92,24 @@ for {set i 0} {$i < $argc} {incr i} {
# Username
} -u* -
-U* {
- if {! [ regexp .\[uU\](.+) $arg ignore user]} {
+ if {! [regexp .\[uU\](.+) $arg ignore user]} {
incr i
- set username [ lindex $argv $i ]
+ set username [lindex $argv $i]
}
# VTY Password
} -p* -
-P* {
- if {! [ regexp .\[pP\](.+) $arg ignore userpasswd]} {
+ if {! [regexp .\[pP\](.+) $arg ignore userpasswd]} {
incr i
- set userpasswd [ lindex $argv $i ]
+ set userpasswd [lindex $argv $i]
}
set do_passwd 0
# VTY Password
} -v* -
-v* {
- if {! [ regexp .\[vV\](.+) $arg ignore passwd]} {
+ if {! [regexp .\[vV\](.+) $arg ignore passwd]} {
incr i
- set passwd [ lindex $argv $i ]
+ set passwd [lindex $argv $i]
}
set do_passwd 0
# Version string
@@ -118,14 +119,14 @@ for {set i 0} {$i < $argc} {incr i} {
# Enable Username
} -w* -
-W* {
- if {! [ regexp .\[wW\](.+) $arg ignore enauser]} {
+ if {! [regexp .\[wW\](.+) $arg ignore enauser]} {
incr i
- set enausername [ lindex $argv $i ]
+ set enausername [lindex $argv $i]
}
# Environment variable to pass to -s scripts
} -E*
{
- if {[ regexp .\[E\](.+)=(.+) $arg ignore varname varvalue]} {
+ if {[regexp .\[E\](.+)=(.+) $arg ignore varname varvalue]} {
set E$varname $varvalue
} else {
send_user "\nError: invalid format for -E in $arg\n"
@@ -134,27 +135,27 @@ for {set i 0} {$i < $argc} {incr i} {
# Enable Password
} -e*
{
- if {! [ regexp .\[e\](.+) $arg ignore enapasswd]} {
+ if {! [regexp .\[e\](.+) $arg ignore enapasswd]} {
incr i
- set enapasswd [ lindex $argv $i ]
+ set enapasswd [lindex $argv $i]
}
set do_enapasswd 0
# Command to run.
} -c* -
-C* {
- if {! [ regexp .\[cC\](.+) $arg ignore command]} {
+ if {! [regexp .\[cC\](.+) $arg ignore command]} {
incr i
- set command [ lindex $argv $i ]
+ set command [lindex $argv $i]
}
set do_command 1
# Expect script to run.
} -s* -
-S* {
- if {! [ regexp .\[sS\](.+) $arg ignore sfile]} {
+ if {! [regexp .\[sS\](.+) $arg ignore sfile]} {
incr i
- set sfile [ lindex $argv $i ]
+ set sfile [lindex $argv $i]
}
- if { ! [ file readable $sfile ] } {
+ if { ! [file readable $sfile] } {
send_user "\nError: Can't read $sfile\n"
exit 1
}
@@ -162,32 +163,32 @@ for {set i 0} {$i < $argc} {incr i} {
# 'ssh -c' cypher type
} -y* -
-Y* {
- if {! [ regexp .\[eE\](.+) $arg ignore cypher]} {
+ if {! [regexp .\[eE\](.+) $arg ignore cypher]} {
incr i
- set cypher [ lindex $argv $i ]
+ set cypher [lindex $argv $i]
}
# alternate cloginrc file
} -f* -
-F* {
- if {! [ regexp .\[fF\](.+) $arg ignore password_file]} {
+ if {! [regexp .\[fF\](.+) $arg ignore password_file]} {
incr i
- set password_file [ lindex $argv $i ]
+ set password_file [lindex $argv $i]
}
# Timeout
} -t* -
-T* {
- if {! [ regexp .\[tT\](.+) $arg ignore timeout]} {
+ if {! [regexp .\[tT\](.+) $arg ignore timeout]} {
incr i
- set timeout [ lindex $argv $i ]
+ set timeout [lindex $argv $i]
}
# Command file
} -x* -
-X {
- if {! [ regexp .\[xX\](.+) $arg ignore cmd_file]} {
+ if {! [regexp .\[xX\](.+) $arg ignore cmd_file]} {
incr i
- set cmd_file [ lindex $argv $i ]
+ set cmd_file [lindex $argv $i]
}
- if [ catch {set cmd_fd [open $cmd_file r]} reason ] {
+ if [catch {set cmd_fd [open $cmd_file r]} reason] {
send_user "\nError: $reason\n"
exit 1
}
@@ -253,7 +254,7 @@ proc add {var args} { global int_$var ; lappend int_$var $args}
proc include {args} {
global env
regsub -all "(^{|}$)" $args {} args
- if { [ regexp "^/" $args ignore ] == 0 } {
+ if {[regexp "^/" $args ignore] == 0} {
set args $env(HOME)/$args
}
source_password_file $args
@@ -287,16 +288,16 @@ proc source_password_file { password_file } {
send_user "\nError: $password_file must not be world readable/writable\n"
exit 1
}
- if [ catch {source $password_file} reason ] {
+ if [catch {source $password_file} reason] {
send_user "\nError: $reason\n"
exit 1
}
}
# Log into the router.
-# returns: 0 on success, 1 on failure, -1 if rsh was used successfully
+# returns: 0 on success, 1 on failure
proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
- global spawn_id in_proc do_command do_script platform
+ global spawn_id in_proc do_command do_script
global prompt u_prompt p_prompt e_prompt sshcmd
set in_proc 1
set uprompt_seen 0
@@ -308,9 +309,9 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
if [string match "telnet*" $prog] {
regexp {telnet(:([^[:space:]]+))*} $prog command suffix port
if {"$port" == ""} {
- set retval [ catch {spawn telnet $router} reason ]
+ set retval [catch {spawn telnet $router} reason]
} else {
- set retval [ catch {spawn telnet $router $port} reason ]
+ set retval [catch {spawn telnet $router $port} reason]
}
if { $retval } {
send_user "\nError: telnet failed: $reason\n"
@@ -319,89 +320,15 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
} elseif [string match "ssh*" $prog] {
regexp {ssh(:([^[:space:]]+))*} $prog command suffix port
if {"$port" == ""} {
- set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user $router} reason ]
+ set retval [catch {spawn $sshcmd -c $cyphertype -x -l $user $router} reason]
} else {
- set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user -p $port $router} reason ]
+ set retval [catch {spawn $sshcmd -c $cyphertype -x -l $user -p $port $router} reason]
}
if { $retval } {
send_user "\nError: $sshcmd failed: $reason\n"
return 1
}
- } elseif ![string compare $prog "rsh"] {
- global command
-
- if { ! $do_command } {
- if { [llength $cmethod] == 1 } {
- send_user "\nError: rsh is an invalid method for -x and "
- send_user "interactive logins\n"
- }
- if { $progs == 0 } {
- return 1
- }
- continue;
- }
-
- set commands [split $command \;]
- set num_commands [llength $commands]
- set rshfail 0
- for {set i 0} {$i < $num_commands && !$rshfail} { incr i} {
- log_user 0
- set retval [ catch {spawn rsh $user@$router [lindex $commands $i] } reason ]
- if { $retval } {
- send_user "\nError: rsh failed: $reason\n"
- log_user 1; return 1
- }
- send_user "$router# [lindex $commands $i]\n"
-
- # rcmd does not get a pager and no prompts, so we just have to
- # look for failures & lines.
- expect {
- "Connection refused" { catch {close}; catch {wait};
- send_user "\nError: Connection\
- Refused ($prog): $router\n"
- set rshfail 1
- }
- -re "(Connection closed by|Connection to \[^\n\r]+ closed)" {
- catch {close}; catch {wait};
- send_user "\nError: Connection\
- closed ($prog): $router\n"
- set rshfail 1
- }
- "Host is unreachable" { catch {close}; catch {wait};
- send_user "\nError: Host Unreachable:\
- $router\n"
- set rshfail 1
- }
- "No address associated with" {
- catch {close}; catch {wait};
- send_user "\nError: Unknown host\
- $router\n"
- set rshfail 1
- }
- -re "\b+" { exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
- exp_continue
- }
- timeout { catch {close}; catch {wait};
- send_user "\nError: TIMEOUT reached\n"
- set rshfail 1
- }
- eof { catch {close}; catch {wait}; }
- }
- log_user 1
- }
- if { $rshfail } {
- if { !$progs } {
- return 1
- } else {
- continue
- }
- }
- # fake the end of the session for rancid.
- send_user "$router# exit\n"
- # return rsh "success"
- return -1
} else {
send_user "\nError: unknown connection method: $prog\n"
return 1
@@ -488,34 +415,23 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
send_user "\nError: Check your passwd for $router\n"
return 1
}
- "Press any key to continue." {
- # send_user "Pressing the ANY key\n"
- send "\r"
- exp_continue
- }
- -re "Enter Selection: " {
- # Catalyst 1900s have some lame menu. Enter
- # K to reach a command-line.
- send "K\r"
- exp_continue;
- }
-re "@\[^\r\n]+ $p_prompt" {
# ssh pwd prompt
sleep 1
- send "$userpswd\r"
+ send -- "$userpswd\r"
exp_continue
}
-re "$u_prompt" {
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "$p_prompt" {
sleep 1
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -537,13 +453,16 @@ proc do_enable { enauser enapasswd } {
global u_prompt e_prompt
set in_proc 1
- send "enable\r"
+ send "/bin/su\r"
expect {
- -re "$u_prompt" { send "$enauser\r"; exp_continue}
- -re "$e_prompt" { send "$enapasswd\r"; exp_continue}
+ -re "$u_prompt" { send -- "$enauser\r"; exp_continue}
+ -re "$e_prompt" { send -- "$enapasswd\r"; exp_continue}
"#" { set prompt "#" }
- "(enable)" { set prompt "> (enable) " }
- -re "(denied|Sorry|Incorrect)" {
+ -re "su: User not allowed access" {
+ send_user "\nError: Enable access not allowed\n";
+ return 1
+ }
+ -re "(denied|Sorry|Incorrect)" {
# % Access denied - from local auth and poss. others
send_user "\nError: Check your Enable passwd\n";
return 1
@@ -565,109 +484,58 @@ proc do_enable { enauser enapasswd } {
# Run commands given on the command line.
proc run_commands { prompt command } {
- global in_proc platform
+ global in_proc
set in_proc 1
- # If the prompt is (enable), then we are on a switch and the
- # command is "set length 0"; otherwise its "term length 0".
- # skip if its an extreme (since the pager can not be disabled on a
- # per-vty basis).
- if { [ string compare "extreme" "$platform" ] } {
- if [ regexp -- ".*> .*enable" "$prompt" ] {
- send "set length 0\r"
- # This is ugly, but reduces code duplication, allowing the
- # subsequent expects to handle everything as normal.
- set command "set logging session disable;$command"
- } else {
- #send "term length 0\r"
- send "\r"
- }
- # escape any parens in the prompt, such as "(enable)"
- regsub -all {[)(]} $prompt {\\&} reprompt
- # match cisco config mode prompts too, such as router(config-if)#,
- # but catalyst does not change in this fashion.
- regsub -all {^(.{1,14}).*([#>])$} $reprompt {\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
- expect {
- -re $reprompt {}
- -re "\[\n\r]+" { exp_continue }
- }
- } else {
- regsub -all "\[)(]" $prompt {\\&} reprompt
+ # The pager cant be completely disabled
+ send "stty rows 1024\r"
+ # escape any parens in the prompt, such as "(enable)"
+ regsub -all {[)(]} $prompt {\\&} reprompt
+# XXX
+# match cisco config mode prompts too, such as router(config-if)#,
+# but catalyst does not change in this fashion.
+regsub -all {^(.{1,14}).*([#>])$} $reprompt {\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
+ expect {
+ -re $reprompt {}
+ -re "\[\n\r]+" { exp_continue }
}
# this is the only way i see to get rid of more prompts in o/p..grrrrr
log_user 0
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
- # the pager can not be turned off on the PIX, so we have to look
- # for the "More" prompt. the extreme is equally obnoxious, with a
- # global switch in the config.
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
- expect {
- -re "\b+" { exp_continue }
- -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
- }
- -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
- send " "
- # bloody ^[[2K after " "
- expect {
- -re "^\[^\r\n]*\r" {}
- }
- exp_continue
- }
- -re "^ *--More--\[^\n\r]*" {
- send " "
- exp_continue }
- -re "^<-+ More -+>\[^\n\r]*" {
- send_user -- "$expect_out(buffer)"
- send " "
- exp_continue }
- }
- }
- } else {
- # the pager can not be turned off on the PIX, so we have to look
- # for the "More" prompt. the extreme is equally obnoxious, with a
- # global switch in the config.
- send "[subst -nocommands $command]\r"
+
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ # the pager can not be turned off on the PIX, so we have to look
+ # for the "More" prompt. the extreme is equally obnoxious, with a
+ # global switch in the config.
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
- -re "\b+" { exp_continue }
- -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
- }
- -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
- send " "
- # bloody ^[[2K after " "
- expect {
- -re "^\[^\r\n]*\r" {}
- }
- exp_continue
- }
- -re "^ *--More--\[^\n\r]*" {
- send " "
- exp_continue }
- -re "^<-+ More -+>\[^\n\r]*" {
- send_user -- "$expect_out(buffer)"
- send " "
- exp_continue }
+ -re "\b+" { exp_continue }
+ -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)" }
+ -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
+ exp_continue }
+ -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
+ exp_continue }
+ -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
+ send " "
+ # bloody ^[[2K after " "
+ expect {
+ -re "^\[^\r\n]*\r" {}
+ }
+ exp_continue
+ }
+ -re "^ *--More--\[^\n\r]*" { send " "
+ exp_continue }
+ -re "^<-+ More -+>\[^\n\r]*" {
+ send_user -- "$expect_out(buffer)"
+ send " "
+ exp_continue }
}
}
log_user 1
- if { [ string compare "extreme" "$platform" ] } {
- send "exit\r"
- } else {
- send "quit\r"
- }
+ send "exit\r"
expect {
-re "^\[^\n\r *]*$reprompt" {
# the Cisco CE and Jnx ERX
@@ -704,17 +572,17 @@ foreach router [lrange $argv $i end] {
if $avautoenable {
set autoenable 1
set enable 0
- set prompt "(#| \\(enable\\))"
+ set prompt "#"
} else {
set ae [find autoenable $router]
if { "$ae" == "1" } {
set autoenable 1
set enable 0
- set prompt "(#| \\(enable\\))"
+ set prompt "#"
} else {
set autoenable 0
set enable $avenable
- set prompt ">"
+ set prompt "\\\$"
}
}
@@ -804,7 +672,7 @@ foreach router [lrange $argv $i end] {
# Login to the router
if {[login $router $ruser $userpswd $passwd $enapasswd $cmethod $cyphertype]} {
- # if login failed or rsh was successful, move on to the next device
+ # if login failed, move on to the next device
incr exitval
continue
}
@@ -821,20 +689,8 @@ foreach router [lrange $argv $i end] {
send "\r"
expect {
-re "\[\r\n]+" { exp_continue; }
- -re "^(.+:)1 $prompt" { # stoopid extreme cmd-line numbers and
- # prompt based on state of config changes,
- # which may have an * at the beginning.
- set junk $expect_out(1,string)
- regsub -all "^\\\* " $expect_out(1,string) {} junk
- set prompt ".? ?$junk\[0-9]+ $expect_out(2,string)";
- set platform "extreme"
- }
-re "^.+$prompt" { set junk $expect_out(0,string);
- regsub -all "\[\]\[]" $junk {\\&} prompt;
- }
- -re "^.+> \\\(enable\\\)" {
- set junk $expect_out(0,string);
- regsub -all "\[\]\[]" $junk {\\&} prompt;
+ regsub -all "\[\]\[\$]" $junk {\\&} prompt;
}
}
@@ -844,9 +700,10 @@ foreach router [lrange $argv $i end] {
continue
}
} elseif { $do_script } {
+ # XXX
# If the prompt is (enable), then we are on a switch and the
# command is "set length 0"; otherwise its "term length 0".
- if [ regexp -- ".*> .*enable" "$prompt" ] {
+ if [regexp -- ".*> .*enable" "$prompt"] {
#send "set length 0\r"
#send "set logging session disable\r"
} else {
diff --git a/bin/avorancid.in b/bin/avorancid.in
index 511eb80..33b77d3 100644
--- a/bin/avorancid.in
+++ b/bin/avorancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (C) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (C) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This software may be freely copied, modified and redistributed
@@ -147,21 +147,21 @@ sub sortbyipaddr {
}
# This routine parses "cat"
-sub CatFiles {
- print STDERR " In CatFiles: $_" if ($debug);
+sub CatFile {
+ print STDERR " In CatFile: $_" if ($debug);
- $catfile=$1;
- $catfile=~s/cat //;
+ $catfile = $1;
+ $catfile =~ s/cat //;
ProcessHistory("COMMENTS","","","! $catfile\n");
while (<INPUT>) {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
-# return(1) if /Line has invalid autocommand /;
+ return(-1) if /: Permission denied/;
ProcessHistory("COMMENTS","","","$_");
}
ProcessHistory("COMMENTS","","","!\n");
- if ( $catfile == "/etc/security.opts" ) { $found_end=1;$clean_run=1;};
+ if ( $catfile == "/etc/security.opts" ) { $found_end = 1; $clean_run = 1;};
return(0);
}
@@ -170,23 +170,23 @@ sub DoNothing {print STDOUT;}
# Main
@commandtable = (
- {'cat /etc/hostname' => 'CatFiles'},
- {'cat /etc/domainname.conf' => 'CatFiles'},
- {'cat /etc/resolv.conf' => 'CatFiles'},
- {'cat /etc/portslave/pslave.conf' => 'CatFiles'},
- {'cat /etc/passwd' => 'CatFiles'},
- {'cat /etc/snmp/snmpd.conf' => 'CatFiles'},
- {'cat /etc/network/ifcfg_eth0' => 'CatFiles'},
- {'cat /etc/network/st_routes' => 'CatFiles'},
- {'cat /etc/security.opts' => 'CatFiles'},
+ {'cat /etc/hostname' => 'CatFile'},
+ {'cat /etc/domainname.conf' => 'CatFile'},
+ {'cat /etc/resolv.conf' => 'CatFile'},
+ {'cat /etc/portslave/pslave.conf' => 'CatFile'},
+ {'cat /etc/passwd' => 'CatFile'},
+ {'cat /etc/snmp/snmpd.conf' => 'CatFile'},
+ {'cat /etc/network/ifcfg_eth0' => 'CatFile'},
+ {'cat /etc/network/st_routes' => 'CatFile'},
+ {'cat /etc/security.opts' => 'CatFile'},
);
# Use an array to preserve the order of the commands and a hash for mapping
# commands to the subroutine and track commands that have been completed.
@commands = map(keys(%$_), @commandtable);
%commands = map(%$_, @commandtable);
-$cisco_cmds=join(";",@commands);
-$cmds_regexp=join("|",@commands);
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
open(OUTPUT,">$host.new") || die "Can't open $host.new for writing: $!\n";
select(OUTPUT);
@@ -235,21 +235,21 @@ ProcessHistory("COMMENTS","keysort","F0","!\n");
ProcessHistory("COMMENTS","keysort","G0","!\n");
TOP: while(<INPUT>) {
tr/\015//d;
- if (/[>#]\s?exit$/) {
- $clean_run=1;
+ if (/[#\$] exit$/) {
+ $clean_run = 1;
last;
}
if (/^Error:/) {
print STDOUT ("$host avologin error: $_");
print STDERR ("$host avologin error: $_") if ($debug);
- $clean_run=0;
+ $clean_run = 0;
last;
}
- while (/#\s*($cmds_regexp)\s*$/) {
+ while (/[#\$]\s*($cmds_regexp)\s*$/) {
$cmd = $1;
if (!defined($prompt)) {
- $prompt = ($_ =~ /^([^#]+#)/)[0];
- $prompt =~ s/([][}{)(\\])/\\$1/g;
+ $prompt = ($_ =~ /^([^#\$]+[#\$] )/)[0];
+ $prompt =~ s/([][}{)(\\\$])/\\$1/g;
print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
}
print STDERR ("HIT COMMAND:$_") if ($debug);
diff --git a/bin/blogin.in b/bin/blogin.in
index 9851493..27b89b2 100644
--- a/bin/blogin.in
+++ b/bin/blogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -405,26 +405,26 @@ proc login { router user userpswd passwd enapasswd prompt cmethod cyphertype } {
send "no\r"
send_user "\nError: host key mismatch for $router. Update the SSH known_hosts file accordingly.\n"
return 1 }
- -re "$u_prompt" { send "$user\r"
+ -re "$u_prompt" { send -- "$user\r"
expect {
eof { send_user "\nError: Couldn't login\n"; wait; return 1 }
"Login invalid" { send_user "\nError: Invalid login\n";
catch {close}; catch {wait};
return 1 }
- -re "$p_prompt" { send "$userpswd\r" }
+ -re "$p_prompt" { send -- "$userpswd\r" }
"$prompt" { set in_proc 0; return 0 }
}
exp_continue
}
-re "$p_prompt" {
if ![string compare $prog "ssh"] {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
expect {
eof { send_user "\nError: Couldn't login\n"; wait; return 1 }
- -re "$e_prompt" { send "$enapasswd\r" }
+ -re "$e_prompt" { send -- "$enapasswd\r" }
"$prompt" { set in_proc 0; return 0 }
}
exp_continue
@@ -448,8 +448,8 @@ proc do_enable { enauser enapasswd } {
send "enable\r"
expect {
- -re "$u_prompt" { send "$enauser\r"; exp_continue}
- -re "$e_prompt" { send "$enapasswd\r"; exp_continue}
+ -re "$u_prompt" { send -- "$enauser\r"; exp_continue}
+ -re "$e_prompt" { send -- "$enapasswd\r"; exp_continue}
"#" { set prompt "#" }
"(enable)" { set prompt "> (enable) " }
denied { send_user "\nError: Check your Enable passwd\n"
@@ -477,25 +477,14 @@ proc run_commands { prompt command } {
regsub -all "\[)(]" $prompt {\\&} reprompt
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
-
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
- expect {
- -re "^\[^\n\r *]*$reprompt" {}
- -re "^\[^\n\r]*$reprompt." { exp_continue }
- -re "\[\n\r]+" { exp_continue }
- }
- }
- } else {
- send "[subst -nocommands $command]\r"
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
- -re "^\[^\n\r *]*$reprompt" {}
- -re "^\[^\n\r]*$reprompt." { exp_continue }
- -re "\[\n\r]+" { exp_continue }
+ -re "^\[^\n\r *]*$reprompt" {}
+ -re "^\[^\n\r]*$reprompt." { exp_continue }
+ -re "\[\n\r]+" { exp_continue }
}
}
send "logout\r"
diff --git a/bin/brancid.in b/bin/brancid.in
index 27bb0ff..5419808 100644
--- a/bin/brancid.in
+++ b/bin/brancid.in
@@ -4,7 +4,7 @@
## hacked version of Hank's rancid - this one tries to deal with Bay's.
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/cat5rancid.in b/bin/cat5rancid.in
index 5c8b65d..9dc8103 100644
--- a/bin/cat5rancid.in
+++ b/bin/cat5rancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/clogin.in b/bin/clogin.in
index 4431f63..b3e4c81 100644
--- a/bin/clogin.in
+++ b/bin/clogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -114,21 +114,21 @@ for {set i 0} {$i < $argc} {incr i} {
# Username
} -u* -
-U* {
- if {! [ regexp .\[uU\](.+) $arg ignore user]} {
+ if {! [regexp .\[uU\](.+) $arg ignore user]} {
incr i
set username [ lindex $argv $i ]
}
# VTY Password
} -p* -
-P* {
- if {! [ regexp .\[pP\](.+) $arg ignore userpasswd]} {
+ if {! [regexp .\[pP\](.+) $arg ignore userpasswd]} {
incr i
set userpasswd [ lindex $argv $i ]
}
set do_passwd 0
# VTY Password
} -v* {
- if {! [ regexp .\[vV\](.+) $arg ignore passwd]} {
+ if {! [regexp .\[vV\](.+) $arg ignore passwd]} {
incr i
set passwd [ lindex $argv $i ]
}
@@ -140,14 +140,14 @@ for {set i 0} {$i < $argc} {incr i} {
# Enable Username
} -w* -
-W* {
- if {! [ regexp .\[wW\](.+) $arg ignore enauser]} {
+ if {! [regexp .\[wW\](.+) $arg ignore enauser]} {
incr i
set enausername [ lindex $argv $i ]
}
# Environment variable to pass to -s scripts
} -E*
{
- if {[ regexp .\[E\](.+)=(.+) $arg ignore varname varvalue]} {
+ if {[regexp .\[E\](.+)=(.+) $arg ignore varname varvalue]} {
set E$varname $varvalue
} else {
send_user "\nError: invalid format for -E in $arg\n"
@@ -156,7 +156,7 @@ for {set i 0} {$i < $argc} {incr i} {
# Enable Password
} -e*
{
- if {! [ regexp .\[e\](.+) $arg ignore enapasswd]} {
+ if {! [regexp .\[e\](.+) $arg ignore enapasswd]} {
incr i
set enapasswd [ lindex $argv $i ]
}
@@ -164,7 +164,7 @@ for {set i 0} {$i < $argc} {incr i} {
# Command to run.
} -c* -
-C* {
- if {! [ regexp .\[cC\](.+) $arg ignore command]} {
+ if {! [regexp .\[cC\](.+) $arg ignore command]} {
incr i
set command [ lindex $argv $i ]
}
@@ -172,7 +172,7 @@ for {set i 0} {$i < $argc} {incr i} {
# Expect script to run.
} -s* -
-S* {
- if {! [ regexp .\[sS\](.+) $arg ignore sfile]} {
+ if {! [regexp .\[sS\](.+) $arg ignore sfile]} {
incr i
set sfile [ lindex $argv $i ]
}
@@ -184,28 +184,28 @@ for {set i 0} {$i < $argc} {incr i} {
# 'ssh -c' cypher type
} -y* -
-Y* {
- if {! [ regexp .\[eE\](.+) $arg ignore cypher]} {
+ if {! [regexp .\[eE\](.+) $arg ignore cypher]} {
incr i
set cypher [ lindex $argv $i ]
}
# alternate cloginrc file
} -f* -
-F* {
- if {! [ regexp .\[fF\](.+) $arg ignore password_file]} {
+ if {! [regexp .\[fF\](.+) $arg ignore password_file]} {
incr i
set password_file [ lindex $argv $i ]
}
# Timeout
} -t* -
-T* {
- if {! [ regexp .\[tT\](.+) $arg ignore timeout]} {
+ if {! [regexp .\[tT\](.+) $arg ignore timeout]} {
incr i
set timeout [ lindex $argv $i ]
}
# Command file
} -x* -
-X {
- if {! [ regexp .\[xX\](.+) $arg ignore cmd_file]} {
+ if {! [regexp .\[xX\](.+) $arg ignore cmd_file]} {
incr i
set cmd_file [ lindex $argv $i ]
}
@@ -259,7 +259,7 @@ proc label { host } {
}
# take host from ENV(TERM)
if [info exists env(TERM)] {
- if [regexp \^(xterm|vs) $env(TERM) ignore ] {
+ if [ regexp \^(xterm|vs) $env(TERM) ignore ] {
send_user "\033]1;[lindex [split $host "."] 0]\a"
send_user "\033]2;$host\a"
}
@@ -473,16 +473,19 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
}
eof { send_user "\nError: Couldn't login: $router\n"; wait; return 1 }
-nocase "unknown host\r" {
+ send_user "\nError: Unknown host $router\n";
catch {close}; catch {wait};
- send_user "\nError: Unknown host $router\n"; wait; return 1
+ return 1
}
"Host is unreachable" {
+ send_user "\nError: Host Unreachable: $router\n";
catch {close}; catch {wait};
- send_user "\nError: Host Unreachable: $router\n"; wait; return 1
+ return 1
}
"No address associated with name" {
+ send_user "\nError: Unknown host $router\n";
catch {close}; catch {wait};
- send_user "\nError: Unknown host $router\n"; wait; return 1
+ return 1
}
-re "(Host key not found |The authenticity of host .* be established).*\(yes\/no\)\?" {
send "yes\r"
@@ -491,22 +494,26 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
-re "HOST IDENTIFICATION HAS CHANGED.* \(yes\/no\)\?" {
send "no\r"
send_user "\nError: The host key for $router has changed. Update the SSH known_hosts file accordingly.\n"
- return 1 }
+ catch {close}; catch {wait};
+ return 1
+ }
-re "Offending key for .* \(yes\/no\)\?" {
send "no\r"
send_user "\nError: host key mismatch for $router. Update the SSH known_hosts file accordingly.\n"
- return 1 }
+ catch {close}; catch {wait};
+ return 1
+ }
-re "(denied|Sorry)" {
send_user "\nError: Check your passwd for $router\n"
catch {close}; catch {wait}; return 1
}
"Login failed" {
send_user "\nError: Check your passwd for $router\n"
- return 1
+ catch {close}; catch {wait}; return 1
}
-re "% (Bad passwords|Authentication failed)" {
send_user "\nError: Check your passwd for $router\n"
- return 1
+ catch {close}; catch {wait}; return 1
}
"Press any key to continue" {
# send_user "Pressing the ANY key\n"
@@ -525,20 +532,20 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
-re "@\[^\r\n]+ $p_prompt" {
# ssh pwd prompt
sleep 1
- send "$userpswd\r"
+ send -- "$userpswd\r"
exp_continue
}
-re "$u_prompt" {
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "$p_prompt" {
sleep 1
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -562,8 +569,8 @@ proc do_enable { enauser enapasswd } {
send "enable\r"
expect {
- -re "$u_prompt" { send "$enauser\r"; exp_continue}
- -re "$e_prompt" { send "$enapasswd\r"; exp_continue}
+ -re "$u_prompt" { send -- "$enauser\r"; exp_continue}
+ -re "$e_prompt" { send -- "$enapasswd\r"; exp_continue}
"#" { set prompt "#" }
"(enable)" { set prompt "> (enable) " }
-re "(denied|Sorry|Incorrect)" {
@@ -592,7 +599,7 @@ proc run_commands { prompt command } {
set in_proc 1
# If the prompt is (enable), then we are on a switch and the
- # command is "set length 0"; otherwise its "term length 0".
+ # command is "set length 0"; otherwise its "terminal length 0".
# skip if its an extreme (since the pager can not be disabled on a
# per-vty basis).
if { [ string compare "extreme" "$platform" ] } {
@@ -602,7 +609,7 @@ proc run_commands { prompt command } {
# subsequent expects to handle everything as normal.
set command "set logging session disable;$command"
} else {
- send "term length 0\r"
+ send "terminal length 0\r"
}
# escape any parens in the prompt, such as "(enable)"
regsub -all {[)(]} $prompt {\\&} reprompt
@@ -619,60 +626,29 @@ proc run_commands { prompt command } {
# this is the only way i see to get rid of more prompts in o/p..grrrrr
log_user 0
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
- # the pager can not be turned off on the PIX, so we have to look
- # for the "More" prompt. the extreme is equally obnoxious, with a
- # global switch in the config.
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
- expect {
- -re "\b+" { exp_continue }
- -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
+
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ # the pager can not be turned off on the PIX, so we have to look
+ # for the "More" prompt. the extreme is equally obnoxious, with a
+ # global switch in the config.
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
+ expect {
+ -re "\b+" { exp_continue }
+ -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
}
- -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "^--More--\[\r\n]+" { # specific match c1900 pager
- send " "
- exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
- send " "
- # bloody ^[[2K after " "
- expect {
- -re "^\[^\r\n]*\r" {}
- }
+ -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
exp_continue
}
- -re "^ *--More--\[^\n\r]*" {
+ -re "^--More--\[\r\n]+" { # specific match c1900 pager
send " "
- exp_continue }
- -re "^<-+ More -+>\[^\n\r]*" {
- send_user -- "$expect_out(buffer)"
- send " "
- exp_continue }
- }
- }
- } else {
- # the pager can not be turned off on the PIX, so we have to look
- # for the "More" prompt. the extreme is equally obnoxious, with a
- # global switch in the config.
- send "[subst -nocommands $command]\r"
- expect {
- -re "\b+" { exp_continue }
- -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
+ exp_continue
}
- -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "^--More--\r\n" { # specific match c1900 pager
- send " "
- exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
+ -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
+ exp_continue
+ }
+ -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
send " "
# bloody ^[[2K after " "
expect {
@@ -680,10 +656,10 @@ proc run_commands { prompt command } {
}
exp_continue
}
- -re "^ *--More--\[^\n\r]*" {
+ -re "^ *--More--\[^\n\r]*" {
send " "
exp_continue }
- -re "^<-+ More -+>\[^\n\r]*" {
+ -re "^<-+ More -+>\[^\n\r]*" {
send_user -- "$expect_out(buffer)"
send " "
exp_continue }
@@ -704,11 +680,16 @@ proc run_commands { prompt command } {
send -h "exit\r"
exp_continue;
}
+ "The system has unsaved changes" { # Force10 SFTOS
+ send "n\r"
+ exp_continue
+ }
"Would you like to save them now" { # Force10
send "n\r"
exp_continue
}
- "Configuration changes have occurred.*" { # Cisco CSS
+ -re "(Profile|Configuration) changes have occurred.*" {
+ # Cisco CSS
send "n\r"
exp_continue
}
@@ -811,7 +792,7 @@ foreach router [lrange $argv $i end] {
# Figure out prompts
set u_prompt [find userprompt $router]
if { "$u_prompt" == "" } {
- set u_prompt "(Username|Login|login|user name):"
+ set u_prompt "(Username|Login|login|user name|User):"
} else {
set u_prompt [join [lindex $u_prompt 0] ""]
}
@@ -877,7 +858,7 @@ foreach router [lrange $argv $i end] {
}
-re "^.+> \\\(enable\\\)" {
set junk $expect_out(0,string);
- regsub -all "\[\]\[]" $junk {\\&} prompt;
+ regsub -all "\[\]\[\(\)]" $junk {\\&} prompt;
}
}
@@ -888,12 +869,12 @@ foreach router [lrange $argv $i end] {
}
} elseif { $do_script } {
# If the prompt is (enable), then we are on a switch and the
- # command is "set length 0"; otherwise its "term length 0".
+ # command is "set length 0"; otherwise its "terminal length 0".
if [ regexp -- ".*> .*enable" "$prompt" ] {
send "set length 0\r"
send "set logging session disable\r"
} else {
- send "term length 0\r"
+ send "terminal length 0\r"
}
expect -re $prompt {}
source $sfile
diff --git a/bin/control_rancid.in b/bin/control_rancid.in
index 13b15f8..2e39068 100644
--- a/bin/control_rancid.in
+++ b/bin/control_rancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -419,8 +419,8 @@ do
done
echo
-# Make sure that no empty configs are accepted. Those that are non-empty
-# are renamed from device_name.new -> device_name.
+# Make sure that no empty/truncated configs are accepted. The remainder are
+# renamed from device_name.new -> device_name.
for router in `cat $devlistfile`
do
OFS=$IFS
@@ -433,9 +433,19 @@ do
then
rm -f $router.new
else
- mv $router.new $router
- if [ $? -ne 0 ]; then
- echo "Error: could not rename $router.new to $router"
+ lines=`awk '{if (/^([-*!;#]|\/\*)/) { next; } lines++; \
+ if (lines > 10) { print "1"; exit;}} \
+ END { if (lines < 10) {print "0";}}' $router.new`
+
+ if [ ! $lines ]
+ then
+ rm -f $router.new
+ else
+ mv $router.new $router
+ if [ $? -ne 0 ]; then
+ echo "Error: could not rename $router.new to $router"
+ rm -f $router.new
+ fi
fi
fi
done
diff --git a/bin/cssrancid.in b/bin/cssrancid.in
index e4614b5..898acc3 100644
--- a/bin/cssrancid.in
+++ b/bin/cssrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -231,7 +231,7 @@ sub ShowVersion {
}
if (/(\S+) Silicon\s*Switch Processor/) {
if (!defined($C0)) {
- $C0=1; ProcessHistory("COMMENTS","keysort","C0","!\n");
+ $C0 = 1; ProcessHistory("COMMENTS","keysort","C0","!\n");
}
ProcessHistory("COMMENTS","keysort","C2","!SSP: $1\n");
$ssp = 1;
@@ -260,7 +260,7 @@ sub ShowVersion {
}
if(/^WARNING/) {
if (!defined($I0)) {
- $I0=1;
+ $I0 = 1;
ProcessHistory("COMMENTS","keysort","I0","!\n");
}
ProcessHistory("COMMENTS","keysort","I1","! $_");
@@ -269,7 +269,7 @@ sub ShowVersion {
ProcessHistory("COMMENTS","keysort","I1","! $_");
}
if (/^Configuration register is (.*)$/) {
- $config_register=$1;
+ $config_register = $1;
next;
}
}
@@ -317,7 +317,7 @@ sub ShowBoot {
next if (/\*\* BOOT CONFIG /);
next if /CONFGEN variable/;
if (!defined($H0)) {
- $H0=1; ProcessHistory("COMMENTS","keysort","H0","!\n");
+ $H0 = 1; ProcessHistory("COMMENTS","keysort","H0","!\n");
}
if ($type !~ /^(12[04]|7)/) {
if ($type !~ /^(29|35)00/) {
@@ -423,7 +423,7 @@ sub ShowRun {
ProcessHistory("","","","!isis password <removed>$2\n"); next;
}
if (/^\s+(domain-password|area-password) (\S+)( .*)?/
- && $filter_pwds >= 1) {
+ && $filter_pwds >= 1) {
ProcessHistory("","","","!$1 <removed>$2\n"); next;
}
# this is reversable, despite 'md5' in the cmd
@@ -588,8 +588,8 @@ sub DoNothing {print STDOUT;}
@commands = map(keys(%$_), @commandtable);
%commands = map(%$_, @commandtable);
-$cisco_cmds=join(";",@commands);
-$cmds_regexp=join("|",@commands);
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
if (length($host) == 0) {
if ($file) {
@@ -649,13 +649,13 @@ TOP: while(<INPUT>) {
NEXT:
tr/\015//d;
if (/\#\s?exit/) {
- $clean_run=1;
+ $clean_run = 1;
last;
}
if (/^Error:/) {
print STDOUT ("$host clogin error: $_");
print STDERR ("$host clogin error: $_") if ($debug);
- $clean_run=0;
+ $clean_run = 0;
last;
}
if (/#\s*($cmds_regexp)\s*$/) {
diff --git a/bin/elogin.in b/bin/elogin.in
index 0084a1d..e13f206 100644
--- a/bin/elogin.in
+++ b/bin/elogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -377,16 +377,16 @@ proc login { router user userpswd passwd prompt cmethod cyphertype } {
send_user "\nError: Unknown host\n"; wait; return 1
}
-re "$u_prompt" {
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "$p_prompt" {
sleep 1
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -414,21 +414,10 @@ proc run_commands { prompt command } {
regsub -all "\[)(]" $prompt {\\&} reprompt
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
-
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
- expect {
- -re "^\[^\n\r]*$reprompt." { exp_continue }
- -re "^\[^\n\r *]*$reprompt" {}
- -re "\[\n\r]" { exp_continue }
- }
- }
- } else {
- send "[subst -nocommands $command]\r"
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
-re "^\[^\n\r]*$reprompt." { exp_continue }
-re "^\[^\n\r *]*$reprompt" {}
diff --git a/bin/erancid.in b/bin/erancid.in
index cfd58b7..c67f796 100644
--- a/bin/erancid.in
+++ b/bin/erancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/f10rancid.in b/bin/f10rancid.in
index d210959..8711133 100644
--- a/bin/f10rancid.in
+++ b/bin/f10rancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -39,7 +39,7 @@
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
-#
+#
# This version of rancid tries to deal with Force10s.
#
# RANCID - Really Awesome New Cisco confIg Differ
@@ -176,34 +176,34 @@ sub ShowVersion {
return(-1) if (/command authorization failed/i);
/ Type: / && chop && chop &&
- ProcessHistory("COMMENTS","keysort","A1","!$_\n");
+ ProcessHistory("COMMENTS","keysort","A1", "!$_\n");
/^.* Version.*$/ &&
- ProcessHistory("COMMENTS","keysort","F1","!Image: $_") && next;
+ ProcessHistory("COMMENTS","keysort","F1", "!Image: $_") && next;
/^Build .*$/ &&
- ProcessHistory("COMMENTS","keysort","F1","!Image: $_") && next;
+ ProcessHistory("COMMENTS","keysort","F1", "!Image: $_") && next;
/^System image file is "([^\"]*)"$/ &&
- ProcessHistory("COMMENTS","keysort","F5","!Image: $1\n") && next;
+ ProcessHistory("COMMENTS","keysort","F5", "!Image: $1\n") && next;
if (/^(.*\s+Processor)( \d)?:(.*) with (\d+[kK]?) bytes/) {
my($cpu) = "$1$2:$3";
my($mem) = int($4 / (1024 * 1024));
my($device) = "Force10";
ProcessHistory("COMMENTS","keysort","B1",
- "!Memory: $1$2: $mem" . "M\n");
+ "!Memory: $1$2: $mem" . "M\n");
ProcessHistory("COMMENTS","keysort","A3","!CPU: $cpu\n");
next;
}
# E-Series and C-Series use NVRAM
/^(\d+[kK]) bytes of non-volatile/ &&
- ProcessHistory("COMMENTS","keysort","B3","!Memory: NVRAM $1\n") &&
+ ProcessHistory("COMMENTS","keysort","B3", "!Memory: NVRAM $1\n") &&
next;
- # S-Series uses boot flash
+ # S-Series uses boot flash
/^(\d+[mM]) bytes of .oot..lash/ &&
- ProcessHistory("COMMENTS","keysort","B3","!Memory: Flash $1\n") &&
+ ProcessHistory("COMMENTS","keysort","B3", "!Memory: Flash $1\n") &&
next;
}
return(0);
@@ -217,7 +217,8 @@ sub ShowBoot {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
- return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /(Invalid input|Type help or )/;
+ return(1) if /( *\^$)/;
return(-1) if (/command authorization failed/i);
ProcessHistory("COMMENTS","keysort","H0","!Boot Variables: $_");
@@ -234,7 +235,8 @@ sub ShowChassis {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
- return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /(Invalid input|Type help or )/;
+ return(1) if /( *\^$)/;
return(-1) if (/command authorization failed/i);
/-----------------------------/ && next;
@@ -257,7 +259,7 @@ sub ShowChassis {
s/ (\d.*)<.*/$1/;
# C300 fan speed
s/FanNumber Speed Status/FanNumber Status/;
- s/(.*\d).*\d\d\d\d(.*)/$1 $2/;
+ s/( \d) *\d\d\d\d(.*)/$1 $2/;
ProcessHistory("COMMENTS","keysort","CHASSIS","!Chassis: $_");
}
ProcessHistory("COMMENTS","keysort","CHASSIS","!\n");
@@ -276,7 +278,7 @@ sub DirSlotN {
next if (/^(\s*|\s*$cmd\s*)$/);
# return(1) if ($type !~ /^(12[40]|7|36)/);
return(1) if /^\s*\^\s*$/;
- return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /(Invalid input|Type help or )/;
return(1) if /No such device/i;
return(1) if /\% ?Error: No such file or directory/;
@@ -312,7 +314,7 @@ sub ShowInventory {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
- return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /(Invalid input|Type help or )/;
return(-1) if (/command authorization failed/i);
/-----------------------------/ && next;
@@ -330,7 +332,7 @@ sub ShowVLAN {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
- return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /(Invalid input|Type help or )/;
return(-1) if (/command authorization failed/i);
ProcessHistory("COMMENTS","keysort","VLAN","!VLAN: $_");
}
@@ -363,6 +365,10 @@ sub WriteTerm {
ProcessHistory("ENABLE","","","!$1 <removed>\n");
next;
}
+ if (/^(enable restricted) / && $filter_pwds >= 2) {
+ ProcessHistory("ENABLE","","","!$1 <removed>\n");
+ next;
+ }
if (/^username (\S+)(\s.*)? secret /) {
if ($filter_pwds >= 2) {
ProcessHistory("USER","keysort","$1","!username $1$2 secret <removed>\n");
@@ -392,6 +398,9 @@ sub WriteTerm {
if (/^(ip ftp password) / && $filter_pwds >= 1) {
ProcessHistory("","","","!$1 <removed>\n"); next;
}
+ if (/^(ftp-server username.*password) / && $filter_pwds >= 1) {
+ ProcessHistory("","","","!$1 <removed>\n"); next;
+ }
if (/^( ip ospf authentication-key) / && $filter_pwds >= 1) {
ProcessHistory("","","","!$1 <removed>\n"); next;
}
@@ -496,7 +505,7 @@ sub WriteTerm {
# catch anything that wasnt matched above.
ProcessHistory("","","","$_");
# end of config. the ": " game is for the PIX
- if (/^end$/) {
+ if (/^end *$/) {
$found_end = 1;
return(0);
}
@@ -514,6 +523,7 @@ sub DoNothing {print STDOUT;}
{'dir flash:' => 'DirSlotN'},
{'dir slot0:' => 'DirSlotN'},
{'show chassis' => 'ShowChassis'},
+ {'show system' => 'ShowChassis'},
{'show inventory' => 'ShowInventory'},
{'show vlan' => 'ShowVLAN'},
{'show running' => 'WriteTerm'}
diff --git a/bin/f5rancid.in b/bin/f5rancid.in
new file mode 100644
index 0000000..ebf66c6
--- /dev/null
+++ b/bin/f5rancid.in
@@ -0,0 +1,645 @@
+#! @PERLV_PATH@
+##
+## $Id$
+##
+## @PACKAGE@ @VERSION@
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
+## All rights reserved.
+##
+## This code is derived from software contributed to and maintained by
+## Terrapin Communications, Inc. by Henry Kilmer, John Heasley, Andrew Partan,
+## Pete Whiting, Austin Schutz, and Andrew Fort.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions
+## are met:
+## 1. Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## 2. Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in the
+## documentation and/or other materials provided with the distribution.
+## 3. All advertising materials mentioning features or use of this software
+## must display the following acknowledgement:
+## This product includes software developed by Terrapin Communications,
+## Inc. and its contributors for RANCID.
+## 4. Neither the name of Terrapin Communications, Inc. nor the names of its
+## contributors may be used to endorse or promote products derived from
+## this software without specific prior written permission.
+## 5. It is requested that non-binding fixes and modifications be contributed
+## back to Terrapin Communications, Inc.
+##
+## THIS SOFTWARE IS PROVIDED BY Terrapin Communications, INC. AND CONTRIBUTORS
+## ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS
+## BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+## POSSIBILITY OF SUCH DAMAGE.
+#
+# This version of rancid tries to deal with F5 BigIPs.
+#
+# RANCID - Really Awesome New Cisco confIg Differ
+#
+# usage: rancid [-dV] [-l] [-f filename | hostname]
+#
+use Getopt::Std;
+getopts('dflV');
+if ($opt_V) {
+ print "@PACKAGE@ @VERSION@\n";
+ exit(0);
+}
+$log = $opt_l;
+$debug = $opt_d;
+$file = $opt_f;
+$host = $ARGV[0];
+$clean_run = 0;
+$found_end = 0;
+$timeo = 90; # clogin timeout in seconds
+
+# force a terminal type so as not to confuse the POS
+$ENV{'TERM'} = "vt100";
+
+my(@commandtable, %commands, @commands);# command lists
+my($aclsort) = ("ipsort"); # ACL sorting mode
+my($filter_commstr); # SNMP community string filtering
+my($filter_pwds); # password filtering mode
+
+# This routine is used to print out the router configuration
+sub ProcessHistory {
+ my($new_hist_tag,$new_command,$command_string,@string) = (@_);
+ if ((($new_hist_tag ne $hist_tag) || ($new_command ne $command))
+ && defined %history) {
+ print eval "$command \%history";
+ undef %history;
+ }
+ if (($new_hist_tag) && ($new_command) && ($command_string)) {
+ if ($history{$command_string}) {
+ $history{$command_string} = "$history{$command_string}@string";
+ } else {
+ $history{$command_string} = "@string";
+ }
+ } elsif (($new_hist_tag) && ($new_command)) {
+ $history{++$#history} = "@string";
+ } else {
+ print "@string";
+ }
+ $hist_tag = $new_hist_tag;
+ $command = $new_command;
+ 1;
+}
+
+sub numerically { $a <=> $b; }
+
+# This is a sort routine that will sort numerically on the
+# keys of a hash as if it were a normal array.
+sub keynsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort numerically keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# keys of a hash as if it were a normal array.
+sub keysort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# values of a hash as if it were a normal array.
+sub valsort{
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort values %lines) {
+ $sorted_lines[$i] = $key;
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a numerical sort routine (ascending).
+sub numsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $num (sort {$a <=> $b} keys %lines) {
+ $sorted_lines[$i] = $lines{$num};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# ip address when the ip address is anywhere in
+# the strings.
+sub ipsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $addr (sort sortbyipaddr keys %lines) {
+ $sorted_lines[$i] = $lines{$addr};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# These two routines will sort based upon IP addresses
+sub ipaddrval {
+ my(@a) = ($_[0] =~ m#^(\d+)\.(\d+)\.(\d+)\.(\d+)$#);
+ $a[3] + 256 * ($a[2] + 256 * ($a[1] +256 * $a[0]));
+}
+sub sortbyipaddr {
+ &ipaddrval($a) <=> &ipaddrval($b);
+}
+
+# This routine parses "bigpipe base list"
+sub ShowBaseRun {
+ my($line) = (0);
+ print STDERR " In ShowBaseRun: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ if (!$line++) {
+ ProcessHistory("SHOWBASE","","","#\n#base:\n");
+ }
+ ProcessHistory("SHOWBASE","","","# $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "bigpipe db show"
+sub ShowDb {
+ my($line) = (0);
+ print STDERR " In ShowDb: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ if (!$line++) {
+ ProcessHistory("SHOWDB","","","#\n#database:\n");
+ }
+ /UCS.LoadTime/ && next;
+ /Configsync.LocalConfigTime/ && next;
+ /LTM.ConfigTime/ && next;
+
+ if (/^(snmp\..*\.community\..* =) (.+)/i) {
+ if ($filter_commstr) {
+ ProcessHistory("SHOWDB","","","# $1 <removed>\n") && next;
+ } else {
+ ProcessHistory("SHOWDB","","","# $1 $2\n") && next;
+ }
+ }
+
+ ProcessHistory("SHOWDB","","","# $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "cat /config/bigip.license"
+sub ShowLicense {
+ my($line) = (0);
+ print STDERR " In ShowLicense: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ # v9 software license does not have CR at EOF
+ s/^#-+($prompt.*)/$1/;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ if (!$line++) {
+ ProcessHistory("LICENSE","","","#\n#/config/bigip.license:\n");
+ }
+ ProcessHistory("LICENSE","","","# $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "bigpipe monitor list all"
+sub ShowMonitor {
+ my($line) = (0);
+ print STDERR " In ShowMonitor: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ if (!$line++) {
+ ProcessHistory("MONITOR","","","#\n");
+ }
+ if (/^(snmp\.[^ ]+\.community) = (.+)/i) {
+ if ($filter_commstr) {
+ ProcessHistory("SHOWDB","","","# $1 <removed>\n") && next;
+ } else {
+ ProcessHistory("SHOWDB","","","# $1 $2\n") && next;
+ }
+ }
+ if (/^(\s*)password / && $filter_pwds >= 1) {
+ ProcessHistory("LINE-PASS","","","# $1password <removed>\n");
+ next;
+ }
+
+ ProcessHistory("MONITOR","","","# $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "bigpipe platform"
+sub ShowPlatform {
+ print STDERR " In ShowPlatform: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ /fan speed/i && next;
+ /chassis temperature/i && next;
+ /degC/ && next;
+ s/^\|//;
+ /Type: / && ProcessHistory("COMMENTS","keysort","A0",
+ "#Chassis type: $'");
+
+ ProcessHistory("COMMENTS","keysort","B1","#$_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "bigpipe profile list"
+sub ShowProfile {
+ print STDERR " In ShowProfile: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("PROFILE","",""," $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "ls --full-time --color=never /config/ssl/ssl.key"
+sub ShowSslKey {
+ print STDERR " In ShowSslKey: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ # v9 software license does not have CR at EOF
+ s/^#-+($prompt.*)/$1/;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("SSLKEY","","","# $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "ls --full-time --color=never /config/ssl/ssl.crt"
+sub ShowSslCrt {
+ print STDERR " In ShowSslCrt: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ # v9 software license does not have CR at EOF
+ s/^#-+($prompt.*)/$1/;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("SSLCRT","","","# $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "bigpipe route static show"
+sub ShowRouteStatic {
+ print STDERR " In ShowRouteStatic: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("ROUTE","",""," $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "bigpipe version"
+sub ShowVersion {
+ print STDERR " In ShowVersion: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(-1) if (/command authorization failed/i);
+
+ /^kernel:/i && ($_ = <INPUT>) &&
+ ProcessHistory("COMMENTS","keysort","A3","#Image: Kernel: $_") &&
+ next;
+ if (/^package:/i) {
+ my($line);
+
+ while ($_ = <INPUT>) {
+ tr/\015//d;
+ last if (/:/);
+ last if (/^$prompt/);
+ chomp;
+ $line .= " $_";
+ }
+ ProcessHistory("COMMENTS","keysort","A2",
+ "#Image: Package:$line\n");
+ }
+
+ if (/:/) {
+ ProcessHistory("COMMENTS","keysort","C1","#$_");
+ } else {
+ ProcessHistory("COMMENTS","keysort","C1","#\t$_");
+ }
+ }
+ return(0);
+}
+
+# This routine processes a "bigpipe list"
+sub WriteTerm {
+ my($lines) = 0;
+ print STDERR " In WriteTerm: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ next if (/^\s*$/);
+ # end of config - hopefully. f5 does not have a reliable end-of-config
+ # tag.
+ if (/^$prompt/) {
+ $found_end++;
+ last;
+ }
+ return(-1) if (/command authorization failed/i);
+ # the pager can not be disabled per-session on the PIX
+ s/^<-+ More -+>\s*//;
+ /Non-Volatile memory is in use/ && return(-1); # NvRAM is locked
+ # filter out any RCS/CVS tags to avoid confusing local CVS storage
+ s/\$(Revision|Id):/ $1:/;
+ $lines++;
+
+ if (/^(enable )?(password|passwd) / && $filter_pwds >= 1) {
+ ProcessHistory("ENABLE","","","! $1$2 <removed>\n");
+ next;
+ }
+ if (/^(enable secret) / && $filter_pwds >= 2) {
+ ProcessHistory("ENABLE","","","# $1 <removed>\n");
+ next;
+ }
+ if (/^username (\S+)(\s.*)? secret /) {
+ if ($filter_pwds >= 2) {
+ ProcessHistory("USER","keysort","$1","# username $1$2 secret <removed>\n");
+ } else {
+ ProcessHistory("USER","keysort","$1","$_");
+ }
+ next;
+ }
+ if (/^username (\S+)(\s.*)? password ((\d) \S+|\S+)/) {
+ if ($filter_pwds == 2) {
+ ProcessHistory("USER","keysort","$1","# username $1$2 password <removed>\n");
+ } elsif ($filter_pwds == 1 && $4 ne "5"){
+ ProcessHistory("USER","keysort","$1","# username $1$2 password <removed>\n");
+ } else {
+ ProcessHistory("USER","keysort","$1","$_");
+ }
+ next;
+ }
+ if (/^(\s*)password / && $filter_pwds >= 1) {
+ ProcessHistory("LINE-PASS","","","# $1password <removed>\n");
+ next;
+ }
+ if (/^\s*neighbor (\S*) password / && $filter_pwds >= 1) {
+ ProcessHistory("","","","# neighbor $1 password <removed>\n");
+ next;
+ }
+ # order logging statements
+ /^logging (\d+\.\d+\.\d+\.\d+)/ &&
+ ProcessHistory("LOGGING","ipsort","$1","$_") && next;
+ # order/prune tacacs/radius server statements
+ if (/^(tacacs-server|radius-server) key / && $filter_pwds >= 1) {
+ ProcessHistory("","","","# $1 key <removed>\n"); next;
+ }
+ # order clns host statements
+ /^clns host \S+ (\S+)/ &&
+ ProcessHistory("CLNS","keysort","$1","$_") && next;
+ # order alias statements
+ /^alias / && ProcessHistory("ALIAS","keysort","$_","$_") && next;
+ # delete ntp auth password - this md5 is a reversable too
+ if (/^(ntp authentication-key \d+ md5) / && $filter_pwds >= 1) {
+ ProcessHistory("","","","# $1 <removed>\n"); next;
+ }
+ # order ntp peers/servers
+ if (/^ntp (server|peer) (\d+)\.(\d+)\.(\d+)\.(\d+)/) {
+ $sortkey = sprintf("$1 %03d%03d%03d%03d",$2,$3,$4,$5);
+ ProcessHistory("NTP","keysort",$sortkey,"$_");
+ next;
+ }
+ # order ip host line statements
+ /^ip host line(\d+)/ &&
+ ProcessHistory("IPHOST","numsort","$1","$_") && next;
+ # order ip nat source static statements
+ /^ip nat (\S+) source static (\S+)/ &&
+ ProcessHistory("IP NAT $1","ipsort","$2","$_") && next;
+
+ # catch anything that wasnt matched above.
+ ProcessHistory("","","","$_");
+ }
+
+ if ($lines < 3) {
+ printf(STDERR "ERROR: $host configuration appears truncated.\n");
+ $found_end = 0;
+ return(-1);
+ }
+
+ return(0);
+}
+
+# dummy function
+sub DoNothing {print STDOUT;}
+
+# Main
+@commandtable = (
+ {'bigpipe version' => 'ShowVersion'},
+ {'bigpipe platform' => 'ShowPlatform'},
+ {'cat /config/bigip.license' => 'ShowLicense'},
+ {'bigpipe monitor list all' => 'ShowMonitor'},
+ {'bigpipe profile list' => 'ShowProfile'},
+ {'bigpipe base list' => 'ShowBaseRun'},
+ {'bigpipe db show' => 'ShowDb'},
+ {'bigpipe route static show' => 'ShowRouteStatic'},
+ {'ls --full-time --color=never /config/ssl/ssl.crt' => 'ShowSslCrt'},
+ {'ls --full-time --color=never /config/ssl/ssl.key' => 'ShowSslKey'},
+ {'bigpipe list' => 'WriteTerm'}
+);
+# Use an array to preserve the order of the commands and a hash for mapping
+# commands to the subroutine and track commands that have been completed.
+@commands = map(keys(%$_), @commandtable);
+%commands = map(%$_, @commandtable);
+
+$cisco_cmds=join(";",@commands);
+$cmds_regexp=join("|",@commands);
+
+if (length($host) == 0) {
+ if ($file) {
+ print(STDERR "Too few arguments: file name required\n");
+ exit(1);
+ } else {
+ print(STDERR "Too few arguments: host name required\n");
+ exit(1);
+ }
+}
+open(OUTPUT,">$host.new") || die "Can't open $host.new for writing: $!\n";
+select(OUTPUT);
+# make OUTPUT unbuffered if debugging
+if ($debug) { $| = 1; }
+
+if ($file) {
+ print STDERR "opening file $host\n" if ($debug);
+ print STDOUT "opening file $host\n" if ($log);
+ open(INPUT,"<$host") || die "open failed for $host: $!\n";
+} else {
+ print STDERR "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug);
+ print STDOUT "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($log);
+ if (defined($ENV{NOPIPE})) {
+ system "clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "clogin failed for $host: $!\n";
+ open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n";
+ } else {
+ open(INPUT,"clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null |") || die "clogin failed for $host: $!\n";
+ }
+}
+
+# determine ACL sorting mode
+if ($ENV{"ACLSORT"} =~ /no/i) {
+ $aclsort = "";
+}
+# determine community string filtering mode
+if (defined($ENV{"NOCOMMSTR"}) &&
+ ($ENV{"NOCOMMSTR"} =~ /yes/i || $ENV{"NOCOMMSTR"} =~ /^$/)) {
+ $filter_commstr = 1;
+} else {
+ $filter_commstr = 0;
+}
+# determine password filtering mode
+if ($ENV{"FILTER_PWDS"} =~ /no/i) {
+ $filter_pwds = 0;
+} elsif ($ENV{"FILTER_PWDS"} =~ /all/i) {
+ $filter_pwds = 2;
+} else {
+ $filter_pwds = 1;
+}
+
+ProcessHistory("","","","#RANCID-CONTENT-TYPE: bigip\n#\n");
+ProcessHistory("COMMENTS","keysort","A1","#\n");
+ProcessHistory("COMMENTS","keysort","B0","#\n");
+ProcessHistory("COMMENTS","keysort","C0","#\n");
+TOP: while(<INPUT>) {
+ tr/\015//d;
+ if (/^Error:/) {
+ print STDOUT ("$host clogin error: $_");
+ print STDERR ("$host clogin error: $_") if ($debug);
+ $clean_run=0;
+ last;
+ }
+ while (/#\s*($cmds_regexp)\s*$/) {
+ $cmd = $1;
+ if (!defined($prompt)) {
+ $prompt = ($_ =~ /^([^#]+#)/)[0];
+ $prompt =~ s/([][}{)(\\])/\\$1/g;
+ print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
+ }
+ print STDERR ("HIT COMMAND:$_") if ($debug);
+ if (! defined($commands{$cmd})) {
+ print STDERR "$host: found unexpected command - \"$cmd\"\n";
+ $clean_run = 0;
+ last TOP;
+ }
+ $rval = &{$commands{$cmd}};
+ delete($commands{$cmd});
+ if ($rval == -1) {
+ $clean_run = 0;
+ last TOP;
+ }
+ }
+ if (/\#\s?exit$/) {
+ $clean_run=1;
+ last;
+ }
+}
+print STDOUT "Done $logincmd: $_\n" if ($log);
+# Flush History
+ProcessHistory("","","","");
+# Cleanup
+close(INPUT);
+close(OUTPUT);
+
+if (defined($ENV{NOPIPE})) {
+ unlink("$host.raw") if (! $debug);
+}
+
+# check for completeness
+if (scalar(%commands) || !$clean_run || !$found_end) {
+ if (scalar(%commands)) {
+ printf(STDOUT "$host: missed cmd(s): %s\n", join(',', keys(%commands)));
+ printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%commands))) if ($debug);
+ }
+ if (!$clean_run || !$found_end) {
+ print STDOUT "$host: End of run not found\n";
+ print STDERR "$host: End of run not found\n" if ($debug);
+ system("/usr/bin/tail -1 $host.new");
+ }
+ unlink "$host.new" if (! $debug);
+}
diff --git a/bin/flogin.in b/bin/flogin.in
index f15b1ec..483a06e 100644
--- a/bin/flogin.in
+++ b/bin/flogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -442,20 +442,20 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
-re "@\[^\r\n]+ $p_prompt" {
# ssh pwd prompt
sleep 1
- send "$userpswd\r"
+ send -- "$userpswd\r"
exp_continue
}
-re "$u_prompt" {
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "$p_prompt" {
sleep 1
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -480,8 +480,8 @@ proc do_enable { enauser enapasswd } {
sleep 1; # dont go too fast for it now...
send "enable\r"
expect {
- -re "$u_prompt" { send "$enauser\r"; exp_continue}
- -re "$e_prompt" { send "$enapasswd\r"; exp_continue}
+ -re "$u_prompt" { send -- "$enauser\r"; exp_continue}
+ -re "$e_prompt" { send -- "$enapasswd\r"; exp_continue}
"#" { set prompt "#" }
"(enable)" { set prompt "> (enable) " }
denied { send_user "\nError: Check your Enable passwd\n";
@@ -507,27 +507,16 @@ proc run_commands { prompt command } {
set in_proc 1
send "skip-page-display\r"
- expect $prompt {}
-
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
-
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst [lindex $commands $i]]\r"
- expect {
- -re "^\[^\n\r]*$prompt." { exp_continue }
- -re "^\[^\n\r *]*$prompt" {}
- -re "\[\n\r]" { exp_continue }
- }
- }
- } else {
- send "[subst $command]\r"
+ expect -re "$prompt" {}
+
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst [lindex $commands $i]]\r"
expect {
- -re "^\[^\n\r]*$prompt." { exp_continue }
- -re "^\[^\n\r *]*$prompt" {}
- -re "\[\n\r]" { exp_continue }
+ -re "^\[^\n\r]*$prompt." { exp_continue }
+ -re "^\[^\n\r *]*$prompt" {}
+ -re "\[\n\r]" { exp_continue }
}
}
send "exit\r"
@@ -671,6 +660,15 @@ foreach router [lrange $argv $i end] {
}
}
}
+ # we are logged in, now figure out the full prompt
+ send "\r"
+ expect {
+ -re "\[\r\n]+" { exp_continue; }
+ -re "^.+$prompt" { set junk $expect_out(0,string);
+ regsub -all "\[\]\[ ]" $junk {\\&} prompt;
+ }
+ }
+
if { $do_command } {
if {[run_commands $prompt $command]} {
@@ -680,7 +678,7 @@ foreach router [lrange $argv $i end] {
} elseif { $do_script } {
# fucking foundry
send "skip-page-display\r"
- expect $prompt {}
+ expect -re $prompt {}
source $sfile
catch {close};
} else {
diff --git a/bin/fnrancid.in b/bin/fnrancid.in
index 812d796..47f8444 100644
--- a/bin/fnrancid.in
+++ b/bin/fnrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/francid.in b/bin/francid.in
index 66a0e4f..9447a9d 100644
--- a/bin/francid.in
+++ b/bin/francid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -39,7 +39,7 @@
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
-#
+#
# Amazingly hacked version of Hank's rancid - this one tries to
# deal with foundrys and foundrys OEM'd by HP as Procurves.
#
@@ -245,7 +245,7 @@ sub ShowFlash {
print STDERR " In ShowFlash: $_" if ($debug);
while (<INPUT>) {
- tr/\015//d;
+ tr/\015//d;
last if (/^$prompt/);
next if (/^\s*$/);
ProcessHistory("FLASH","","","!Flash: $_");
@@ -264,6 +264,7 @@ sub ShowModule {
return(1) if (/Invalid input ->/);
next if (/^\s*$/);
next if (/:\s*$/);
+
ProcessHistory("MODULE","","","!Module: $_");
}
ProcessHistory("","","","!\n");
@@ -276,9 +277,11 @@ sub WriteTerm {
while (<INPUT>) {
tr/\015//d;
+ return(1) if (/Invalid input ->/);
+ return(0) if ($found_end); # Only do this routine once
last if (/^$prompt/);
- /Current configuration:/i && next;
+ /Current configuration\s*:/i && next;
/^ver \d+\.\d+/ && next;
/^module \d+ / && next;
@@ -363,6 +366,12 @@ sub WriteTerm {
ProcessHistory("","","","!$1 <removed>\n");
next;
}
+ # filter ssl secret
+ if (/^(crypto-ssl certificate generate secret_data)/ &&
+ $filter_pwds >= 1) {
+ ProcessHistory("","","","!$1 <removed>\n");
+ next;
+ }
# reorder listing of ports in a vlan
if (/^ (?:un)?tagged ethe/) {
@@ -400,7 +409,8 @@ sub DoNothing {print STDOUT;}
{'show chassis' => 'ShowChassis'},
{'show module' => 'ShowModule'},
{'show flash' => 'ShowFlash'},
- {'write term' => 'WriteTerm'}
+ {'write term' => 'WriteTerm'},
+ {'show running-config' => 'WriteTerm'},
);
# Use an array to preserve the order of the commands and a hash for mapping
# commands to the subroutine and track commands that have been completed.
diff --git a/bin/hlogin.in b/bin/hlogin.in
index 1a7722c..e372fe0 100644
--- a/bin/hlogin.in
+++ b/bin/hlogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -79,7 +79,7 @@ set do_enapasswd 1
# attempt at platform switching.
set platform ""
#
-set send_human {.4 .4 .7 .3 5}
+set send_human {.2 .1 .4 .2 1}
# Find the user in the ENV, or use the unix userid.
if {[ info exists env(CISCO_USER) ]} {
@@ -426,13 +426,13 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
catch {close}; catch {wait};
send_user "\nError: Unknown host\n"; wait; return 1
}
- -re "$u_prompt" { send "$user\r"
+ -re "$u_prompt" { send -- "$user\r"
expect {
eof { send_user "\nError: Couldn't login\n"; wait; return 1 }
"Login invalid" { send_user "\nError: Invalid login\n";
catch {close}; catch {wait};
return 1 }
- -re "$p_prompt" { send "$userpswd\r" }
+ -re "$p_prompt" { send -- "$userpswd\r" }
"$prompt" { set in_proc 0; return 0 }
"Press any key to continue" {
send " "
@@ -443,9 +443,9 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
}
-re "$p_prompt" {
if ![string compare $prog "ssh"] {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
expect {
eof { send_user "\nError: Couldn't login\n";
@@ -456,7 +456,7 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
send " ";
exp_continue
}
- -re "$e_prompt" { send "$enapasswd\r" }
+ -re "$e_prompt" { send -- "$enapasswd\r" }
"$prompt" { set in_proc 0;
return 0
}
@@ -483,8 +483,8 @@ proc do_enable { enauser enapasswd } {
send "enable\r"
expect {
- -re "$u_prompt" { send "$enauser\r"; exp_continue}
- -re "$e_prompt" { send "$enapasswd\r"; exp_continue}
+ -re "$u_prompt" { send -- "$enauser\r"; exp_continue}
+ -re "$e_prompt" { send -- "$enapasswd\r"; exp_continue}
"#" { set prompt "#" }
"(enable)" { set prompt "> (enable) " }
denied { send_user "\nError: Check your Enable passwd\n"; return 1}
@@ -513,40 +513,43 @@ proc run_commands { prompt command } {
}
# this is the only way i see to get rid of more prompts in o/p..grrrrr
log_user 0
- # Is this a multi-command?
+
set commands [split $command \;]
set num_commands [llength $commands]
# if the pager can not be turned off, we have to look for the "More"
# prompt.
for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
- -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)" }
- -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
+ -re "^\[^\n\r *]*$reprompt" { catch {send_user -- "$expect_out(buffer)"} }
+ -re "^\[^\n\r]*$reprompt." { catch {send_user -- "$expect_out(buffer)"}
exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
+ -re "\[\n\r]+" { catch {send_user -- "$expect_out(buffer)"}
exp_continue }
-re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
send " "
expect {
# gag, 2 more prompts
-re "\[\r\n]*\r" {}
- -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" { send " "; exp_continue }
+ -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
+ catch {send " "};
+ exp_continue
+ }
}
exp_continue
}
- -re "^<-+ More -+>\[^\n\r]*" { send " "
+ -re "^<-+ More -+>\[^\n\r]*" { catch {send " "}
exp_continue }
- -re "^-+ MORE -+\[^\n\r]*" { send " "
+ -re "^-+ MORE -+\[^\n\r]*" { catch {send " "}
exp_continue }
# 3 flavours of the more prompt, first -More-, then --More-- (for
# cisco/riverhead AGM), then with more dashes.
- -re "^-More-\[^\n\r-]*" { send " "
+ -re "^-More-\[^\n\r-]*" { catch {send " "}
exp_continue }
- -re "^--More--\[^\n\r-]*" { send " "
+ -re "^--More--\[^\n\r-]*" { catch {send " "}
exp_continue }
-re "^---+More---+\[^\n\r]*" {
- send " "
+ catch {send " "}
exp_continue }
-re "\b+" { exp_continue }
}
@@ -555,20 +558,20 @@ proc run_commands { prompt command } {
send -h "exit\r"
expect {
"Do you want to save current configuration" {
- send "n\r"
+ catch {send "n\r"}
exp_continue
}
"Do you wish to save " {
- send "n\r"
+ catch {send "n\r"}
exp_continue
}
"Do you want to log out" {
- send "y\r"
+ catch {send "y\r"}
exp_continue
}
-re "\[\r\n]+" { exp_continue }
-re "^.+>" {
- send -h "exit\r"
+ catch {send -h "exit\r"}
exp_continue
}
timeout { catch {close}; catch {wait};
diff --git a/bin/hpuifilter.c b/bin/hpuifilter.c
index 38b4223..ab437f7 100644
--- a/bin/hpuifilter.c
+++ b/bin/hpuifilter.c
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+ * Copyright (c) 1997-2008 by Terrapin Communications, Inc.
* All rights reserved.
*
* This code is derived from software contributed to and maintained by
@@ -630,7 +630,7 @@ reapchild(int sig)
fprintf(stderr, "reap child %d\n", (int)pid);
if (pid == child) {
child = 0;
- sigrx = 0;
+ sigrx = 1;
break;
}
}
diff --git a/bin/hrancid.in b/bin/hrancid.in
index 5be2c8d..d1898db 100644
--- a/bin/hrancid.in
+++ b/bin/hrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -66,6 +66,8 @@ my($aclsort) = ("ipsort"); # ACL sorting mode
my($filter_commstr); # SNMP community string filtering
my($filter_pwds); # password filtering mode
+my($systeminfo) = 0; # show system-information
+
# This routine is used to print out the router configuration
sub ProcessHistory {
my($new_hist_tag,$new_command,$command_string,@string) = (@_);
@@ -203,16 +205,21 @@ sub ShowFlash {
return;
}
-# This routine parses "show system-information"
+# This routine parses "show system-information" or "show system information"
sub ShowSystem {
print STDERR " In ShowSystem: $_" if ($debug);
+ if ($systeminfo) {
+ $_ = <INPUT>;
+ return(0);
+ }
+
while (<INPUT>) {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
return(-1) if (/command authorization failed/i);
- return(-1) if /^(Invalid|Ambiguous) input:/i;
+ return(0) if /^(Invalid|Ambiguous) input:/i;
if (/memory\s+-\s+total\s+:\s+(\S+)/i) {
my($mem) = $1;
@@ -229,6 +236,8 @@ sub ShowSystem {
/rom\s+version\s+:\s+(\S+)/i &&
ProcessHistory("COMMENTS","keysort","C1",";Image: ROM $1\n");
}
+ $systeminfo = 1;
+
return(0);
}
@@ -462,6 +471,7 @@ sub DoNothing {print STDOUT;}
{'show version' => 'ShowVersion'},
{'show flash' => 'ShowFlash'},
{'show system-information' => 'ShowSystem'},
+ {'show system information' => 'ShowSystem'},
{'show module' => 'ShowModule'},
{'show stack' => 'ShowStack'},
{'write term' => 'WriteTerm'}
diff --git a/bin/htlogin.in b/bin/htlogin.in
index 2c04e6a..fbe8b1f 100644
--- a/bin/htlogin.in
+++ b/bin/htlogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -379,16 +379,16 @@ proc login { router user userpswd passwd prompt cmethod cyphertype } {
send_user "\nError: Unknown host\n"; wait; return 1
}
-re "$u_prompt" {
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "$p_prompt" {
sleep 1
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -411,25 +411,14 @@ proc run_commands { prompt command } {
global in_proc
set in_proc 1
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
-
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[lindex $commands $i]\r"
- expect {
- -re "^\[^\n\r]*$prompt" {}
- -re "^\[^\n\r *]*$prompt" {}
- -re "\[\n\r]" { exp_continue }
- }
- }
- } else {
- send "$command\r"
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[lindex $commands $i]\r"
expect {
- -re "^\[^\n\r]*$prompt" {}
- -re "^\[^\n\r *]*$prompt" {}
- -re "\[\n\r]" { exp_continue }
+ -re "^\[^\n\r]*$prompt" {}
+ -re "^\[^\n\r *]*$prompt" {}
+ -re "\[\n\r]" { exp_continue }
}
}
send "exit\r"
diff --git a/bin/htrancid.in b/bin/htrancid.in
index 6819162..b79b5e9 100644
--- a/bin/htrancid.in
+++ b/bin/htrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/jerancid.in b/bin/jerancid.in
index 84d59ec..69d4697 100644
--- a/bin/jerancid.in
+++ b/bin/jerancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -427,6 +427,12 @@ sub WriteTerm {
ProcessHistory("","","","!$1 <removed>\n"); next;
}
}
+ # mpls ldp encrypted password oscillates
+ if (/^(mpls ldp neighbor \S+ password)/) {
+ if ($filter_pwds >= 1 || /^mpls ldp neighbor \S+ password \d /) {
+ ProcessHistory("","","","!$1 <removed>\n"); next;
+ }
+ }
# sort ip explicit-paths.
if (/^ip explicit-path name (\S+)/) {
@@ -470,9 +476,9 @@ sub WriteTerm {
/^arp\s+(\d+\.\d+\.\d+\.\d+)\s+/ &&
ProcessHistory("ARP","$aclsort","$1","$_") && next;
- /^ip prefix-list\s+(\S+)\s+seq\s+(\d+)\s+(permit|deny)\s+(\d\S+)(\/.*)$/ &&
- ProcessHistory("PACL $1 $3","$aclsort","$4","ip prefix-list $1 $3 $4$5\n")
- && next;
+ /^ip prefix-list\s+(\S+)\s+seq\s+(\d+)\s+(permit|deny)\s+(\d\S+)(\/.*)$/
+ && ProcessHistory("PACL $1 $3","$aclsort","$4",
+ "ip prefix-list $1 $3 $4$5\n") && next;
# order/prune snmp-server host statements
diff --git a/bin/jlogin.in b/bin/jlogin.in
index e155d10..03c75a7 100644
--- a/bin/jlogin.in
+++ b/bin/jlogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -383,7 +383,7 @@ proc login { router user passwd cmethod cyphertype identfile} {
-re "Enter passphrase.*: " {
# sleep briefly to allow time for stty -echo
sleep 1
- send "$passphrase\r"
+ send -- "$passphrase\r"
exp_continue }
-re "(Host key not found |The authenticity of host .* be established).*\(yes\/no\)\?" {
send "yes\r"
@@ -398,11 +398,11 @@ proc login { router user passwd cmethod cyphertype identfile} {
send_user "\nError: host key mismatch for $router. Update the SSH known_hosts file accordingly.\n"
return 1 }
-re "(Username|\[\r\n]login):" {
- send "$user\r"
+ send -- "$user\r"
exp_continue
}
"\[Pp]assword:" {
- sleep 1; send "$passwd\r"
+ sleep 1; send -- "$passwd\r"
exp_continue
}
-re "$prompt" { break; }
@@ -435,25 +435,14 @@ proc run_commands { prompt command } {
send "set cli screen-length 0\r"
expect -re $prompt {}
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
-
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[lindex $commands $i]\r"
- expect {
- -re "^\[^\n\r *]*$prompt $" {}
- -re "^\[^\n\r]*$prompt." { exp_continue }
- -re "(\r\n|\n)" { exp_continue }
- }
- }
- } else {
- send "$command\r"
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send "[lindex $commands $i]\r"
expect {
- -re "^\[^\n\r *]*$prompt $" {}
- -re "^\[^\n\r]*$prompt." { exp_continue }
- -re "(\r\n|\n)" { exp_continue }
+ -re "^\[^\n\r *]*$prompt $" {}
+ -re "^\[^\n\r]*$prompt." { exp_continue }
+ -re "(\r\n|\n)" { exp_continue }
}
}
send "quit\r"
diff --git a/bin/jrancid.in b/bin/jrancid.in
index 309cef9..c34286f 100644
--- a/bin/jrancid.in
+++ b/bin/jrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/lg.cgi.in b/bin/lg.cgi.in
index d1efaea..6e8bfc3 100644
--- a/bin/lg.cgi.in
+++ b/bin/lg.cgi.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/lgform.cgi.in b/bin/lgform.cgi.in
index 18f1c54..052f0cc 100644
--- a/bin/lgform.cgi.in
+++ b/bin/lgform.cgi.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/mrancid.in b/bin/mrancid.in
index 19ffadb..b828e92 100644
--- a/bin/mrancid.in
+++ b/bin/mrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/mrvlogin.in b/bin/mrvlogin.in
new file mode 100644
index 0000000..2de0c28
--- /dev/null
+++ b/bin/mrvlogin.in
@@ -0,0 +1,774 @@
+#! @EXPECT_PATH@ --
+##
+## $Id$
+##
+## @PACKAGE@ @VERSION@
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
+## All rights reserved.
+##
+## This code is derived from software contributed to and maintained by
+## Terrapin Communications, Inc. by Henry Kilmer, John Heasley, Andrew Partan,
+## Pete Whiting, Austin Schutz, and Andrew Fort.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions
+## are met:
+## 1. Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## 2. Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in the
+## documentation and/or other materials provided with the distribution.
+## 3. All advertising materials mentioning features or use of this software
+## must display the following acknowledgement:
+## This product includes software developed by Terrapin Communications,
+## Inc. and its contributors for RANCID.
+## 4. Neither the name of Terrapin Communications, Inc. nor the names of its
+## contributors may be used to endorse or promote products derived from
+## this software without specific prior written permission.
+## 5. It is requested that non-binding fixes and modifications be contributed
+## back to Terrapin Communications, Inc.
+##
+## THIS SOFTWARE IS PROVIDED BY Terrapin Communications, INC. AND CONTRIBUTORS
+## ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS
+## BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+## POSSIBILITY OF SUCH DAMAGE.
+#
+# The expect login scripts were based on Erik Sherk's gwtn, by permission.
+#
+# clogin - Cisco login
+#
+# Most options are intuitive for logging into a Cisco router.
+# The default is to enable (thus -noenable). Some folks have
+# setup tacacs to have a user login at priv-lvl = 15 (enabled)
+# so the -autoenable flag was added for this case (don't go through
+# the process of enabling and the prompt will be the "#" prompt.
+# The default username password is the same as the vty password.
+#
+
+# Usage line
+set usage "Usage: $argv0 \[-dV\] \[-autoenable\] \[-noenable\] \[-c command\] \
+\[-Evar=x\] \[-e enable-password\] \[-f cloginrc-file\] \[-p user-password\] \
+\[-s script-file\] \[-t timeout\] \[-u username\] \
+\[-v vty-password\] \[-w enable-username\] \[-x command-file\] \
+\[-y ssh_cypher_type\] router \[router...\]\n"
+
+# env(CLOGIN) may contain:
+# x == do not set xterm banner or name
+
+# Password file
+set password_file $env(HOME)/.cloginrc
+# Default is to login to the router
+set do_command 0
+set do_script 0
+# The default is to automatically enable
+set avenable 1
+# The default is that you login non-enabled (tacacs can have you login already
+# enabled)
+set avautoenable 0
+# The default is to look in the password file to find the passwords. This
+# tracks if we receive them on the command line.
+set do_passwd 1
+set do_enapasswd 1
+#
+set send_human {.4 .4 .7 .3 5}
+
+# Find the user in the ENV, or use the unix userid.
+if {[ info exists env(CISCO_USER) ]} {
+ set default_user $env(CISCO_USER)
+} elseif {[ info exists env(USER) ]} {
+ set default_user $env(USER)
+} elseif {[ info exists env(LOGNAME) ]} {
+ set default_user $env(LOGNAME)
+} else {
+ # This uses "id" which I think is portable. At least it has existed
+ # (without options) on all machines/OSes I've been on recently -
+ # unlike whoami or id -nu.
+ if [ catch {exec id} reason ] {
+ send_error "\nError: could not exec id: $reason\n"
+ exit 1
+ }
+ regexp {\(([^)]*)} "$reason" junk default_user
+}
+if {[ info exists env(CLOGINRC) ]} {
+ set password_file $env(CLOGINRC)
+}
+
+# Sometimes routers take awhile to answer (the default is 10 sec)
+set timeout 45
+
+# Process the command line
+for {set i 0} {$i < $argc} {incr i} {
+ set arg [lindex $argv $i]
+
+ switch -glob -- $arg {
+ # Expect debug mode
+ -d* {
+ exp_internal 1
+ # Username
+ } -u* -
+ -U* {
+ if {! [regexp .\[uU\](.+) $arg ignore user]} {
+ incr i
+ set username [ lindex $argv $i ]
+ }
+ # VTY Password
+ } -p* -
+ -P* {
+ if {! [regexp .\[pP\](.+) $arg ignore userpasswd]} {
+ incr i
+ set userpasswd [ lindex $argv $i ]
+ }
+ set do_passwd 0
+ # VTY Password
+ } -v* {
+ if {! [regexp .\[vV\](.+) $arg ignore passwd]} {
+ incr i
+ set passwd [ lindex $argv $i ]
+ }
+ set do_passwd 0
+ # Version string
+ } -V* {
+ send_user "@PACKAGE@ @VERSION@\n"
+ exit 0
+ # Enable Username
+ } -w* -
+ -W* {
+ if {! [regexp .\[wW\](.+) $arg ignore enauser]} {
+ incr i
+ set enausername [ lindex $argv $i ]
+ }
+ # Environment variable to pass to -s scripts
+ } -E*
+ {
+ if {[regexp .\[E\](.+)=(.+) $arg ignore varname varvalue]} {
+ set E$varname $varvalue
+ } else {
+ send_user "\nError: invalid format for -E in $arg\n"
+ exit 1
+ }
+ # Enable Password
+ } -e*
+ {
+ if {! [regexp .\[e\](.+) $arg ignore enapasswd]} {
+ incr i
+ set enapasswd [ lindex $argv $i ]
+ }
+ set do_enapasswd 0
+ # Command to run.
+ } -c* -
+ -C* {
+ if {! [regexp .\[cC\](.+) $arg ignore command]} {
+ incr i
+ set command [ lindex $argv $i ]
+ }
+ set do_command 1
+ # Expect script to run.
+ } -s* -
+ -S* {
+ if {! [regexp .\[sS\](.+) $arg ignore sfile]} {
+ incr i
+ set sfile [ lindex $argv $i ]
+ }
+ if { ! [ file readable $sfile ] } {
+ send_user "\nError: Can't read $sfile\n"
+ exit 1
+ }
+ set do_script 1
+ # 'ssh -c' cypher type
+ } -y* -
+ -Y* {
+ if {! [regexp .\[eE\](.+) $arg ignore cypher]} {
+ incr i
+ set cypher [ lindex $argv $i ]
+ }
+ # alternate cloginrc file
+ } -f* -
+ -F* {
+ if {! [regexp .\[fF\](.+) $arg ignore password_file]} {
+ incr i
+ set password_file [ lindex $argv $i ]
+ }
+ # Timeout
+ } -t* -
+ -T* {
+ if {! [regexp .\[tT\](.+) $arg ignore timeout]} {
+ incr i
+ set timeout [ lindex $argv $i ]
+ }
+ # Command file
+ } -x* -
+ -X {
+ if {! [regexp .\[xX\](.+) $arg ignore cmd_file]} {
+ incr i
+ set cmd_file [ lindex $argv $i ]
+ }
+ if [ catch {set cmd_fd [open $cmd_file r]} reason ] {
+ send_user "\nError: $reason\n"
+ exit 1
+ }
+ set cmd_text [read $cmd_fd]
+ close $cmd_fd
+ set command [join [split $cmd_text \n] \;]
+ set do_command 1
+ # Do we enable?
+ } -noenable {
+ set avenable 0
+ # Does tacacs automatically enable us?
+ } -autoenable {
+ set avautoenable 1
+ set avenable 0
+ } -* {
+ send_user "\nError: Unknown argument! $arg\n"
+ send_user $usage
+ exit 1
+ } default {
+ break
+ }
+ }
+}
+# Process routers...no routers listed is an error.
+if { $i == $argc } {
+ send_user "\nError: $usage"
+}
+
+# Only be quiet if we are running a script (it can log its output
+# on its own)
+if { $do_script } {
+ log_user 0
+} else {
+ log_user 1
+}
+
+#
+# Done configuration/variable setting. Now run with it...
+#
+
+# Sets Xterm title if interactive...if its an xterm and the user cares
+proc label { host } {
+ global env
+ # if CLOGIN has an 'x' in it, don't set the xterm name/banner
+ if [info exists env(CLOGIN)] {
+ if {[string first "x" $env(CLOGIN)] != -1} { return }
+ }
+ # take host from ENV(TERM)
+ if [info exists env(TERM)] {
+ if [ regexp \^(xterm|vs) $env(TERM) ignore ] {
+ send_user "\033]1;[lindex [split $host "."] 0]\a"
+ send_user "\033]2;$host\a"
+ }
+ }
+}
+
+# This is a helper function to make the password file easier to
+# maintain. Using this the password file has the form:
+# add password sl* pete cow
+# add password at* steve
+# add password * hanky-pie
+proc add {var args} { global int_$var ; lappend int_$var $args}
+proc include {args} {
+ global env
+ regsub -all "(^{|}$)" $args {} args
+ if { [ regexp "^/" $args ignore ] == 0 } {
+ set args $env(HOME)/$args
+ }
+ source_password_file $args
+}
+
+proc find {var router} {
+ upvar int_$var list
+ if { [info exists list] } {
+ foreach line $list {
+ if { [string match [lindex $line 0] $router ] } {
+ return [lrange $line 1 end]
+ }
+ }
+ }
+ return {}
+}
+
+# Loads the password file. Note that as this file is tcl, and that
+# it is sourced, the user better know what to put in there, as it
+# could install more than just password info... I will assume however,
+# that a "bad guy" could just as easy put such code in the clogin
+# script, so I will leave .cloginrc as just an extention of that script
+proc source_password_file { password_file } {
+ global env
+ if { ! [file exists $password_file] } {
+ send_user "\nError: password file ($password_file) does not exist\n"
+ exit 1
+ }
+ file stat $password_file fileinfo
+ if { [expr ($fileinfo(mode) & 007)] != 0000 } {
+ send_user "\nError: $password_file must not be world readable/writable\n"
+ exit 1
+ }
+ if [ catch {source $password_file} reason ] {
+ send_user "\nError: $reason\n"
+ exit 1
+ }
+}
+
+# Log into the router.
+# returns: 0 on success, 1 on failure
+proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
+ global command spawn_id in_proc do_command do_script
+ global prompt u_prompt p_prompt e_prompt sshcmd
+ set in_proc 1
+ set uprompt_seen 0
+
+ # try each of the connection methods in $cmethod until one is successful
+ set progs [llength $cmethod]
+ foreach prog [lrange $cmethod 0 end] {
+ incr progs -1
+ if [string match "telnet*" $prog] {
+ regexp {telnet(:([^[:space:]]+))*} $prog methcmd suffix port
+ if {"$port" == ""} {
+ set retval [ catch {spawn telnet $router} reason ]
+ } else {
+ set retval [ catch {spawn telnet $router $port} reason ]
+ }
+ if { $retval } {
+ send_user "\nError: telnet failed: $reason\n"
+ return 1
+ }
+ } elseif [string match "ssh*" $prog] {
+ regexp {ssh(:([^[:space:]]+))*} $prog methcmd suffix port
+ if {"$port" == ""} {
+ set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user $router} reason ]
+
+ } else {
+ set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user -p $port $router} reason ]
+ }
+ if { $retval } {
+ send_user "\nError: $sshcmd failed: $reason\n"
+ return 1
+ }
+ } else {
+ send_user "\nError: unknown connection method: $prog\n"
+ return 1
+ }
+ sleep 0.3
+
+ # This helps cleanup each expect clause.
+ expect_after {
+ timeout {
+ send_user "\nError: TIMEOUT reached\n"
+ catch {close}; catch {wait};
+ if { $in_proc} {
+ return 1
+ } else {
+ continue
+ }
+ } eof {
+ send_user "\nError: EOF received\n"
+ catch {close}; catch {wait};
+ if { $in_proc} {
+ return 1
+ } else {
+ continue
+ }
+ }
+ }
+
+ # Here we get a little tricky. There are several possibilities:
+ # the router can ask for a username and passwd and then
+ # talk to the TACACS server to authenticate you, or if the
+ # TACACS server is not working, then it will use the enable
+ # passwd. Or, the router might not have TACACS turned on,
+ # then it will just send the passwd.
+ # if telnet fails with connection refused, try ssh
+ expect {
+ -re "(Connection refused|Secure connection \[^\n\r]+ refused)" {
+ catch {close}; catch {wait};
+ if !$progs {
+ send_user "\nError: Connection Refused ($prog): $router\n"
+ return 1
+ }
+ }
+ -re "(Connection closed by|Connection to \[^\n\r]+ closed)" {
+ catch {close}; catch {wait};
+ if !$progs {
+ send_user "\nError: Connection closed ($prog): $router\n"
+ return 1
+ }
+ }
+ eof { send_user "\nError: Couldn't login: $router\n"; wait; return 1 }
+ -nocase "unknown host\r" {
+ send_user "\nError: Unknown host $router\n";
+ catch {close}; catch {wait};
+ return 1
+ }
+ "Host is unreachable" {
+ send_user "\nError: Host Unreachable: $router\n";
+ catch {close}; catch {wait};
+ return 1
+ }
+ "No address associated with name" {
+ send_user "\nError: Unknown host $router\n";
+ catch {close}; catch {wait};
+ return 1
+ }
+ -re "(Host key not found |The authenticity of host .* be established).*\(yes\/no\)\?" {
+ send "yes\r"
+ send_user "\nHost $router added to the list of known hosts.\n"
+ exp_continue }
+ -re "HOST IDENTIFICATION HAS CHANGED.* \(yes\/no\)\?" {
+ send "no\r"
+ send_user "\nError: The host key for $router has changed. Update the SSH known_hosts file accordingly.\n"
+ catch {close}; catch {wait};
+ return 1
+ }
+ -re "Offending key for .* \(yes\/no\)\?" {
+ send "no\r"
+ send_user "\nError: host key mismatch for $router. Update the SSH known_hosts file accordingly.\n"
+ catch {close}; catch {wait};
+ return 1
+ }
+ -re "(denied|Sorry)" {
+ send_user "\nError: Check your passwd for $router\n"
+ catch {close}; catch {wait}; return 1
+ }
+ "Login failed" {
+ send_user "\nError: Check your passwd for $router\n"
+ catch {close}; catch {wait}; return 1
+ }
+ -re "% (Bad passwords|Authentication failed)" {
+ send_user "\nError: Check your passwd for $router\n"
+ catch {close}; catch {wait}; return 1
+ }
+ "Press any key to continue" {
+ # send_user "Pressing the ANY key\n"
+ send "\r"
+ exp_continue
+ }
+ -re "Enter Selection: " {
+ # Catalyst 1900s have some lame menu. Enter
+ # K to reach a command-line.
+ send "K\r"
+ exp_continue
+ }
+ -re "Last login:" {
+ exp_continue
+ }
+ -re "@\[^\r\n]+ $p_prompt" {
+ # ssh pwd prompt
+ sleep 1
+ send -h -- "$userpswd\r"
+ exp_continue
+ }
+ -re "$u_prompt" {
+ send -h -- "$user\r"
+ set uprompt_seen 1
+ exp_continue
+ }
+ -re "$p_prompt" {
+ sleep 1
+ if {$uprompt_seen == 1} {
+ send -h -- "$userpswd\r"
+ } else {
+ send -h -- "$passwd\r"
+ }
+ exp_continue
+ }
+ -re "$prompt" { break; }
+ "Login invalid" {
+ send_user "\nError: Invalid login: $router\n";
+ catch {close}; catch {wait}; return 1
+ }
+ -re "\[^\r\n]\[\r\n]+" { exp_continue }
+ }
+ }
+
+ set in_proc 0
+ return 0
+}
+
+# Enable
+proc do_enable { enauser enapasswd } {
+ global prompt in_proc
+ global u_prompt e_prompt
+ set in_proc 1
+
+ send -h "enable\r"
+ expect {
+ -re "$u_prompt" { send -h -- "$enauser\r"; exp_continue}
+ -re "$e_prompt" { send -h -- "$enapasswd\r"; exp_continue}
+ "#" { set prompt "#" }
+ -re "(denied|Sorry|Incorrect)" {
+ # % Access denied - from local auth and poss. others
+ send_user "\nError: Check your Enable passwd\n";
+ return 1
+ }
+ "% Error in authentication" {
+ send_user "\nError: Check your Enable passwd\n"
+ return 1
+ }
+ "% Bad passwords" {
+ send_user "\nError: Check your Enable passwd\n"
+ return 1
+ }
+ }
+ # We set the prompt variable (above) so script files don't need
+ # to know what it is.
+ set in_proc 0
+ return 0
+}
+
+# Run commands given on the command line.
+proc run_commands { prompt command } {
+ global in_proc
+ set in_proc 1
+
+ send -h "terminal length 0\r"
+ # escape any parens in the prompt, such as "(enable)"
+ regsub -all {[)(]} $prompt {\\&} reprompt
+ # match cisco config mode prompts too, such as router(config-if)#,
+ # but catalyst does not change in this fashion.
+ regsub -all {^(.{1,11}).*([#>])$} $reprompt {\1([^#>\r\n]+)?\2(\\([^)\\r\\n]+\\))?} reprompt
+ expect {
+ -re $reprompt {}
+ -re "\[\n\r]+" { exp_continue }
+ }
+
+ # this is the only way i see to get rid of more prompts in o/p..grrrrr
+ log_user 0
+
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ # the pager can not be turned off on the PIX, so we have to look
+ # for the "More" prompt. the extreme is equally obnoxious, with a
+ # global switch in the config.
+ # XXX I think the pager can be turned off and this is just an artifact of
+ # clogin
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -h -- "[subst -nocommands [lindex $commands $i]]\r"
+ expect {
+ -re "\b+" { exp_continue }
+ -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
+ }
+ -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
+ exp_continue }
+ -re "^--More--\[\r\n]+" { # specific match c1900 pager
+ send " "
+ exp_continue }
+ -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
+ exp_continue }
+ -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
+ send " "
+ # bloody ^[[2K after " "
+ expect {
+ -re "^\[^\r\n]*\r" {}
+ }
+ exp_continue
+ }
+ -re "^ *--More--\[^\n\r]*" {
+ send " "
+ exp_continue }
+ -re "^<-+ More -+>\[^\n\r]*" {
+ send_user -- "$expect_out(buffer)"
+ send " "
+ exp_continue }
+ }
+ }
+ log_user 1
+
+ send -h "exit\r"
+ expect {
+ -re "^\[^\n\r *]*$reprompt" {
+ # the Cisco CE and Jnx ERX
+ # return to non-enabled mode
+ # on exit in enabled mode.
+ send -h "exit\r"
+ exp_continue;
+ }
+ "Would you like to save them now" { # Force10
+ send "n\r"
+ exp_continue
+ }
+ "Configuration changes have occurred.*" { # Cisco CSS
+ send "n\r"
+ exp_continue
+ }
+ "Do you wish to save your configuration changes" {
+ send "n\r"
+ exp_continue
+ }
+ -re "\[\n\r]+" { exp_continue }
+ timeout { catch {close}; catch {wait};
+ return 0
+ }
+ eof { return 0 }
+ }
+ set in_proc 0
+}
+
+#
+# For each router... (this is main loop)
+#
+source_password_file $password_file
+set in_proc 0
+set exitval 0
+foreach router [lrange $argv $i end] {
+ set router [string tolower $router]
+ send_user -- "$router\n"
+
+ # Figure out the prompt.
+ # autoenable is off by default. If we have it defined, it was done
+ # on the command line. If it is not specifically set on the command
+ # line, check the password file.
+ if $avautoenable {
+ set autoenable 1
+ set enable 0
+ set prompt "#\[^\[:digit:]]"
+ } else {
+ set ae [find autoenable $router]
+ if { "$ae" == "1" } {
+ set autoenable 1
+ set enable 0
+ set prompt "#\[^\[:digit:]]"
+ } else {
+ set autoenable 0
+ set enable $avenable
+ set prompt ">"
+ }
+ }
+
+ # look for noenable option in .cloginrc
+ if { [find noenable $router] != "" } {
+ set enable 0
+ }
+
+ # Figure out passwords
+ if { $do_passwd || $do_enapasswd } {
+ set pswd [find password $router]
+ if { [llength $pswd] == 0 } {
+ send_user -- "\nError: no password for $router in $password_file.\n"
+ continue
+ }
+ if { $enable && $do_enapasswd && $autoenable == 0 && [llength $pswd] < 2 } {
+ send_user -- "\nError: no enable password for $router in $password_file.\n"
+ continue
+ }
+ set passwd [join [lindex $pswd 0] ""]
+ set enapasswd [join [lindex $pswd 1] ""]
+ } else {
+ set passwd $userpasswd
+ set enapasswd $enapasswd
+ }
+
+ # Figure out username
+ if {[info exists username]} {
+ # command line username
+ set ruser $username
+ } else {
+ set ruser [join [find user $router] ""]
+ if { "$ruser" == "" } { set ruser $default_user }
+ }
+
+ # Figure out username's password (if different from the vty password)
+ if {[info exists userpasswd]} {
+ # command line username
+ set userpswd $userpasswd
+ } else {
+ set userpswd [join [find userpassword $router] ""]
+ if { "$userpswd" == "" } { set userpswd $passwd }
+ }
+
+ # Figure out enable username
+ if {[info exists enausername]} {
+ # command line enausername
+ set enauser $enausername
+ } else {
+ set enauser [join [find enauser $router] ""]
+ if { "$enauser" == "" } { set enauser $ruser }
+ }
+
+ # Figure out prompts
+ set u_prompt [find userprompt $router]
+ if { "$u_prompt" == "" } {
+ set u_prompt "(Username|Login|login|user name):"
+ } else {
+ set u_prompt [join [lindex $u_prompt 0] ""]
+ }
+ set p_prompt [find passprompt $router]
+ if { "$p_prompt" == "" } {
+ set p_prompt "(\[Pp]assword|passwd):"
+ } else {
+ set p_prompt [join [lindex $p_prompt 0] ""]
+ }
+ set e_prompt [find enableprompt $router]
+ if { "$e_prompt" == "" } {
+ set e_prompt "\[Pp]assword:"
+ } else {
+ set e_prompt [join [lindex $e_prompt 0] ""]
+ }
+
+ # Figure out cypher type
+ if {[info exists cypher]} {
+ # command line cypher type
+ set cyphertype $cypher
+ } else {
+ set cyphertype [find cyphertype $router]
+ if { "$cyphertype" == "" } { set cyphertype "3des" }
+ }
+
+ # Figure out connection method
+ set cmethod [find method $router]
+ if { "$cmethod" == "" } { set cmethod {{telnet} {ssh}} }
+
+ # Figure out the SSH executable name
+ set sshcmd [find sshcmd $router]
+ if { "$sshcmd" == "" } { set sshcmd {ssh} }
+
+ # Login to the router
+ if {[login $router $ruser $userpswd $passwd $enapasswd $cmethod $cyphertype]} {
+ incr exitval
+ # if login failed, move on to the next device
+ continue
+ }
+ if { $enable } {
+ if {[do_enable $enauser $enapasswd]} {
+ if { $do_command || $do_script } {
+ incr exitval
+ catch {close}; catch {wait};
+ continue
+ }
+ }
+ }
+ # we are logged in, now figure out the full prompt
+ send "\r"
+ expect {
+ -re "\[\r\n]+" { exp_continue; }
+ -re "^.+$prompt" { set junk $expect_out(0,string);
+ regsub -all "\[\]\[]" $junk {\\&} prompt;
+ }
+ }
+
+ if { $do_command } {
+ if {[run_commands $prompt $command]} {
+ incr exitval
+ continue
+ }
+ } elseif { $do_script } {
+ send -h "terminal length 0\r"
+ expect -re $prompt {}
+ source $sfile
+ catch {close};
+ } else {
+ label $router
+ log_user 1
+ interact
+ }
+
+ # End of for each router
+ catch {wait};
+ sleep 0.3
+}
+exit $exitval
diff --git a/bin/mrvrancid.in b/bin/mrvrancid.in
new file mode 100644
index 0000000..3288a31
--- /dev/null
+++ b/bin/mrvrancid.in
@@ -0,0 +1,522 @@
+#! @PERLV_PATH@
+##
+## $Id$
+##
+## @PACKAGE@ @VERSION@
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
+## All rights reserved.
+##
+## This code is derived from software contributed to and maintained by
+## Terrapin Communications, Inc. by Henry Kilmer, John Heasley, Andrew Partan,
+## Pete Whiting, Austin Schutz, and Andrew Fort.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions
+## are met:
+## 1. Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## 2. Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in the
+## documentation and/or other materials provided with the distribution.
+## 3. All advertising materials mentioning features or use of this software
+## must display the following acknowledgement:
+## This product includes software developed by Terrapin Communications,
+## Inc. and its contributors for RANCID.
+## 4. Neither the name of Terrapin Communications, Inc. nor the names of its
+## contributors may be used to endorse or promote products derived from
+## this software without specific prior written permission.
+## 5. It is requested that non-binding fixes and modifications be contributed
+## back to Terrapin Communications, Inc.
+##
+## THIS SOFTWARE IS PROVIDED BY Terrapin Communications, INC. AND CONTRIBUTORS
+## ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS
+## BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+## POSSIBILITY OF SUCH DAMAGE.
+#
+# Amazingly hacked version of Hank's rancid - this one tries to
+# deal with MegaVision MRV.
+#
+# RANCID - Really Awesome New Cisco confIg Differ
+#
+# usage: rancid [-dV] [-l] [-f filename | hostname]
+#
+use Getopt::Std;
+getopts('dflV');
+if ($opt_V) {
+ print "@PACKAGE@ @VERSION@\n";
+ exit(0);
+}
+$log = $opt_l;
+$debug = $opt_d;
+$file = $opt_f;
+$host = $ARGV[0];
+$ios = "IOS";
+$clean_run = 0;
+$found_end = 0;
+$found_version = 0;
+$found_env = 0;
+$found_diag = 0;
+$timeo = 90; # clogin timeout in seconds
+
+# force a terminal type so as not to confuse the POS
+$ENV{'TERM'} = "vt100";
+
+my(@commandtable, %commands, @commands);# command lists
+my($aclsort) = ("ipsort"); # ACL sorting mode
+my($filter_commstr); # SNMP community string filtering
+my($filter_pwds); # password filtering mode
+
+# This routine is used to print out the router configuration
+sub ProcessHistory {
+ my($new_hist_tag,$new_command,$command_string,@string) = (@_);
+ if ((($new_hist_tag ne $hist_tag) || ($new_command ne $command))
+ && defined %history) {
+ print eval "$command \%history";
+ undef %history;
+ }
+ if (($new_hist_tag) && ($new_command) && ($command_string)) {
+ if ($history{$command_string}) {
+ $history{$command_string} = "$history{$command_string}@string";
+ } else {
+ $history{$command_string} = "@string";
+ }
+ } elsif (($new_hist_tag) && ($new_command)) {
+ $history{++$#history} = "@string";
+ } else {
+ print "@string";
+ }
+ $hist_tag = $new_hist_tag;
+ $command = $new_command;
+ 1;
+}
+
+sub numerically { $a <=> $b; }
+
+# This is a sort routine that will sort numerically on the
+# keys of a hash as if it were a normal array.
+sub keynsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort numerically keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# keys of a hash as if it were a normal array.
+sub keysort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# values of a hash as if it were a normal array.
+sub valsort{
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort values %lines) {
+ $sorted_lines[$i] = $key;
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a numerical sort routine (ascending).
+sub numsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $num (sort {$a <=> $b} keys %lines) {
+ $sorted_lines[$i] = $lines{$num};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# ip address when the ip address is anywhere in
+# the strings.
+sub ipsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $addr (sort sortbyipaddr keys %lines) {
+ $sorted_lines[$i] = $lines{$addr};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# These two routines will sort based upon IP addresses
+sub ipaddrval {
+ my(@a) = ($_[0] =~ m#^(\d+)\.(\d+)\.(\d+)\.(\d+)$#);
+ $a[3] + 256 * ($a[2] + 256 * ($a[1] +256 * $a[0]));
+}
+sub sortbyipaddr {
+ &ipaddrval($a) <=> &ipaddrval($b);
+}
+
+# This routine parses "show version"
+sub ShowVersion {
+ print STDERR " In ShowVersion: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { $found_version = 1; last};
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(0) if ($found_version); # Only do this routine once
+ return(-1) if (/command authorization failed/i);
+
+ /copyright/i && next;
+ /u-boot/i &&
+ ProcessHistory("COMMENTS","keysort","C1", "!ROM: $_") && next;
+
+ ProcessHistory("COMMENTS","keysort","B1", "!Image: $_") && next;
+ }
+ ProcessHistory("COMMENTS","","","!\n");
+ return(0);
+}
+
+# This routine parses "show chassis" for the gsr
+# This will create arrays for hw info.
+sub ShowChassis {
+ # Skip if this is not a 1200n.
+ print STDERR " In ShowChassis: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ if (/Chassis +Model/ || /=======/) {
+ ProcessHistory("COMMENTS","keysort","C1","!$_");
+ next;
+ }
+ # Trim the temp from the end of the slot line
+ chomp; s/\s+$//;
+ s/\S+$//;
+ ProcessHistory("COMMENTS","keysort","C1","!$_\n");
+ }
+ ProcessHistory("COMMENTS","","","!\n");
+ return(0);
+}
+
+# This routine parses "show slots".
+sub ShowSlots {
+ print STDERR " In ShowSlots: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ return if (/^\s*\^$/);
+ last if (/online diag status/i);
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("SLOTS","","","!$_");
+ next;
+ }
+ ProcessHistory("SLOTS","","","!\n");
+
+ return(0);
+}
+
+# This routine processes a "write term"
+sub WriteTerm {
+ print STDERR " In WriteTerm: $_" if ($debug);
+ my($lineauto,$comment,$linecnt) = (0,0,0);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if (/(Invalid input detected|Type help or )/i);
+ return(0) if ($found_end); # Only do this routine once
+ return(-1) if (/command authorization failed/i);
+
+ /Non-Volatile memory is in use/ && return(-1); # NvRAM is locked
+ $linecnt++;
+ $lineauto = 0 if (/^[^ ]/);
+ # skip the crap
+ if (/^(##+$|(Building|Current) configuration)/i) {
+ while (<INPUT>) {
+ next if (/^Current configuration\s*:/i);
+ next if (/^:/);
+ next if (/^([%!].*|\s*)$/);
+ last;
+ }
+ tr/\015//d;
+ }
+
+ # skip consecutive comment lines to avoid oscillating extra comment
+ # line on some access servers. grrr.
+ if (/^!/) {
+ next if ($comment);
+ ProcessHistory("","","",$_);
+ $comment++;
+ next;
+ }
+ $comment = 0;
+
+ # Dog gone Cool matches to process the rest of the config
+ /^tftp-server flash / && next; # kill any tftp remains
+ /^ntp clock-period / && next; # kill ntp clock-period
+ /^ length / && next; # kill length on serial lines
+ /^ width / && next; # kill width on serial lines
+ $lineauto = 1 if /^ modem auto/;
+ /^ speed / && $lineauto && next; # kill speed on serial lines
+ if (/^(enable )?(password|passwd)( level \d+)? / && $filter_pwds >= 1) {
+ ProcessHistory("ENABLE","","","!$1$2$3 <removed>\n");
+ next;
+ }
+ if (/^(enable secret) / && $filter_pwds >= 2) {
+ ProcessHistory("ENABLE","","","!$1 <removed>\n");
+ next;
+ }
+ if (/^username (\S+)(\s.*)? password (encrypted \S+|\S+)(\sclass .*$)/){
+ if ($filter_pwds >= 2) {
+ ProcessHistory("USER","keysort","$1",
+ "!username $1$2 password <removed>$4\n");
+ } else {
+ ProcessHistory("USER","keysort","$1","$_");
+ }
+ next;
+ }
+ if (/^(\s*)password / && $filter_pwds >= 1) {
+ ProcessHistory("LINE-PASS","","","!$1password <removed>\n");
+ next;
+ }
+
+ # filter out any RCS/CVS tags to avoid confusing local CVS storage
+ s/\$(Revision|Id):/ $1:/;
+ # order access-lists
+ /^access-list\s+(\d\d?)\s+(\S+)\s+(\S+)/ &&
+ ProcessHistory("ACL $1 $2","$aclsort","$3","$_") && next;
+ # order extended access-lists
+ /^access-list\s+(\d\d\d)\s+(\S+)\s+ip\s+host\s+(\S+)/ &&
+ ProcessHistory("EACL $1 $2","$aclsort","$3","$_") && next;
+ /^access-list\s+(\d\d\d)\s+(\S+)\s+ip\s+(\d\S+)/ &&
+ ProcessHistory("EACL $1 $2","$aclsort","$3","$_") && next;
+ /^access-list\s+(\d\d\d)\s+(\S+)\s+ip\s+any/ &&
+ ProcessHistory("EACL $1 $2","$aclsort","0.0.0.0","$_") && next;
+ # order arp lists
+ /^arp\s+(\d+\.\d+\.\d+\.\d+)\s+/ &&
+ ProcessHistory("ARP","$aclsort","$1","$_") && next;
+ /^ip prefix-list\s+(\S+)\s+seq\s+(\d+)\s+(permit|deny)\s+(\d\S+)(\/.*)$/ &&
+ ProcessHistory("PACL $1 $3","$aclsort","$4","ip prefix-list $1 $3 $4$5\n")
+ && next;
+ # order logging statements
+ /^logging (\d+\.\d+\.\d+\.\d+)/ &&
+ ProcessHistory("LOGGING","ipsort","$1","$_") && next;
+ # order/prune snmp-server host statements
+ # we only prune lines of the form
+ # snmp-server host a.b.c.d <community>
+ if (/^snmp-server host (\d+\.\d+\.\d+\.\d+) /) {
+ if ($filter_commstr) {
+ my($ip) = $1;
+ my($line) = "snmp-server host $ip";
+ my(@tokens) = split(' ', $');
+ my($token);
+ while ($token = shift(@tokens)) {
+ if ($token eq 'version') {
+ $line .= " " . join(' ', ($token, shift(@tokens)));
+ if ($token eq '3') {
+ $line .= " " . join(' ', ($token, shift(@tokens)));
+ }
+ } elsif ($token eq 'vrf') {
+ $line .= " " . join(' ', ($token, shift(@tokens)));
+ } elsif ($token =~ /^(informs?|traps?|(no)?auth)$/) {
+ $line .= " " . $token;
+ } else {
+ $line = "!$line " . join(' ', ("<removed>", join(' ',@tokens)));
+ last;
+ }
+ }
+ ProcessHistory("SNMPSERVERHOST","ipsort","$ip","$line\n");
+ } else {
+ ProcessHistory("SNMPSERVERHOST","ipsort","$1","$_");
+ }
+ next;
+ }
+ if (/^(snmp-server community) (\S+)/) {
+ if ($filter_commstr) {
+ ProcessHistory("SNMPSERVERCOMM","keysort","$_",
+ "!$1 <removed>$'") && next;
+ } else {
+ ProcessHistory("SNMPSERVERCOMM","keysort","$_","$_") && next;
+ }
+ }
+ # prune tacacs/radius server keys
+ # radius-server host <1-5> IP SECRET [<ip port> [TIMEOUT [RETRY]]]
+ if (/^((tacacs|radius)-server)\s(\d+\.\d+\.\d+\.\d+)\s(\w*)/
+ && $filter_pwds >= 1) {
+ ProcessHistory("","","","!$1 $2 <removed>$'"); next;
+ }
+ # order ntp peers/servers
+ if (/^ntp (server|peer) (\d+)\.(\d+)\.(\d+)\.(\d+)/) {
+ $sortkey = sprintf("$1 %03d%03d%03d%03d",$2,$3,$4,$5);
+ ProcessHistory("NTP","keysort",$sortkey,"$_");
+ next;
+ }
+
+ # catch anything that wasnt matched above.
+ ProcessHistory("","","","$_");
+ }
+ # The MRV MCC lacks a definitive "end of config" marker. If we have seen
+ # at least 5 lines of show config output, we can be reasonably sure that
+ # we got the config.
+ if ($linecnt > 5) {
+ $found_end = 1;
+ return(0);
+ }
+
+ return(0);
+}
+
+# dummy function
+sub DoNothing {print STDOUT;}
+
+# Main
+@commandtable = (
+ {'show version' => 'ShowVersion'},
+ {'show chassis' => 'ShowChassis'},
+ {'show slots' => 'ShowSlots'},
+ {'show running-config' => 'WriteTerm'}
+);
+# Use an array to preserve the order of the commands and a hash for mapping
+# commands to the subroutine and track commands that have been completed.
+@commands = map(keys(%$_), @commandtable);
+%commands = map(%$_, @commandtable);
+
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
+
+if (length($host) == 0) {
+ if ($file) {
+ print(STDERR "Too few arguments: file name required\n");
+ exit(1);
+ } else {
+ print(STDERR "Too few arguments: host name required\n");
+ exit(1);
+ }
+}
+open(OUTPUT,">$host.new") || die "Can't open $host.new for writing: $!\n";
+select(OUTPUT);
+# make OUTPUT unbuffered if debugging
+if ($debug) { $| = 1; }
+
+if ($file) {
+ print STDERR "opening file $host\n" if ($debug);
+ print STDOUT "opening file $host\n" if ($log);
+ open(INPUT,"<$host") || die "open failed for $host: $!\n";
+} else {
+ print STDERR "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug);
+ print STDOUT "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($log);
+ if (defined($ENV{NOPIPE})) {
+ system "mrvlogin -t $timeo -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "clogin failed for $host: $!\n";
+ open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n";
+ } else {
+ open(INPUT,"mrvlogin -t $timeo -c \"$cisco_cmds\" $host </dev/null |") || die "mrvlogin failed for $host: $!\n";
+ }
+}
+
+# determine ACL sorting mode
+if ($ENV{"ACLSORT"} =~ /no/i) {
+ $aclsort = "";
+}
+# determine community string filtering mode
+if (defined($ENV{"NOCOMMSTR"}) &&
+ ($ENV{"NOCOMMSTR"} =~ /yes/i || $ENV{"NOCOMMSTR"} =~ /^$/)) {
+ $filter_commstr = 1;
+} else {
+ $filter_commstr = 0;
+}
+# determine password filtering mode
+if ($ENV{"FILTER_PWDS"} =~ /no/i) {
+ $filter_pwds = 0;
+} elsif ($ENV{"FILTER_PWDS"} =~ /all/i) {
+ $filter_pwds = 2;
+} else {
+ $filter_pwds = 1;
+}
+
+ProcessHistory("","","","!RANCID-CONTENT-TYPE: mrv\n!\n");
+ProcessHistory("COMMENTS","keysort","B0","!\n");
+ProcessHistory("COMMENTS","keysort","C0","!\n");
+TOP: while(<INPUT>) {
+ tr/\015//d;
+ if (/^Error:/) {
+ print STDOUT ("$host clogin error: $_");
+ print STDERR ("$host clogin error: $_") if ($debug);
+ $clean_run = 0;
+ last;
+ }
+ while (/#\s*($cmds_regexp)\s*$/) {
+ $cmd = $1;
+ if (!defined($prompt)) {
+ $prompt = ($_ =~ /^([^#]+#)/)[0];
+ $prompt =~ s/([][}{)(\\])/\\$1/g;
+ print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
+ }
+ print STDERR ("HIT COMMAND:$_") if ($debug);
+ if (! defined($commands{$cmd})) {
+ print STDERR "$host: found unexpected command - \"$cmd\"\n";
+ $clean_run = 0;
+ last TOP;
+ }
+ $rval = &{$commands{$cmd}};
+ delete($commands{$cmd});
+ if ($rval == -1) {
+ $clean_run = 0;
+ last TOP;
+ }
+ }
+ if (/[>#]\s?exit$/) {
+ $clean_run = 1;
+ last;
+ }
+}
+print STDOUT "Done $logincmd: $_\n" if ($log);
+# Flush History
+ProcessHistory("","","","");
+# Cleanup
+close(INPUT);
+close(OUTPUT);
+
+if (defined($ENV{NOPIPE})) {
+ unlink("$host.raw") if (! $debug);
+}
+
+# check for completeness
+if (scalar(%commands) || !$clean_run || !$found_end) {
+ if (scalar(%commands)) {
+ printf(STDOUT "$host: missed cmd(s): %s\n", join(',', keys(%commands)));
+ printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%commands))) if ($debug);
+ }
+ if (!$clean_run || !$found_end) {
+ print STDOUT "$host: End of run not found\n";
+ print STDERR "$host: End of run not found\n" if ($debug);
+ system("/usr/bin/tail -1 $host.new");
+ }
+ unlink "$host.new" if (! $debug);
+}
diff --git a/bin/nlogin.in b/bin/nlogin.in
index 73b0e5a..d2e211d 100644
--- a/bin/nlogin.in
+++ b/bin/nlogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -379,22 +379,22 @@ cyphertype } {
" ### Login failed" {send_user "\nError: Check your passwd for $firewall\n"; return 1 }
-re "(login:)" {
sleep 1;
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "@\[^\r\n]+\[Pp]assword:" {
# ssh pwd prompt
sleep 1
- send "$userpswd\r"
+ send -- "$userpswd\r"
exp_continue
}
"\[Pp]assword:" {
sleep 1;
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -413,27 +413,14 @@ proc run_commands { prompt command } {
send "set console page 0\r"
expect -re $prompt {}
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
-
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst [lindex $commands $i]]\r"
- expect {
- -re "\[\n\r]+" { exp_continue }
- -re "$prompt" {}
- -gl "--- more ---" { send " "
- exp_continue
- }
- }
- }
- } else {
- send "[subst $command]\r"
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst [lindex $commands $i]]\r"
expect {
- -re "\[\n\r]+" { exp_continue }
- -re "$prompt" {}
- -gl "--- more ---" { send " "
+ -re "\[\n\r]+" { exp_continue }
+ -re "$prompt" {}
+ -gl "--- more ---" { send " "
exp_continue
}
}
diff --git a/bin/nrancid.in b/bin/nrancid.in
index c4fe9f1..6d6fbd4 100644
--- a/bin/nrancid.in
+++ b/bin/nrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/nslogin.in b/bin/nslogin.in
index 9e9e354..0dae833 100644
--- a/bin/nslogin.in
+++ b/bin/nslogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -78,8 +78,6 @@ set avautoenable 0
# tracks if we receive them on the command line.
set do_passwd 1
set do_enapasswd 1
-# attempt at platform switching.
-set platform ""
# Find the user in the ENV, or use the unix userid.
if {[ info exists env(CISCO_USER) ]} {
@@ -317,7 +315,7 @@ proc source_password_file { password_file } {
# Log into the router.
# returns: 0 on success, 1 on failure
proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
- global spawn_id in_proc do_command do_script platform
+ global spawn_id in_proc do_command do_script
global prompt u_prompt p_prompt e_prompt sshcmd
set in_proc 1
set uprompt_seen 0
@@ -426,7 +424,7 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
-re "(@\[^\r\n]+ )?$p_prompt" {
# ssh pwd prompt
sleep 1
- send "$userpswd\r"
+ send -- "$userpswd\r"
exp_continue
}
@@ -446,83 +444,52 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
# Run commands given on the command line.
proc run_commands { prompt command } {
- global in_proc platform
+ global in_proc
set in_proc 1
regsub -all "\[)(]" $prompt {\\&} reprompt
# this is the only way i see to get rid of more prompts in o/p..grrrrr
log_user 0
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
- # the pager can not be turned off on the PIX, so we have to look
- # for the "More" prompt. the extreme is equally obnoxious, with a
- # global switch in the config.
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
- expect {
- -re "\b+" { exp_continue }
- -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
- }
- -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
- send " "
- # bloody ^[[2K after " "
- expect {
- -re "^\[^\r\n]*\r" {}
- }
- exp_continue
- }
- -re "^ --More--\[^\n\r]*" {
- send " "
- exp_continue }
- -re "^<-+ More -+>\[^\n\r]*" {
- send_user -- "$expect_out(buffer)"
- send " "
- exp_continue }
- }
- }
- } else {
- # the pager can not be turned off on the PIX, so we have to look
- # for the "More" prompt. the extreme is equally obnoxious, with a
- # global switch in the config.
- send "[subst -nocommands $command]\r"
- expect {
- -re "\b+" { exp_continue }
- -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
- }
- -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
- exp_continue }
- -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
- send " "
- # bloody ^[[2K after " "
- expect {
- -re "^\[^\r\n]*\r" {}
- }
- exp_continue
- }
- -re "^ --More--\[^\n\r]*" {
- send " "
- exp_continue }
- -re "^<-+ More -+>\[^\n\r]*" {
- send_user -- "$expect_out(buffer)"
- send " "
- exp_continue }
- }
+
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ # the pager can not be turned off on the PIX, so we have to look
+ # for the "More" prompt. the extreme is equally obnoxious, with a
+ # global switch in the config.
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
+ expect {
+ -re "\b+" { exp_continue }
+ -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
+ }
+ -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
+ exp_continue
+ }
+ -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
+ exp_continue
+ }
+ -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
+ send " "
+ # bloody ^[[2K after " "
+ expect {
+ -re "^\[^\r\n]*\r" {}
+ }
+ exp_continue
+ }
+ -re "^ --More--\[^\n\r]*" {
+ send " "
+ exp_continue
+ }
+ -re "^<-+ More -+>\[^\n\r]*" {
+ send_user -- "$expect_out(buffer)"
+ send " "
+ exp_continue
+ }
+ }
}
log_user 1
- if { [ string compare "extreme" "$platform" ] } {
- send "exit\r"
- } else {
- send "quit\r"
- }
+ send "quit\r"
expect {
"Do you wish to save your configuration changes" {
send "n\r"
@@ -651,17 +618,8 @@ foreach router [lrange $argv $i end] {
send "\r"
expect {
-re "\[\r\n]+" { exp_continue; }
- -re "^(.+:)1 $prompt" { # stoopid extreme cmd-line numbers and
- # prompt based on state of config changes
- set junk $expect_out(1,string)
- regsub -all "^\\\* " $expect_out(1,string) {} junk
- set prompt ".? ?$junk\[0-9]+ $prompt";
- set platform "extreme"
- }
-re "^.+$prompt" { set junk $expect_out(0,string);
regsub -all "\[\]\[]" $junk {\\&} prompt; }
- -re "^.+> \\\(enable\\\)" { set junk $expect_out(0,string);
- regsub -all "\[\]\[]" $junk {\\&} prompt; }
}
if { $do_command } {
diff --git a/bin/nsrancid.in b/bin/nsrancid.in
index bd159b7..e7f3d96 100644
--- a/bin/nsrancid.in
+++ b/bin/nsrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -66,8 +66,6 @@ my($aclsort) = ("ipsort"); # ACL sorting mode
my($filter_commstr); # SNMP community string filtering
my($filter_pwds); # password filtering mode
-@temp1 = split (/\./,$host);
-$prompt = "$temp1[0]#";
$prompt = "netscaler#";
# This routine is used to print out the router configuration
@@ -170,7 +168,7 @@ sub sortbyipaddr {
&ipaddrval($a) <=> &ipaddrval($b);
}
-# This routine parses "show config"
+# This routine parses "show ns ns.conf"
sub ShowConfig {
print STDERR " In ShowConfig: $_" if ($debug);
@@ -199,23 +197,6 @@ sub ShowConfig {
return(0);
}
-# This routine parses "get log setting"
-sub GetLogSet {
- print STDERR " In GetLogSet: $_" if ($debug);
-
- while (<INPUT>) {
- tr/\015//d;
- last if (/^$prompt/);
- next if (/^(\s*|\s*$cmd\s*)$/);
- next if (/^Reading configuration information/);
- next if (/^Can\'t find object or class named \"\-all\"\s*$/);
- return(1) if /(invalid command name)/;
-
- ProcessHistory("","","","$_");
- }
- return(0);
-}
-
# This routine parses single command's that return no required info
sub RunCommand {
print STDERR " In RunCommand: $_" if ($debug);
@@ -233,8 +214,7 @@ sub DoNothing {print STDOUT;}
# Main
@commandtable = (
- {'cat /etc/ns.conf' => 'ShowConfig'},
- {'get log setting' => 'GetLogSet'}
+ {'show ns ns.conf' => 'ShowConfig'},
);
# Use an array to preserve the order of the commands and a hash for mapping
# commands to the subroutine and track commands that have been completed.
@@ -297,26 +277,14 @@ if ($ENV{"FILTER_PWDS"} =~ /no/i) {
ProcessHistory("","","","!RANCID-CONTENT-TYPE: netscaler\n!\n");
TOP: while(<INPUT>) {
tr/\015//d;
-#print STDOUT " --IN--$_";
- # if ( (/exit/) || $found_end ) {
-# $clean_run=1;
-#print STDOUT "\n\nhere11\n";
-#last;
-# }
-
- # if ( (/netscaler#/) || $found_end ) {
-#print STDOUT "\n\nhere1\n";
-# $clean_run=1;
-# last;
-# }
if (/^Error:/) {
print STDOUT ("$host nslogin error: $_");
print STDERR ("$host nslogin error: $_") if ($debug);
- $clean_run=0;
+ $clean_run = 0;
last;
}
- while (/#\s*($cmds_regexp)\s*$/) {
+ while (/$prompt\s*($cmds_regexp)\s*$/) {
$cmd = $1;
print STDERR ("HIT COMMAND:$_") if ($debug);
if (! defined($commands{$cmd})) {
diff --git a/bin/nxrancid.in b/bin/nxrancid.in
new file mode 100644
index 0000000..699479f
--- /dev/null
+++ b/bin/nxrancid.in
@@ -0,0 +1,1835 @@
+#! @PERLV_PATH@
+##
+## $Id$
+##
+## @PACKAGE@ @VERSION@
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
+## All rights reserved.
+##
+## This code is derived from software contributed to and maintained by
+## Terrapin Communications, Inc. by Henry Kilmer, John Heasley, Andrew Partan,
+## Pete Whiting, Austin Schutz, and Andrew Fort.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions
+## are met:
+## 1. Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## 2. Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in the
+## documentation and/or other materials provided with the distribution.
+## 3. All advertising materials mentioning features or use of this software
+## must display the following acknowledgement:
+## This product includes software developed by Terrapin Communications,
+## Inc. and its contributors for RANCID.
+## 4. Neither the name of Terrapin Communications, Inc. nor the names of its
+## contributors may be used to endorse or promote products derived from
+## this software without specific prior written permission.
+## 5. It is requested that non-binding fixes and modifications be contributed
+## back to Terrapin Communications, Inc.
+##
+## THIS SOFTWARE IS PROVIDED BY Terrapin Communications, INC. AND CONTRIBUTORS
+## ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS
+## BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+## POSSIBILITY OF SUCH DAMAGE.
+#
+# RANCID - Really Awesome New Cisco confIg Differ
+#
+# usage: rancid [-dV] [-l] [-f filename | hostname]
+#
+use Getopt::Std;
+getopts('dflV');
+if ($opt_V) {
+ print "@PACKAGE@ @VERSION@\n";
+ exit(0);
+}
+$log = $opt_l;
+$debug = $opt_d;
+$file = $opt_f;
+$host = $ARGV[0];
+$ios = "IOS";
+$clean_run = 0;
+$found_end = 0;
+$timeo = 90; # clogin timeout in seconds
+
+my(@commandtable, %commands, @commands);# command lists
+my($aclsort) = ("ipsort"); # ACL sorting mode
+my($filter_commstr); # SNMP community string filtering
+my($filter_pwds); # password filtering mode
+
+# This routine is used to print out the router configuration
+sub ProcessHistory {
+ my($new_hist_tag,$new_command,$command_string,@string) = (@_);
+ if ((($new_hist_tag ne $hist_tag) || ($new_command ne $command))
+ && defined %history) {
+ print eval "$command \%history";
+ undef %history;
+ }
+ if (($new_hist_tag) && ($new_command) && ($command_string)) {
+ if ($history{$command_string}) {
+ $history{$command_string} = "$history{$command_string}@string";
+ } else {
+ $history{$command_string} = "@string";
+ }
+ } elsif (($new_hist_tag) && ($new_command)) {
+ $history{++$#history} = "@string";
+ } else {
+ print "@string";
+ }
+ $hist_tag = $new_hist_tag;
+ $command = $new_command;
+ 1;
+}
+
+sub numerically { $a <=> $b; }
+
+# This is a sort routine that will sort numerically on the
+# keys of a hash as if it were a normal array.
+sub keynsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort numerically keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# keys of a hash as if it were a normal array.
+sub keysort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# values of a hash as if it were a normal array.
+sub valsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort values %lines) {
+ $sorted_lines[$i] = $key;
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a numerical sort routine (ascending).
+sub numsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $num (sort {$a <=> $b} keys %lines) {
+ $sorted_lines[$i] = $lines{$num};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# ip address when the ip address is anywhere in
+# the strings.
+sub ipsort {
+ local(%lines) = @_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $addr (sort sortbyipaddr keys %lines) {
+ $sorted_lines[$i] = $lines{$addr};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# These two routines will sort based upon IP addresses
+sub ipaddrval {
+ my(@a) = ($_[0] =~ m#^(\d+)\.(\d+)\.(\d+)\.(\d+)$#);
+ $a[3] + 256 * ($a[2] + 256 * ($a[1] +256 * $a[0]));
+}
+sub sortbyipaddr {
+ &ipaddrval($a) <=> &ipaddrval($b);
+}
+
+# This routine parses "show version"
+sub ShowVersion {
+ print STDERR " In ShowVersion: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { last};
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ if (/^Cisco Nexus Operating System/) { $type = "NXOS";}
+ if (/^Software$/) {
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { last};
+ next if (/^\s*$cmd\s*$/);
+
+ if (/^$/) {
+ goto EndSoftware;
+ }
+ /\s*([^:]*:)\s*(.*)$/ && ProcessHistory("COMMENTS","keysort","F1", "!Software: $1 $2\n") && next;
+ }
+ }
+EndSoftware:
+ if (/^Hardware$/) {
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { last};
+ next if (/^\s*$cmd\s*$/);
+
+ if (/^$/) {
+ goto EndHardware;
+ }
+ if (/^\s*(.*) CPU\s*with (\d*) kB(.*)$/) {
+ my($tmp) = int($2 / 1024);
+ ProcessHistory("COMMENTS","keysort","A2", "!Hardware: $1 CPU with $tmp MB$3\n");
+ next;
+ }
+ if (/^\s*(.*)\s*with (\d*) kB(.*)$/) {
+ my($tmp) = int($2 / 1024);
+ ProcessHistory("COMMENTS","keysort","A2", "!Hardware: $1with $tmp MB$3\n");
+ next;
+ }
+ /^\s*(.*)$/ && ProcessHistory("COMMENTS","keysort","A2", "!Hardware: $1\n") && next;
+ }
+ }
+EndHardware:
+ if (/^\s+(bootflash|slot0):\s+(\d+) kB(.*)$/) {
+ my($tmp) = int($2 / 1024);
+ ProcessHistory("COMMENTS","keysort","B2", "!Memory: $1: $tmp MB$3\n");
+ next;
+ }
+
+ }
+
+ print STDERR "TYPE = $type\n" if ($debug);
+ ProcessHistory("COMMENTS","keysort","A1", "!Chassis type: $proc - a $type router\n");
+
+ return(0);
+}
+
+# This routine parses "show version build-info"
+sub ShowVersionBuild {
+ print STDERR " In ShowVersionBuild: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { last};
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ /^Built By / && ProcessHistory("Build","","", "!Build: $_");
+ /^On Date / && ProcessHistory("Build","","", "!Build: $_");
+ /^From Tree / && ProcessHistory("Build","","", "!Build: $_");
+ /^Base Tag / && ProcessHistory("Build","","", "!Build: $_");
+ /^Release for / && ProcessHistory("Build","","", "!Build: $_");
+ }
+ ProcessHistory("Build","","","!\n");
+ return(0);
+}
+
+# This routine parses "show system redundancy status"
+sub ShowRedundancy {
+ print STDERR " In ShowRedundancy: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+
+ s/ +$//; # Drop trailing ' '
+ ProcessHistory("Redundancy","","","!Red: $_");
+ }
+ ProcessHistory("Redundancy","","","!\n");
+ return(0);
+}
+
+# This routine parses "show IDprom"
+sub ShowIDprom {
+ my($tmp);
+
+ print STDERR " In ShowIDprom: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ /FRU is .(.*)\'/ && ($tmp = $1);
+ /Product Number = .(.*)\'/ &&
+ ProcessHistory("COMMENTS","keysort","D0",
+ "!Catalyst Chassis type: $1, $tmp\n");
+ /Serial Number = .([0-9A-Za-z]+)/ &&
+ ProcessHistory("COMMENTS","keysort","D1",
+ "!Catalyst Chassis S/N: $1\n");
+ /Manufacturing Assembly Number = .([-0-9]+)/ && ($tmp = $1);
+ /Manufacturing Assembly Revision = .(.*)\'/ && ($tmp .= ", rev " . $1);
+ /Hardware Revision = ([0-9.]+)/ &&
+ ProcessHistory("COMMENTS","keysort","D2",
+ "!Catalyst Chassis assembly: $tmp, ver $1\n");
+ }
+ return(0);
+}
+
+# This routine parses "show install active"
+sub ShowInstallActive {
+ print STDERR " In ShowInstallActive: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ ProcessHistory("COMMENTS","keysort","F5","!Image: $_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "show environment"
+sub ShowEnv {
+ print STDERR " In ShowEnv: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { last};
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ s/ +$//; # Drop trailing ' '
+ ProcessHistory("COMMENTS","","","!Env: $_");
+ }
+ ProcessHistory("COMMENTS","","","!\n");
+ return(0);
+}
+
+# This routine parses "show environment temperature"
+sub ShowEnvTemp {
+ print STDERR " In ShowEnvTemp: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { last};
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+# Cut out CurTemp
+#--------------------------------------------------------------------
+#Module Sensor MajorThresh MinorThres CurTemp Status
+# 1 2 3 4 5 6 7
+#1234567890123456789012345678901234567890123456789012345678901234567890
+
+ s/^(.{50})(.{12})(.*)$/$1$3/;
+
+ s/ +$//; # Drop trailing ' '
+ ProcessHistory("COMMENTS","","","!Env: $_");
+ }
+ ProcessHistory("COMMENTS","","","!\n");
+ return(0);
+}
+
+# This routine parses "show rsp chassis-info" for the rsp
+# This will create arrays for hw info.
+sub ShowRSP {
+ print STDERR " In ShowRSP: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+ # return(1) if ($type !~ /^12[40]/);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+ /^$/ && next;
+
+ /^\s+Chassis model: (\S+)/ &&
+ ProcessHistory("COMMENTS","keysort","D1",
+ "!RSP Chassis model: $1\n") &&
+ next;
+ /^\s+Chassis S\/N: (.*)$/ &&
+ ProcessHistory("COMMENTS","keysort","D2",
+ "!RSP Chassis S/N: $1\n") &&
+ next;
+ }
+
+ return(0);
+}
+
+# This routine parses "show gsr chassis-info" for the gsr
+# This will create arrays for hw info.
+sub ShowGSR {
+ # Skip if this is not a 1200n.
+ print STDERR " In ShowGSR: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+ # return(1) if ($type !~ /^12[40]/);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+ /^$/ && next;
+
+ /^\s+Chassis: type (\S+) Fab Ver: (\S+)/ &&
+ ProcessHistory("COMMENTS","keysort","D1",
+ "!GSR Chassis type: $1 Fab Ver: $2\n") &&
+ next;
+ /^\s+Chassis S\/N: (.*)$/ &&
+ ProcessHistory("COMMENTS","keysort","D2",
+ "!GSR Chassis S/N: $1\n") &&
+ next;
+ /^\s+PCA: (\S+)\s*rev: (\S+)\s*dev: \S+\s*HW ver: (\S+)$/ &&
+ ProcessHistory("COMMENTS","keysort","D3",
+ "!GSR Backplane PCA: $1, rev $2, ver $3\n") &&
+ next;
+ /^\s+Backplane S\/N: (\S+)$/ &&
+ ProcessHistory("COMMENTS","keysort","D4",
+ "!GSR Backplane S/N: $1\n") &&
+ next;
+ }
+ ProcessHistory("COMMENTS","","","!\n");
+ return(0);
+}
+
+# This routine parses "show boot"
+sub ShowBoot {
+ print STDERR " In ShowBoot: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /Ambiguous command/i;
+ return(-1) if (/command authorization failed/i);
+
+ s/ variable = / = /;
+ ProcessHistory("COMMENTS","keysort","H1","!Variable: $_");
+ }
+ ProcessHistory("COMMENTS","","","!\n");
+ return(0);
+}
+
+# This routine parses "show flash"
+sub ShowFlash {
+ # skip if this is 7000, 7200, 7500, or 12000; else we end up with
+ # redundant data from dir /all slot0:
+ print STDERR " In ShowFlash: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if ($type =~ /^(12[40]|7)/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ /\s+(multiple-fs|nv_hdr|vlan\.dat)$/ && next;
+ ProcessHistory("FLASH","","","!Flash: $_");
+ }
+ ProcessHistory("","","","!\n");
+ return;
+}
+
+# This routine parses "dir /all ((disk|slot)N|bootflash|nvram):"
+sub DirSlotN {
+ print STDERR " In DirSlotN: $_" if ($debug);
+
+ my($dev) = (/\s([^\s]+):/);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /(No such device|Error Sending Request)/i;
+ return(1) if /\%Error: No such file or directory/;
+ return(1) if /No space information available/;
+ return(1) if / is either not present or not formatted/;
+ return(-1) if /\%Error calling/;
+ return(-1) if /(: device being squeezed|ATA_Status time out)/i; # busy
+ return(-1) if (/command authorization failed/i);
+ return(1) if /(Open device \S+ failed|Error opening \S+:)/;
+
+ if (/^\s*(\d+) bytes /) {
+ my($tmp) = int($1 / (1024 * 1024));
+ s/$1 bytes /$tmp MB /;
+ }
+
+ ProcessHistory("FLASH","","","!Flash: $dev: $_");
+ }
+ ProcessHistory("","","","!\n");
+ return(0);
+}
+
+# This routine parses "show controllers"
+sub ShowContAll {
+ # Skip if this is a 70[01]0, 7500, or 12000.
+ print STDERR " In ShowContAll: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ # return(1) if ($type =~ /^(12[40]|7[05])/);
+ return(-1) if (/command authorization failed/i);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ if (/^Interface ([^ \n(]*)/) { $INT = "$1, "; next; }
+ /^(BRI unit \d)/ &&
+ ProcessHistory("INT","","","!Interface: $1\n") && next;
+ /^LANCE unit \d, NIM/ &&
+ ProcessHistory("INT","","","!Interface: $_") && next;
+ /^(LANCE unit \d)/ &&
+ ProcessHistory("INT","","","!Interface: $1\n") && next;
+ /(Media Type is \S+),/ &&
+ ProcessHistory("INT","","","!\t$1\n");
+ if (/(M\dT[^ :]*:) show controller:$/) {
+ my($ctlr) = $1;
+ $_ = <INPUT>; tr/\015//d; s/ subunit \d,//;
+ ProcessHistory("INT","","","!Interface: $ctlr $_");
+ }
+ if (/^(\S+) : show controller:$/) {
+ my($ctlr) = $1;
+ $_ = <INPUT>; tr/\015//d; s/ subunit \d,//;
+ ProcessHistory("INT","","","!Interface: $ctlr: $_");
+ }
+ /^(HD unit \d), idb/ &&
+ ProcessHistory("INT","","","!Interface: $1\n") && next;
+ /^HD unit \d, NIM/ &&
+ ProcessHistory("INT","","","!Interface: $_") && next;
+ /^buffer size \d+ HD unit \d, (.*)/ &&
+ ProcessHistory("INT","","","!\t$1\n") && next;
+ /^AM79970 / && ProcessHistory("INT","","","!Interface: $_") && next;
+ /^buffer size \d+ (Universal Serial: .*)/ &&
+ ProcessHistory("INT","","","!\t$1\n") && next;
+ /^Hardware is (.*)/ &&
+ ProcessHistory("INT","","","!Interface: $INT$1\n") && next;
+ /^(QUICC Serial unit \d),/ &&
+ ProcessHistory("INT","","","!$1\n") && next;
+ /^QUICC Ethernet .*/ &&
+ ProcessHistory("INT","","","!$_") && next;
+ /^DTE .*\.$/ &&
+ ProcessHistory("INT","","","!\t$_") && next;
+ /^(cable type :.*),/ &&
+ ProcessHistory("INT","","","!\t$1\n") && next;
+ /^(.* cable.*), received clockrate \d+$/ &&
+ ProcessHistory("INT","","","!\t$1\n") && next;
+ /^.* cable.*$/ &&
+ ProcessHistory("INT","","","!\t$_") && next;
+ }
+ return(0);
+}
+
+# This routine parses "show controllers cbus"
+# Some of this is printed out in ShowDiagbus.
+sub ShowContCbus {
+ # Skip if this is not a 7000 or 7500.
+ print STDERR " In ShowContCbus: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ #return(1) if ($type !~ /^7[05]0/);
+ return(-1) if (/command authorization failed/i);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ if (/^\s*slot(\d+): ([^,]+), hw (\S+), sw (\S+), ccb/) {
+ $slot = $1;
+ $board{$slot} = $2;
+ $hwver{$slot} = $3;
+ $hwucode{$slot} = $4;
+ } elsif (/^\s*(\S+) (\d+), hardware version (\S+), microcode version (\S+)/) {
+ $slot = $2;
+ $board{$slot} = $1;
+ $hwver{$slot} = $3;
+ $hwucode{$slot} = $4;
+ } elsif (/(Microcode .*)/) {
+ $ucode{$slot} = $1;
+ } elsif (/(software loaded .*)/) {
+ $ucode{$slot} = $1;
+ } elsif (/(\d+) Kbytes of main memory, (\d+) Kbytes cache memory/) {
+ $hwmemd{$slot} = $1;
+ $hwmemc{$slot} = $2;
+ } elsif (/byte buffers/) {
+ chop;
+ s/^\s*//;
+ $hwbuf{$slot} = $_;
+ } elsif (/Interface (\d+) - (\S+ \S+),/) {
+ $interface = $1;
+ ProcessHistory("HW","","",
+ "!\n!Int $interface: in slot $slot, named $2\n"); next;
+ } elsif (/(\d+) buffer RX queue threshold, (\d+) buffer TX queue limit, buffer size (\d+)/) {
+ ProcessHistory("HW","","","!Int $interface: rxq $1, txq $2, bufsize $3\n");
+ next;
+ }
+ }
+ return(0);
+}
+
+# This routine parses "show debug"
+sub ShowDebug {
+ print STDERR " In ShowDebug: $_" if ($debug);
+ my($lines) = 0;
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ /^No matching debug flags set$/ && next;
+ /^No debug flags set$/ && next;
+ ProcessHistory("COMMENTS","keysort","J1","!DEBUG: $_");
+ $lines++;
+ }
+ if ($lines) {
+ ProcessHistory("COMMENTS","keysort","J0","!\n");
+ }
+ return(0);
+}
+
+# This routine parses "show cores"
+sub ShowCores {
+ print STDERR " In ShowCores: $_" if ($debug);
+ my($lines) = 0;
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("COMMENTS","keysort","K1","!CORES: $_");
+ $lines++;
+ }
+ if ($lines) {
+ ProcessHistory("COMMENTS","keysort","K0","!\n");
+ }
+ return(0);
+}
+
+# This routine parses "show processes log"
+sub ShowProcLog {
+ print STDERR " In ShowProcLog: $_" if ($debug);
+ my($lines) = 0;
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("COMMENTS","keysort","L1","!PROC_LOGS: $_");
+ $lines++;
+ }
+ if ($lines) {
+ ProcessHistory("COMMENTS","keysort","L0","!\n");
+ }
+ return(0);
+}
+
+# This routine parses "show diagbus"
+# This will create arrarys for hw info.
+sub ShowDiagbus {
+ # Skip if this is not a 7000, 70[01]0, or 7500.
+ print STDERR " In ShowDiagbus: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ #return(1) if ($type !~ /^7[05]/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ if (/^\s*Slot (\d+):/i) {
+ $slot = $1;
+ next;
+ } elsif (/^\s*Slot (\d+) \(virtual\):/i) {
+ $slot = $1;
+ next;
+ } elsif (/^\s*(.*Processor.*|.*controller|.*controler|.*Chassis Interface)(, FRU\s?:.*)?, HW rev (\S+), board revision (\S+)/i) {
+ $board = $1;
+ $hwver = $3;
+ $boardrev = $4;
+ if ($board =~ /Processor/) {
+ if ($board =~ /7000 Route\/Switch/) {
+ $board = "RSP7000";
+ } elsif ($board =~ /Route\/Switch Processor (\d)/) {
+ $board = "RSP$1";
+ } elsif ($board =~ /Route/) {
+ $board = "RP";
+ } elsif ($board =~ /Silicon Switch/) {
+ $board = "SSP";
+ } elsif ($board =~ /Switch/) {
+ $board = "SP";
+ $board = "SSP $sspmem" if $ssp;
+ } elsif ($board =~ /ATM/) {
+ $board = "AIP";
+ }
+ } elsif ($board =~ /(.*) controller/i) {
+ $board = $1;
+ }
+ # hwucode{$slot} defined in ShowContCbus
+ if (defined $hwucode{$slot}) {
+ ProcessHistory("SLOT","","","!\n!Slot $slot/$board: hvers $hwver rev $boardrev ucode $hwucode{$slot}\n");
+ } else {
+ ProcessHistory("SLOT","","","!\n!Slot $slot/$board: hvers $hwver rev $boardrev\n");
+ }
+ # These are also from the ShowContCbus
+ ProcessHistory("SLOT","","","!Slot $slot/$board: $ucode{$slot}\n") if (defined $ucode{$slot});
+ ProcessHistory("SLOT","","","!Slot $slot/$board: memd $hwmemd{$slot}, cache $hwmemc{$slot}\n")
+ if ((defined $hwmemd{$slot}) && (defined $hwmemc{$slot}));
+ ProcessHistory("SLOT","","","!Slot $slot/$board: $hwbuf{$slot}\n") if (defined $hwbuf{$slot});
+ next;
+ }
+ /Serial number: (\S+)\s*Part number: (\S+)/ &&
+ ProcessHistory("SLOT","","",
+ "!Slot $slot/$board: part $2, serial $1\n") &&
+ next;
+ /^\s*Controller Memory Size: (.*)$/ &&
+ ProcessHistory("SLOT","","","!Slot $slot/$board: $1\n") &&
+ next;
+ if (/PA Bay (\d) Information/) {
+ $pano = $1;
+ if ("PA" =~ /$board/) {
+ ($s,$c) = split(/\//,$board);
+ $board = "$s/$c/PA $pano";
+ } else {
+ $board =~ s/\/PA \d//;
+ $board = "$board/PA $pano";
+ }
+ next;
+ }
+ /\s+(.*) (IP|PA), (\d) ports?,( \S+,)? (FRU\s?: )?(\S+)/ &&
+ ProcessHistory("SLOT","","","!Slot $slot/$board: type $6, $3 ports\n") &&
+ next;
+ /\s+(.*) (IP|PA)( \(\S+\))?, (\d) ports?/ &&
+ ProcessHistory("SLOT","","","!Slot $slot/$board: type $1$3, $4 ports\n") &&
+ next;
+ /^\s*HW rev (\S+), Board revision (\S+)/ &&
+ ProcessHistory("SLOT","","","!Slot $slot/$board: hvers $1 rev $2\n") &&
+ next;
+ /Serial number: (\S+)\s*Part number: (\S+)/ &&
+ ProcessHistory("SLOT","","","!Slot $slot/$board: part $2, serial $1\n") && next;
+ }
+ return(0);
+}
+
+# This routine parses "show diag" for the gsr, 7200, 3700, 3600, 2600.
+# This will create arrarys for hw info.
+sub ShowDiag {
+ # Skip if this is not a 12000.
+ print STDERR " In ShowDiag: $_" if ($debug);
+
+ while (<INPUT>) {
+REDUX: tr/\015//d;
+ if (/^$prompt/) { $found_diag = 1; last};
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ # return(1) if ($type !~ /^(12[40]|720|36|26)/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(0) if ($found_diag); # Only do this routine once
+ return(-1) if (/command authorization failed/i);
+ /^$/ && next;
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ s/Port Packet Over SONET/POS/;
+ if (/^\s*SLOT\s+(\d+)\s+\((.*)\): (.*)/) {
+ $slot = $1;
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","A","!Slot $slot: $3\n");
+ next;
+ }
+ if (/^\s*NODE\s+(\S+) : (.*)/) {
+ $slot = $1;
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","A","!Slot $slot: $2\n");
+ next;
+ }
+ if (/^\s*PLIM\s+(\S+) : (.*)/) {
+ $slot = $1 . " PLIM";
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","A","!Slot $slot: $2\n");
+ next;
+ }
+ if (/^\s*RACK\s+(\S+) : (.*)/) {
+ $slot = "Rack/" . $1;
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","A","!Slot $slot: $2\n");
+ next;
+ }
+ if (/^\s+MAIN:\s* type \S+,\s+(.*)/) {
+ local($part) = $1;
+ $_ = <INPUT>;
+ if (/^\s+(HW version|Design Release) (\S+)\s+S\/N (\S+)/i) {
+ ProcessHistory("SLOT","keysort","AM","!Slot $slot/MAIN: part $part, serial $3\n");
+ ProcessHistory("SLOT","keysort","AM","!Slot $slot/MAIN: hvers $2\n");
+ } else {
+ ProcessHistory("SLOT","keysort","AM","!Slot $slot/MAIN: part $part\n");
+ goto REDUX;
+ }
+ next;
+ }
+ if (/^\s+MAIN:\s* board type \S+$/) {
+ $_ = <INPUT>;
+ tr/\015//d;
+ if (/^\s+(.+)$/) {
+ local($part) = $1;
+ $_ = <INPUT>;
+ tr/\015//d;
+ if (/^\s+dev (.*)$/) {
+ local($dev) = $1;
+ $_ = <INPUT>;
+ if (/^\s+S\/N (\S+)/) {
+ ProcessHistory("SLOT","keysort","AM","!Slot $slot/MAIN: part $part, dev $dev, serial $1\n");
+ } else {
+ ProcessHistory("SLOT","keysort","AM","!Slot $slot/MAIN: part $part, dev $dev\n");
+ goto REDUX;
+ }
+ } else {
+ ProcessHistory("SLOT","keysort","AM","!Slot $slot/MAIN: part $part\n");
+ goto REDUX;
+ }
+ } else {
+ goto REDUX;
+ }
+ next;
+ }
+ if (/^c3700\s+(io-board|mid-plane)/i) {
+ $slot = $1;
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","A","!Slot $slot: part $1\n");
+ next;
+ }
+ if (/ Engine:\s+(.*)/) {
+ ProcessHistory("SLOT","keysort","AE","!Slot $slot/Engine: $1\n");
+ }
+ if (/FRU:\s+Linecard\/Module:\s+(\S+)/) {
+ ProcessHistory("SLOT","keysort","AF","!Slot $slot/FRU: Linecard/Module: $1\n");
+ next;
+ }
+ if (/\s+Processor Memory:\s+(\S+)/) {
+ ProcessHistory("SLOT","keysort","AF","!Slot $slot/FRU: Processor Memory: $1\n");
+ next;
+ }
+ if (/\s+Packet Memory:\s+(\S+)/) {
+ ProcessHistory("SLOT","keysort","AF","!Slot $slot/FRU: Packet Memory: $1\n");
+ next;
+ }
+ if (/^\s+PCA:\s+(.*)/) {
+ local($part) = $1;
+ $_ = <INPUT>;
+ if (/^\s+(HW version|design release) (\S+)\s+S\/N (\S+)/i) {
+ ProcessHistory("SLOT","keysort","C1","!Slot $slot/PCA: part $part, serial $3\n");
+ ProcessHistory("SLOT","keysort","C2","!Slot $slot/PCA: hvers $2\n");
+ } else {
+ ProcessHistory("SLOT","keysort","C1","!Slot $slot/PCA: part $part\n");
+ goto REDUX;
+ }
+ next;
+ }
+ if (/^\s+MBUS: .*\)\s+(.*)/) {
+ local($tmp) = "!Slot $slot/MBUS: part $1";
+ $_ = <INPUT>;
+ /^\s+HW version (\S+)\s+S\/N (\S+)/ &&
+ ProcessHistory("SLOT","keysort","MB1","$tmp, serial $2\n") &&
+ ProcessHistory("SLOT","keysort","MB2","!Slot $slot/MBUS: hvers $1\n");
+ next;
+ }
+ if (/^\s+MBUS Agent Software version (.*)/) {
+ ProcessHistory("SLOT","keysort","MB3","!Slot $slot/MBUS: software $1\n");
+ next;
+ }
+ if (/^\s+PLD: (.*)/) {
+ ProcessHistory("SLOT","keysort","P","!Slot $slot/PLD: $1\n");
+ next;
+ }
+ if (/^\s+MONLIB: (.*)/) {
+ ProcessHistory("SLOT","keysort","Q","!Slot $slot/MONLIB: $1\n");
+ next;
+ }
+ if (/^\s+ROM Monitor version (.*)/) {
+ ProcessHistory("SLOT","keysort","R","!Slot $slot/ROM Monitor: version $1\n");
+ next;
+ }
+ if (/^\s+ROMMON: Version (.*)/) {
+ ProcessHistory("SLOT","keysort","R","!Slot $slot/ROMMON: version $1\n");
+ next;
+ }
+ if (/^\s+Fabric Downloader version used (.*)/) {
+ ProcessHistory("SLOT","keysort","Z","!Slot $slot/Fabric Downloader: version $1\n");
+ next;
+ }
+ if (/^\s+DRAM size: (\d+)/) {
+ local($dram) = $1 / 1048576;
+ $_ = <INPUT>;
+ if (/^\s+FrFab SDRAM size: (\d+)/) {
+ ProcessHistory("SLOT","keysort","MB4","!Slot $slot/MBUS: $dram Mbytes DRAM, "
+ . $1 / 1024 . " Kbytes SDRAM\n");
+ } else {
+ ProcessHistory("SLOT","keysort","MB4","!Slot $slot/MBUS: $dram Mbytes DRAM\n");
+ goto REDUX;
+ }
+ next;
+ }
+ # 7200, 3600, 2600, and 1700 stuff
+ if (/^(Slot)\s+(\d+(\/\d+)?):/
+ || /^\s+(WIC|VIC|WIC\/VIC) Slot (\d):/
+ || /^(Encryption AIM) (\d):/) {
+ if ($1 eq "WIC") {
+ $WIC = "/$2";
+ } elsif ($1 eq "VIC") {
+ $WIC = "/$2";
+ } elsif ($1 eq "WIC/VIC") {
+ $WIC = "/$2";
+ } elsif ($1 eq "DSP") {
+ $WIC = "/$2";
+ } elsif ($1 eq "Encryption AIM") {
+ $slot = "$2";
+ undef($WIC);
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","B","!Slot $slot: type $1\n");
+ next;
+ } else {
+ $slot = $2;
+ undef($WIC);
+ }
+ $_ = <INPUT>; tr/\015//d;
+
+ # clean up hideous 7200/etc formats to look more like 7500 output
+ s/Fast-ethernet on C7200 I\/O card/FE-IO/;
+ s/ with MII or RJ45/-TX/;
+ s/Fast-ethernet /100Base/; s/[)(]//g;
+ s/intermediate reach/IR/i;
+
+ ProcessHistory("SLOT","","","!\n");
+ /\s+(.*) port adapter,?\s+(\d+)\s+/i &&
+ ProcessHistory("SLOT","keysort","B",
+ "!Slot $slot: type $1, $2 ports\n") && next;
+ # I/O controller with no interfaces
+ /\s+(.*)\s+port adapter\s*$/i &&
+ ProcessHistory("SLOT","keysort","B",
+ "!Slot $slot: type $1, 0 ports\n") && next;
+ /\s+(.*)\s+daughter card(.*)$/ &&
+ ProcessHistory("SLOT","keysort","B",
+ "!Slot $slot$WIC: type $1$2\n") && next;
+ /\s+(FT1)$/ &&
+ ProcessHistory("SLOT","keysort","B",
+ "!Slot $slot$WIC: type $1\n") && next;
+ # AS5300/5400 handling
+ /^Hardware is\s+(.*)$/i &&
+ ProcessHistory("SLOT","keysort","B","!Slot $slot: type $1\n")
+ && next;
+ /^DFC type is\s+(.*)$/i &&
+ ProcessHistory("SLOT","keysort","B","!Slot $slot: type $1\n")
+ && next;
+ #
+ # handle WICs lacking "daughter card" in the 2nd line of their
+ # show diag o/p
+ if (defined($WIC)) {
+ s/^\s+//;
+ ProcessHistory("SLOT","keysort","B","!Slot $slot$WIC: type $_");
+ }
+ next;
+ } elsif (/^\s+(.* (DSP) Module) Slot (\d):/) {
+ # The 1760 (at least) has yet another format...where it has two
+ # dedicated DSP slots, and thus two slot 0s.
+ my($TYPE) = $1;
+ $WIC = "/$3";
+ ProcessHistory("SLOT","","","!\n");
+ ProcessHistory("SLOT","keysort","B",
+ "!Slot $slot$WIC: type $TYPE\n");
+ next;
+ }
+ # yet another format. seen on 2600s w/ 12.1, but appears to be all
+ # 12.1, including 7200s & 3700s. Sometimes the PCB serial appears
+ # before the hardware revision.
+ if (/(pcb serial number|hardware revision)\s+:\s+(\S+)$/i) {
+ my($hw, $pn, $rev, $sn);
+ if ($1 =~ /^pcb/i) {
+ $sn = $2;
+ } else {
+ $hw = $2;
+ }
+ while (<INPUT>) {
+ tr/\015//d;
+
+ if (/0x..: / || /^$/) {
+ # no effing idea why break does not work there
+ goto PerlSucks;
+ }
+ if (/hardware revision\s+:\s+(\S+)/i) { $hw = $1; }
+ if (/part number\s+:\s+(\S+)/i) { $pn = $1; }
+ if (/board revision\s+:\s+(\S+)/i) { $rev = $1; }
+ if (/pcb serial number\s+:\s+(\S+)/i) { $sn = $1; }
+ # fru/pid bits, true Cisco evolving "standard", hopefully
+ # "show inventory" will be "the way" soon.
+ #
+ if (/product \(fru\) number\s+:\s+(\S+)/i) { $fn = $1; }
+ if (/product number\s+:\s+(\S+)/i) { $fn = $1; }
+ if (/product\s+identifier\s+\(PID\)\s+:\s+(\S+)/i) { $fn = $1; }
+ if (/fru\s+part\s+number\s+(\S+)/i) { $fn = $1; }
+ }
+PerlSucks:
+ # fru/pid bits
+ ProcessHistory("SLOT","keysort","AG","!Slot $slot$WIC: fru $fn\n");
+ #
+ ProcessHistory("SLOT","keysort","B","!Slot $slot$WIC: hvers $hw rev $rev\n");
+ ProcessHistory("SLOT","keysort","C","!Slot $slot$WIC: part $pn, serial $sn\n");
+ }
+ /revision\s+(\S+).*revision\s+(\S+)/ &&
+ ProcessHistory("SLOT","keysort","C","!Slot $slot$WIC: hvers $1 rev $2\n") &&
+ next;
+ /number\s+(\S+)\s+Part number\s+(\S+)/ &&
+ ProcessHistory("SLOT","keysort","D","!Slot $slot$WIC: part $2, serial $1\n") &&
+ next;
+ # AS5x00 bits
+ /^\ Board Revision\s+(\S+),\s+Serial Number\s+(\S+),/ &&
+ ProcessHistory("SLOT","keysort","D",
+ "!Slot $slot$WIC: rev $1, serial $2\n") && next;
+ /^\ Board Hardware Version\s+(\S+),\s+Item Number\s+(\S+),/ &&
+ ProcessHistory("SLOT","keysort","D",
+ "!Slot $slot$WIC: hvers $1, part $2\n") && next;
+ /^Motherboard Info:/ &&
+ ProcessHistory("SLOT","keysort","D",
+ "!Slot $slot$WIC: Motherboard\n") && next;
+ #
+ }
+ ProcessHistory("SLOT","","","!\n");
+ return(0);
+}
+
+# This routine parses "show inventory".
+sub ShowInventory {
+ print STDERR " In ShowInventory: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ return if (/^\s*\^$/);
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ if (/^(NAME: "[^"]*",)\s+(DESCR: "[^"]+")/) {
+ ProcessHistory("INVENTORY","","", sprintf("!%-30s %s\n", $1, $2));
+ next;
+ }
+ # split PID/VID/SN line
+ if (/^PID: (\S*)\s*,\s+VID: (\S*)\s*,\s+SN: (\S*)\s*$/) {
+ my($entries) = "";
+ $entries .= "!PID: $1\n" if ($1);
+ $entries .= "!VID: $2\n" if ($2);
+ $entries .= "!SN: $3\n" if ($3);
+ ProcessHistory("INVENTORY","","", "$entries");
+ next;
+ }
+ # split broken PID/VID/SN lines.
+ if (/^PID: (\S*)\s*,\s+VID: (\S*)\s*$/) {
+ my($entries) = "";
+ $entries .= "!PID: $1\n" if ($1);
+ $entries .= "!VID: $2\n" if ($2);
+ <INPUT>;
+ tr/\015//d;
+ /^\s*,\s+SN: (\S*)\s*$/;
+ $entries .= "!SN: $1\n" if ($1);
+ ProcessHistory("INVENTORY","","", "$entries");
+ next;
+ }
+ ProcessHistory("INVENTORY","","","!$_");
+ }
+ ProcessHistory("INVENTORY","","","!\n");
+
+ return(0);
+}
+
+# This routine parses "show module".
+sub ShowModule {
+ print STDERR " In ShowModule: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ return if (/^\s*\^$/);
+ last if (/online diag status/i);
+ last if (/^$prompt/);
+ next if (/^\s*$cmd\s*$/);
+ return(-1) if (/command authorization failed/i);
+
+ s/(.*) \*$/$1/; # Drop a trailing '*'
+ /^\* this terminal session/ && next;
+ s/ +$//; # Drop trailing ' '
+ ProcessHistory("Module","","","!Mod: $_");
+ }
+ ProcessHistory("Module","","","!\n");
+
+ return(0);
+}
+
+# This routine parses "show spe version".
+sub ShowSpeVersion {
+ print STDERR " In ShowSpeVersion: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ ProcessHistory("MODEM","","","!Modem: $_") && next;
+ }
+ ProcessHistory("MODEM","","","!\n");
+ return(0);
+}
+
+# This routine parses "show c7200" for the 7200
+# This will create arrays for hw info.
+sub ShowC7200 {
+ # Skip if this is not a 7200.
+ print STDERR " In ShowC7200: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ #return(1) if ($type !~ /^72/);
+ return(-1) if (/command authorization failed/i);
+ /^$/ && next;
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ if (/^(C7200 )?Midplane EEPROM:/) {
+ $_ = <INPUT>;
+ /revision\s+(\S+).*revision\s+(\S+)/;
+ ProcessHistory("SLOT","","","!Slot Midplane: hvers $1 rev $2\n");
+ $_ = <INPUT>;
+ /number\s+(\S+)\s+Part number\s+(\S+)/;
+ ProcessHistory("SLOT","","","!Slot Midplane: part $2, serial $1\n!\n");
+ next;
+ }
+ if (/C720\d(VXR)? CPU EEPROM:/) {
+ my ($hvers,$rev,$part,$serial);
+ # npe400s report their cpu eeprom info differently w/ 12.0.21S
+ while (<INPUT>) {
+ /Hardware Revision\s+: (\S+)/ && ($hvers = $1) && next;
+ /Board Revision\s+: (\S+)/ && ($rev = $1) && next;
+ /Part Number\s+: (\S+)/ && ($part = $1) && next;
+ /Serial Number\s+: (\S+)/ && ($serial = $1) && next;
+ /revision\s+(\S+).*revision\s+(\S+)/ &&
+ ($hvers = $1, $rev = $2) && next;
+ /number\s+(\S+)\s+Part number\s+(\S+)/ &&
+ ($serial = $1, $part = $2) && next;
+ /^\s*$/ && last;
+ }
+ ProcessHistory("SLOT","","","!Slot CPU: hvers $hvers rev $rev\n");
+ ProcessHistory("SLOT","","","!Slot CPU: part $part, serial $serial\n!\n");
+ next;
+ }
+ }
+ return(0);
+}
+
+# This routine parses "show vtp status"
+sub ShowVTP {
+ print STDERR " In ShowVTP: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/);
+ return(-1) if (/command authorization failed/i);
+ next if (/^Configuration last modified by/);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ if (/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {
+ $DO_SHOW_VLAN = 1;
+ }
+ ProcessHistory("COMMENTS","keysort","I0","!VTP: $_");
+ }
+ ProcessHistory("COMMENTS","keysort","I0","!\n");
+ return(0);
+}
+
+# This routine parses "show vlan"
+sub ShowVLAN {
+ print STDERR " In ShowVLAN: $_" if ($debug);
+
+ ($_ = <INPUT>, return(1)) if (!$DO_SHOW_VLAN);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ next if (/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /^\s*\^\s*$/;
+ return(1) if /Line has invalid autocommand /;
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(1) if /Ambiguous command/i;
+ # newer releases (~12.1(9)) place the vlan config in the normal
+ # configuration (write term).
+ return(1) if ($type =~ /^(3550|4500)$/);
+ #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/);
+ return(-1) if (/command authorization failed/i);
+ # the pager can not be disabled per-session on the PIX
+ if (/^(<-+ More -+>)/) {
+ my($len) = length($1);
+ s/^$1\s{$len}//;
+ }
+
+ ProcessHistory("COMMENTS","keysort","IO","!VLAN: $_");
+ }
+ ProcessHistory("COMMENTS","keysort","IO","!\n");
+ return(0);
+}
+
+# This routine processes a "write term"
+sub WriteTerm {
+ print STDERR " In WriteTerm: $_" if ($debug);
+ my($lineauto,$comment,$linecnt) = (0,0,0);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if (/(Invalid input detected|Type help or )/i);
+ return(0) if ($found_end); # Only do this routine once
+ return(-1) if (/command authorization failed/i);
+# # the pager can not be disabled per-session on the PIX
+# if (/^(<-+ More -+>)/) {
+# my($len) = length($1);
+# s/^$1\s{$len}//;
+# }
+
+# /Non-Volatile memory is in use/ && return(-1); # NvRAM is locked
+ $linecnt++;
+ $lineauto = 0 if (/^[^ ]/);
+# # skip the crap
+# if (/^(##+$|(Building|Current) configuration)/i) {
+# while (<INPUT>) {
+# next if (/^Current configuration\s*:/i);
+# next if (/^:/);
+# next if (/^([%!].*|\s*)$/);
+# next if (/^ip add.*ipv4:/); # band-aid for 3620 12.0S
+# last;
+# }
+# if (defined($config_register)) {
+# ProcessHistory("","","","!\nconfig-register $config_register\n");
+# }
+# tr/\015//d;
+# }
+# # some versions have other crap mixed in with the bits in the
+# # block above
+# /^! (Last configuration|NVRAM config last)/ && next;
+
+# # skip consecutive comment lines to avoid oscillating extra comment
+# # line on some access servers. grrr.
+# if (/^!/) {
+# next if ($comment);
+# ProcessHistory("","","",$_);
+# $comment++;
+# next;
+# }
+# $comment = 0;
+
+ # Dog gone Cool matches to process the rest of the config
+# /^tftp-server flash / && next; # kill any tftp remains
+# /^ntp clock-period / && next; # kill ntp clock-period
+# /^ length / && next; # kill length on serial lines
+# /^ width / && next; # kill width on serial lines
+# $lineauto = 1 if /^ modem auto/;
+# /^ speed / && $lineauto && next; # kill speed on serial lines
+# /^ clockrate / && next; # kill clockrate on serial interfaces
+# if (/^(enable )?(password|passwd)( level \d+)? / && $filter_pwds >= 1) {
+# ProcessHistory("ENABLE","","","!$1$2$3 <removed>\n");
+# next;
+# }
+# if (/^(enable secret) / && $filter_pwds >= 2) {
+# ProcessHistory("ENABLE","","","!$1 <removed>\n");
+# next;
+# }
+# if (/^username (\S+)(\s.*)? secret /) {
+# if ($filter_pwds >= 2) {
+# ProcessHistory("USER","keysort","$1","!username $1$2 secret <removed>\n");
+# } else {
+# ProcessHistory("USER","keysort","$1","$_");
+# }
+# next;
+# }
+ # Sort username and delete passwords.
+ if (/^username (\S+) password (\d) (\S+)(\s.*)$/) {
+ if ($filter_pwds >= 2) {
+ ProcessHistory("USER","keysort","$1","!username $1 password <removed>$4\n");
+ } elsif ($filter_pwds >= 1 && $2 ne "5") {
+ ProcessHistory("USER","keysort","$1","!username $1 password <removed>$4\n");
+ } else {
+ ProcessHistory("USER","keysort","$1","$_");
+ }
+ next;
+ }
+ # Sort any other username info.
+ /^username (\S+) .*$/ && ProcessHistory("USER","keysort","$1","$_") && next;
+ # Sort snmp user and delete passwords.
+ if (/^snmp-server user (\S+) (\S+) auth md5 (\S+) priv (\S+) localizedkey$/) {
+ if ($filter_pwds >= 2) {
+ ProcessHistory("SNMP-USER","keysort","$1","!snmp-server user $1 $2 auth md5 <removed> priv <removed> localizedkey\n");
+ } else {
+ ProcessHistory("SNMP-USER","keysort","$1","$_");
+ }
+ next;
+ }
+ # Sort any other snmp user info.
+ /^snmp-server user (\S+) .*$/ && ProcessHistory("SNMP-USER","keysort","$1","$_") && next;
+ # Delete bgp passwords.
+ if (/^(\s*)password (\d) (\S+)(\s.*)?$/) {
+ if ($filter_pwds >= 2) {
+ ProcessHistory("","","","!$1password <removed>$4");
+ } elsif ($filter_pwds >= 1 && $2 ne "5") {
+ ProcessHistory("","","","!$1password <removed>$4");
+ } else {
+ ProcessHistory("","","","$_");
+ }
+ next;
+ }
+# # cisco AP w/ IOS
+# if (/^(wlccp \S+ username (\S+)(\s.*)? password) (\d \S+|\S+)/) {
+# if ($filter_pwds >= 1) {
+# ProcessHistory("USER","keysort","$2","!$1 <removed>\n");
+# } else {
+# ProcessHistory("USER","keysort","$2","$_");
+# }
+# next;
+# }
+# if (/^( set session-key (in|out)bound ah \d+ )/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1<removed>\n");
+# next;
+# }
+# if (/^( set session-key (in|out)bound esp \d+ (authenticator|cypher) )/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1<removed>\n");
+# next;
+# }
+# if (/^(\s*)password / && $filter_pwds >= 1) {
+# ProcessHistory("LINE-PASS","","","!$1password <removed>\n");
+# next;
+# }
+# if (/^(\s*)secret / && $filter_pwds >= 2) {
+# ProcessHistory("LINE-PASS","","","!$1secret <removed>\n");
+# next;
+# }
+# if (/^\s*neighbor (\S*) password / && $filter_pwds >= 1) {
+# ProcessHistory("","","","! neighbor $1 password <removed>\n");
+# next;
+# }
+# if (/^(ppp .* password) 7 .*/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# if (/^(ip ftp password) / && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# if (/^( ip ospf authentication-key) / && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# # isis passwords appear to be completely plain-text
+# if (/^\s+isis password (\S+)( .*)?/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!isis password <removed>$2\n"); next;
+# }
+# if (/^\s+(domain-password|area-password) (\S+)( .*)?/
+# && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>$3\n"); next;
+# }
+# # this is reversable, despite 'md5' in the cmd
+# if (/^( ip ospf message-digest-key \d+ md5) / && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# # this is also reversable, despite 'md5 encrypted' in the cmd
+# if (/^( message-digest-key \d+ md5 (7|encrypted)) / && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# if (/^((crypto )?isakmp key) \S+ / && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed> $'"); next;
+# }
+# # filter HSRP passwords
+# if (/^(\s+standby \d+ authentication) / && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# # this appears in "measurement/sla" images
+# if (/^(\s+key-string \d?)/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# if (/^( l2tp tunnel \S+ password)/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# # i am told these are plain-text on the PIX
+# if (/^(vpdn username (\S+) password)/) {
+# if ($filter_pwds >= 1) {
+# ProcessHistory("USER","keysort","$2","!$1 <removed>\n");
+# } else {
+# ProcessHistory("USER","keysort","$2","$_");
+# }
+# next;
+# }
+# if (/^( cable shared-secret )/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n");
+# next;
+# }
+# /fair-queue individual-limit/ && next;
+# # sort ip explicit-paths.
+# if (/^ip explicit-path name (\S+)/) {
+# my($key) = $1;
+# my($expath) = $_;
+# while (<INPUT>) {
+# tr/\015//d;
+# last if (/^$prompt/);
+# last if (/^$prompt/ || ! /^(ip explicit-path name |[ !])/);
+# if (/^ip explicit-path name (\S+)/) {
+# ProcessHistory("EXPATH","keysort","$key","$expath");
+# $key = $1;
+# $expath = $_;
+# } else {
+# $expath .= $_;
+# }
+# }
+# ProcessHistory("EXPATH","keysort","$key","$expath");
+# }
+# # sort route-maps
+# if (/^route-map (\S+)/) {
+# my($key) = $1;
+# my($routemap) = $_;
+# while (<INPUT>) {
+# tr/\015//d;
+# last if (/^$prompt/ || ! /^(route-map |[ !])/);
+# if (/^route-map (\S+)/) {
+# ProcessHistory("ROUTEMAP","keysort","$key","$routemap");
+# $key = $1;
+# $routemap = $_;
+# } else {
+# $routemap .= $_;
+# }
+# }
+# ProcessHistory("ROUTEMAP","keysort","$key","$routemap");
+# }
+# # filter out any RCS/CVS tags to avoid confusing local CVS storage
+# s/\$(Revision|Id):/ $1:/;
+# # order access-lists
+# /^access-list\s+(\d\d?)\s+(\S+)\s+(\S+)/ &&
+# ProcessHistory("ACL $1 $2","$aclsort","$3","$_") && next;
+# # order extended access-lists
+# /^access-list\s+(\d\d\d)\s+(\S+)\s+ip\s+host\s+(\S+)/ &&
+# ProcessHistory("EACL $1 $2","$aclsort","$3","$_") && next;
+# /^access-list\s+(\d\d\d)\s+(\S+)\s+ip\s+(\d\S+)/ &&
+# ProcessHistory("EACL $1 $2","$aclsort","$3","$_") && next;
+# /^access-list\s+(\d\d\d)\s+(\S+)\s+ip\s+any/ &&
+# ProcessHistory("EACL $1 $2","$aclsort","0.0.0.0","$_") && next;
+# # order arp lists
+# /^arp\s+(\d+\.\d+\.\d+\.\d+)\s+/ &&
+# ProcessHistory("ARP","$aclsort","$1","$_") && next;
+# /^ip prefix-list\s+(\S+)\s+seq\s+(\d+)\s+(permit|deny)\s+(\d\S+)(\/.*)$/ &&
+# ProcessHistory("PACL $1 $3","$aclsort","$4","ip prefix-list $1 $3 $4$5\n")
+# && next;
+# # order logging statements
+# /^logging (\d+\.\d+\.\d+\.\d+)/ &&
+# ProcessHistory("LOGGING","ipsort","$1","$_") && next;
+ # order cli alias names
+ /^cli alias name (\S+) .*$/ &&
+ ProcessHistory("CLI-ALIAS","keysort","$1","$_") && next;
+ # order snmp-server enable trap statements
+ /^snmp-server enable traps (.*)$/ &&
+ ProcessHistory("SNMP-TRAPS","keysort","$1","$_") && next;
+# # order/prune snmp-server host statements
+# # we only prune lines of the form
+# # snmp-server host a.b.c.d <community>
+# if (/^snmp-server host (\d+\.\d+\.\d+\.\d+) /) {
+# if ($filter_commstr) {
+# my($ip) = $1;
+# my($line) = "snmp-server host $ip";
+# my(@tokens) = split(' ', $');
+# my($token);
+# while ($token = shift(@tokens)) {
+# if ($token eq 'version') {
+# $line .= " " . join(' ', ($token, shift(@tokens)));
+# if ($token eq '3') {
+# $line .= " " . join(' ', ($token, shift(@tokens)));
+# }
+# } elsif ($token eq 'vrf') {
+# $line .= " " . join(' ', ($token, shift(@tokens)));
+# } elsif ($token =~ /^(informs?|traps?|(no)?auth)$/) {
+# $line .= " " . $token;
+# } else {
+# $line = "!$line " . join(' ', ("<removed>", join(' ',@tokens)));
+# last;
+# }
+# }
+# ProcessHistory("SNMPSERVERHOST","ipsort","$ip","$line\n");
+# } else {
+# ProcessHistory("SNMPSERVERHOST","ipsort","$1","$_");
+# }
+# next;
+# }
+# if (/^(snmp-server community) (\S+)/) {
+# if ($filter_commstr) {
+# ProcessHistory("SNMPSERVERCOMM","keysort","$_","!$1 <removed>$'") && next;
+# } else {
+# ProcessHistory("SNMPSERVERCOMM","keysort","$_","$_") && next;
+# }
+# }
+# # prune tacacs/radius server keys
+# if (/^((tacacs|radius)-server\s(\w*[-\s(\s\S+])*\s?key) (\d )?\w+/
+# && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>$'"); next;
+# }
+# # order clns host statements
+# /^clns host \S+ (\S+)/ &&
+# ProcessHistory("CLNS","keysort","$1","$_") && next;
+# # order alias statements
+# /^alias / && ProcessHistory("ALIAS","keysort","$_","$_") && next;
+# # delete ntp auth password - this md5 is a reversable too
+# if (/^(ntp authentication-key \d+ md5) / && $filter_pwds >= 1) {
+# ProcessHistory("","","","!$1 <removed>\n"); next;
+# }
+# # order ntp peers/servers
+# if (/^ntp (server|peer) (\d+)\.(\d+)\.(\d+)\.(\d+)/) {
+# $sortkey = sprintf("$1 %03d%03d%03d%03d",$2,$3,$4,$5);
+# ProcessHistory("NTP","keysort",$sortkey,"$_");
+# next;
+# }
+# # order ip host statements
+# /^ip host (\S+) / &&
+# ProcessHistory("IPHOST","keysort","$1","$_") && next;
+# # order ip nat source static statements
+# /^ip nat (\S+) source static (\S+)/ &&
+# ProcessHistory("IP NAT $1","ipsort","$2","$_") && next;
+# # order atm map-list statements
+# /^\s+ip\s+(\d+\.\d+\.\d+\.\d+)\s+atm-vc/ &&
+# ProcessHistory("ATM map-list","ipsort","$1","$_") && next;
+# # order ip rcmd lines
+# /^ip rcmd/ && ProcessHistory("RCMD","keysort","$_","$_") && next;
+#
+# # system controller
+# /^syscon address (\S*) (\S*)/ &&
+# ProcessHistory("","","","!syscon address $1 <removed>\n") &&
+# next;
+# if (/^syscon password (\S*)/ && $filter_pwds >= 1) {
+# ProcessHistory("","","","!syscon password <removed>\n");
+# next;
+# }
+
+ # catch anything that wasnt matched above.
+ ProcessHistory("","","","$_");
+ # end of config. the ": " game is for the PIX
+ if (/^(: +)?end$/) {
+ $found_end = 1;
+ return(0);
+ }
+ }
+ # The ContentEngine lacks a definitive "end of config" marker. If we
+ # know that it is a CE, SAN, or NXOS and we have seen at least 5 lines
+ # of write term output, we can be reasonably sure that we got the config.
+ if (($type == "CE" || $type == "SAN" || $type == "NXOS" ) && $linecnt > 5) {
+ $found_end = 1;
+ return(0);
+ }
+
+ return(0);
+}
+
+# This routine parses a single command that returns no required info.
+sub RunCommand {
+ print STDERR " In RunCommand: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ last if (/^$prompt/);
+ return(1) if /Line has invalid autocommand /;
+ return(1) if (/(Invalid input detected|Type help or )/i);
+ }
+ return(0);
+}
+
+# dummy function
+sub DoNothing {print STDOUT;}
+
+##############################
+# add these:
+# show version module X - wait until can show all
+# show version module X epld - wait until can show all
+# show version fan X epld - wait until can show all
+# show version xbar X epld - wait until can show all
+# show license - get sample output
+# show license usage - chop grace
+# show license host-id
+##############################
+
+# Main
+@commandtable = (
+ {'term no monitor-force' => 'RunCommand'},
+ {'show version' => 'ShowVersion'},
+ {'show version build-info all' => 'ShowVersionBuild'},
+ {'show system redundancy status' => 'ShowRedundancy'},
+# {'show idprom backplane', => 'ShowIDprom'},
+ {'show environment clock' => 'ShowEnv'},
+ {'show environment fan' => 'ShowEnv'},
+ {'show environment temperature' => 'ShowEnvTemp'},
+ {'show environment power' => 'ShowEnv'},
+# {'show rsp chassis-info', => 'ShowRSP'},
+# {'show gsr chassis' => 'ShowGSR'},
+ {'show diag chassis-info' => 'ShowGSR'},
+ {'show boot' => 'ShowBoot'},
+ {'dir bootflash:' => 'DirSlotN'},
+ {'dir core:' => 'DirSlotN'},
+ {'dir debug:' => 'DirSlotN'},
+## {'dir log:' => 'DirSlotN'}, # not useful
+ {'dir logflash:' => 'DirSlotN'},
+ {'dir slot0:' => 'DirSlotN'},
+ {'dir usb1:' => 'DirSlotN'},
+ {'dir usb2:' => 'DirSlotN'},
+ {'dir volatile:' => 'DirSlotN'},
+# {'show controllers' => 'ShowContAll'},
+# {'show controllers cbus' => 'ShowContCbus'},
+ {'show diagbus' => 'ShowDiagbus'},
+ {'show diag' => 'ShowDiag'},
+ {'show module' => 'ShowModule'},
+ {'show module xbar' => 'ShowModule'},
+ {'show spe version' => 'ShowSpeVersion'},
+ {'show inventory' => 'ShowInventory'},
+ {'show vtp status' => 'ShowVTP'},
+ {'show vlan' => 'ShowVLAN'},
+ {'show vlan-switch' => 'ShowVLAN'},
+ {'show debug' => 'ShowDebug'},
+ {'show cores vdc-all' => 'ShowCores'},
+ {'show processes log vdc-all' => 'ShowProcLog'},
+ {'show running-config' => 'WriteTerm'},
+# {'write term' => 'WriteTerm'},
+);
+# Use an array to preserve the order of the commands and a hash for mapping
+# commands to the subroutine and track commands that have been completed.
+@commands = map(keys(%$_), @commandtable);
+%commands = map(%$_, @commandtable);
+
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
+
+if (length($host) == 0) {
+ if ($file) {
+ print(STDERR "Too few arguments: file name required\n");
+ exit(1);
+ } else {
+ print(STDERR "Too few arguments: host name required\n");
+ exit(1);
+ }
+}
+open(OUTPUT,">$host.new") || die "Can't open $host.new for writing: $!\n";
+select(OUTPUT);
+# make OUTPUT unbuffered if debugging
+if ($debug) { $| = 1; }
+
+if ($file) {
+ print STDERR "opening file $host\n" if ($debug);
+ print STDOUT "opening file $host\n" if ($log);
+ open(INPUT,"<$host") || die "open failed for $host: $!\n";
+} else {
+ print STDERR "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug);
+ print STDOUT "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($log);
+ if (defined($ENV{NOPIPE})) {
+ system "clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "clogin failed for $host: $!\n";
+ open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n";
+ } else {
+ open(INPUT,"clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null |") || die "clogin failed for $host: $!\n";
+ }
+}
+
+# determine ACL sorting mode
+if ($ENV{"ACLSORT"} =~ /no/i) {
+ $aclsort = "";
+}
+# determine community string filtering mode
+if (defined($ENV{"NOCOMMSTR"}) &&
+ ($ENV{"NOCOMMSTR"} =~ /yes/i || $ENV{"NOCOMMSTR"} =~ /^$/)) {
+ $filter_commstr = 1;
+} else {
+ $filter_commstr = 0;
+}
+# determine password filtering mode
+if ($ENV{"FILTER_PWDS"} =~ /no/i) {
+ $filter_pwds = 0;
+} elsif ($ENV{"FILTER_PWDS"} =~ /all/i) {
+ $filter_pwds = 2;
+} else {
+ $filter_pwds = 1;
+}
+
+ProcessHistory("","","","!RANCID-CONTENT-TYPE: cisco\n!\n");
+ProcessHistory("COMMENTS","keysort","B0","!\n");
+ProcessHistory("COMMENTS","keysort","D0","!\n");
+ProcessHistory("COMMENTS","keysort","F0","!\n");
+ProcessHistory("COMMENTS","keysort","G0","!\n");
+TOP: while(<INPUT>) {
+ tr/\015//d;
+
+ if (/[>#]\s?exit$/) {
+ print STDERR ("$host: found exit\n") if ($debug);
+ $clean_run = 1;
+ last;
+ }
+ if (/^Error:/) {
+ print STDOUT ("$host clogin error: $_");
+ print STDERR ("$host clogin error: $_") if ($debug);
+ $clean_run = 0;
+ last;
+ }
+ while (/#\s*($cmds_regexp)\s*$/) {
+ $cmd = $1;
+ if (!defined($prompt)) {
+ $prompt = ($_ =~ /^([^#]+#)/)[0];
+ $prompt =~ s/([][}{)(\\])/\\$1/g;
+ print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
+ }
+ print STDERR ("HIT COMMAND:$_") if ($debug);
+ if (! defined($commands{$cmd})) {
+ print STDERR "$host: found unexpected command - \"$cmd\"\n";
+ $clean_run = 0;
+ last TOP;
+ }
+ $rval = &{$commands{$cmd}};
+ delete($commands{$cmd});
+ if ($rval == -1) {
+ $clean_run = 0;
+ print STDERR ("$host: $cmd failed: $rval\n") if ($debug);
+ last TOP;
+ }
+ if (/[>#]\s?exit$/) {
+ print STDERR ("$host: found exit\n") if ($debug);
+ $clean_run = 1;
+ last TOP;
+ }
+ }
+}
+print STDOUT "Done $logincmd: $_\n" if ($log);
+# Flush History
+ProcessHistory("","","","");
+# Cleanup
+close(INPUT);
+close(OUTPUT);
+
+if (defined($ENV{NOPIPE})) {
+ unlink("$host.raw") if (! $debug);
+}
+
+# check for completeness
+if (scalar(%commands) || !$clean_run || !$found_end) {
+ if (scalar(%commands)) {
+ printf(STDOUT "$host: missed cmd(s): %s\n", join(',', keys(%commands)));
+ printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%commands))) if ($debug);
+ }
+ if (!$clean_run || !$found_end) {
+ print STDOUT "$host: End of run not found\n";
+ print STDERR "$host: End of run not found\n" if ($debug);
+ print STDERR "$host: clean: $clean_run, end: $found_end\n" if ($debug);
+ system("/usr/bin/tail -1 $host.new");
+ }
+ unlink "$host.new" if (! $debug);
+}
diff --git a/bin/par.in b/bin/par.in
index e7559f0..e37c4a4 100644
--- a/bin/par.in
+++ b/bin/par.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/prancid.in b/bin/prancid.in
index 5228da7..c431b93 100755
--- a/bin/prancid.in
+++ b/bin/prancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/rancid-cvs.in b/bin/rancid-cvs.in
index 86ca065..17960e0 100644
--- a/bin/rancid-cvs.in
+++ b/bin/rancid-cvs.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -128,9 +128,9 @@ do
cd $BASEDIR
cvs checkout $GROUP
else
- svn import -m "$GROUP" . file://$CVSROOT/$GROUP
+ svn import -m "$GROUP" . file:///$CVSROOT/$GROUP
cd $BASEDIR
- svn checkout file://$CVSROOT/$GROUP $GROUP
+ svn checkout file:///$CVSROOT/$GROUP $GROUP
fi
fi
cd $DIR
diff --git a/bin/rancid-fe.in b/bin/rancid-fe.in
index d5c68c2..a76bc4d 100644
--- a/bin/rancid-fe.in
+++ b/bin/rancid-fe.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -51,17 +51,20 @@ require 5;
$vendor =~ tr/[A-Z]/[a-z]/;
%vendortable = (
+ 'agm' => 'agmrancid',
'alteon' => 'arancid',
'avocent' => 'avorancid',
'baynet' => 'brancid',
'bigip' => 'f5rancid',
'cat5' => 'cat5rancid',
'cisco' => 'rancid',
+ 'cisco-nx' => 'nxrancid',
'css' => 'cssrancid',
'enterasys' => 'rivrancid',
'erx' => 'jerancid',
'extreme' => 'xrancid',
'ezt3' => 'erancid',
+ 'f5' => 'f5rancid',
'force10' => 'f10rancid',
'fortigate' => 'fnrancid',
'foundry' => 'francid',
@@ -69,11 +72,12 @@ $vendor =~ tr/[A-Z]/[a-z]/;
'hp' => 'hrancid',
'juniper' => 'jrancid',
'mrtd' => 'mrancid',
+ 'mrv' => 'mrvrancid',
+ 'netopia' => 'trancid',
'netscaler' => 'nsrancid',
'netscreen' => 'nrancid',
'procket' => 'prancid',
'redback' => 'rrancid',
- 'riverhead' => 'agmrancid',
'riverstone' => 'rivrancid',
'smc' => 'srancid',
'tnt' => 'tntrancid',
diff --git a/bin/rancid-run.in b/bin/rancid-run.in
index ae24912..40ca26d 100644
--- a/bin/rancid-run.in
+++ b/bin/rancid-run.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/rancid.in b/bin/rancid.in
index 45baa5c..6926691 100644
--- a/bin/rancid.in
+++ b/bin/rancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -39,7 +39,7 @@
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
-#
+#
# RANCID - Really Awesome New Cisco confIg Differ
#
# usage: rancid [-dV] [-l] [-f filename | hostname]
@@ -64,6 +64,7 @@ $timeo = 90; # clogin timeout in seconds
my(@commandtable, %commands, @commands);# command lists
my($aclsort) = ("ipsort"); # ACL sorting mode
+my($config_register); # configuration register value
my($filter_commstr); # SNMP community string filtering
my($filter_pwds); # password filtering mode
@@ -174,7 +175,7 @@ sub ShowVersion {
while (<INPUT>) {
tr/\015//d;
- if (/^$prompt/) { $found_version=1; last};
+ if (/^$prompt/) { $found_version = 1; last};
next if (/^(\s*|\s*$cmd\s*)$/);
return(1) if /Line has invalid autocommand /;
return(1) if /(Invalid input detected|Type help or )/;
@@ -192,7 +193,12 @@ sub ShowVersion {
next;
}
if (/cisco ios xr /i) { $ios = "XR"; }
- if (/^Application and Content Networking Software/) { $type="CE"; }
+ if (/cisco ios .* IOS-XE/i) { $ios = "XE"; }
+ if (/^Application and Content Networking Software/) { $type = "CE"; }
+ # treat the ACE like the Content Engines for matching endofconfig
+ if (/^Cisco Application Control Software/) { $type = "CE"; }
+ if (/^Cisco Storage Area Networking Operating System/) { $type = "SAN";}
+ if (/^Cisco Nexus Operating System/) { $type = "NXOS";}
/^Application and Content Networking Software Release /i &&
ProcessHistory("COMMENTS","keysort","F1", "!Image: $_") && next;
/^Cisco Secure PIX /i &&
@@ -375,7 +381,7 @@ sub ShowVersion {
}
if (/(\S+) Silicon\s*Switch Processor/) {
if (!defined($C0)) {
- $C0=1; ProcessHistory("COMMENTS","keysort","C0","!\n");
+ $C0 = 1; ProcessHistory("COMMENTS","keysort","C0","!\n");
}
ProcessHistory("COMMENTS","keysort","C2","!SSP: $1\n");
$ssp = 1;
@@ -402,19 +408,24 @@ sub ShowVersion {
"!Memory: pcmcia $2 $3$4 $1\n");
next;
}
+ if (/^(\d+[kK]) bytes of (slot|disk)(\d)/i) {
+ ProcessHistory("COMMENTS","keysort","B7",
+ "!Memory: pcmcia $2$3 $1\n");
+ next;
+ }
if (/^WARNING/) {
if (!defined($I0)) {
- $I0=1;
+ $I0 = 1;
ProcessHistory("COMMENTS","keysort","I0","!\n");
}
ProcessHistory("COMMENTS","keysort","I1","! $_");
}
if (/^Configuration register is (.*)$/) {
- $config_register=$1;
+ $config_register = $1;
next;
}
if (/^Configuration register on node \S+ is (.*)$/) {
- $config_register=$1 if $config_register eq "";
+ $config_register = $1 if (length($config_register) < 1);
next;
}
}
@@ -517,7 +528,7 @@ sub ShowEnv {
while (<INPUT>) {
tr/\015//d;
- if (/^$prompt/) { $found_env=1; last};
+ if (/^$prompt/) { $found_env = 1; last};
next if (/^(\s*|\s*$cmd\s*)$/);
#return(1) if ($type !~ /^7/);
return(1) if /Line has invalid autocommand /;
@@ -531,12 +542,12 @@ sub ShowEnv {
}
if (!defined($E0)) {
- $E0=1;
+ $E0 = 1;
ProcessHistory("COMMENTS","keysort","E0","!\n");
}
if (/^Arbiter type (\d), backplane type (\S+)/) {
if (!defined($C0)) {
- $C0=1; ProcessHistory("COMMENTS","keysort","C0","!\n");
+ $C0 = 1; ProcessHistory("COMMENTS","keysort","C0","!\n");
}
ProcessHistory("COMMENTS","keysort","C1",
"!Enviromental Arbiter Type: $1\n");
@@ -656,7 +667,7 @@ sub ShowBoot {
next if /CONFGEN variable/;
if (!defined($H0)) {
- $H0=1; ProcessHistory("COMMENTS","keysort","H0","!\n");
+ $H0 = 1; ProcessHistory("COMMENTS","keysort","H0","!\n");
}
if ($type !~ /^(12[04]|7)/) {
if ($type !~ /^(29|35)00/) {
@@ -718,14 +729,25 @@ sub DirSlotN {
return(1) if /(No such device|Error Sending Request)/i;
return(1) if /\%Error: No such file or directory/;
return(1) if /No space information available/;
+ # Corrupt flash
+ /\%Error calling getdents / &&
+ ProcessHistory("FLASH","","","!Flash: $dev: $_") && next;
return(-1) if /\%Error calling/;
return(-1) if /(: device being squeezed|ATA_Status time out)/i; # busy
return(-1) if (/command authorization failed/i);
return(1) if /(Open device \S+ failed|Error opening \S+:)/;
- if (/.*\((\d+) bytes free\)/ && $ios eq "XR") {
+ # filter frequently changing files from IOX bootflash
+ if ($dev =~ /bootflash/) {
+ next if (/temp_cont\s*$/);
+ next if (/uptime_cont\s*$/);
+ }
+ if (($ios eq "XR" || $ios eq "XE") && /.*\((\d+) bytes free\)/) {
my($tmp) = int($1 / (1024 * 1024));
s/$1 bytes free/$tmp MB free/;
}
+ if ($ios eq "XE" && /^((\s+)?\d+\s+\S+)\s+\d+.*(tracelogs$)/) {
+ $_ = "$1" . sprintf("%43s", "") . "$3\n";
+ }
# the pager can not be disabled per-session on the PIX
if (/^(<-+ More -+>)/) {
my($len) = length($1);
@@ -873,6 +895,7 @@ sub ShowDebug {
}
/^No matching debug flags set$/ && next;
+ /^No debug flags set$/ && next;
ProcessHistory("COMMENTS","keysort","J1","!DEBUG: $_");
$lines++;
}
@@ -984,7 +1007,7 @@ sub ShowDiag {
while (<INPUT>) {
REDUX: tr/\015//d;
- if (/^$prompt/) { $found_diag=1; last};
+ if (/^$prompt/) { $found_diag = 1; last};
next if (/^(\s*|\s*$cmd\s*)$/);
# return(1) if ($type !~ /^(12[40]|720|36|26)/);
return(1) if /Line has invalid autocommand /;
@@ -1061,7 +1084,7 @@ REDUX: tr/\015//d;
next;
}
if (/^c3700\s+(io-board|mid-plane)/i) {
- $slot=$1;
+ $slot = $1;
ProcessHistory("SLOT","","","!\n");
ProcessHistory("SLOT","keysort","A","!Slot $slot: part $1\n");
next;
@@ -1081,6 +1104,10 @@ REDUX: tr/\015//d;
ProcessHistory("SLOT","keysort","AF","!Slot $slot/FRU: Packet Memory: $1\n");
next;
}
+ if (/\s+Route Memory:\s+(\S+)/) {
+ ProcessHistory("SLOT","keysort","AF","!Slot $slot/FRU: Route Memory: $1\n");
+ next;
+ }
if (/^\s+PCA:\s+(.*)/) {
local($part) = $1;
$_ = <INPUT>;
@@ -1495,6 +1522,7 @@ sub WriteTerm {
last if (/^$prompt/);
return(1) if /Line has invalid autocommand /;
return(1) if (/(Invalid input detected|Type help or )/i);
+ return(1) if /\%Error: No such file or directory/;
return(0) if ($found_end); # Only do this routine once
return(-1) if (/command authorization failed/i);
# the pager can not be disabled per-session on the PIX
@@ -1502,12 +1530,15 @@ sub WriteTerm {
my($len) = length($1);
s/^$1\s{$len}//;
}
+ if (!$linecnt && defined($config_register)) {
+ ProcessHistory("","","", "!\nconfig-register $config_register\n");
+ }
/Non-Volatile memory is in use/ && return(-1); # NvRAM is locked
$linecnt++;
$lineauto = 0 if (/^[^ ]/);
# skip the crap
- if (/^(##+$|(Building|Current) configuration)/i) {
+ if (/^(##+|(building|current) configuration)/i) {
while (<INPUT>) {
next if (/^Current configuration\s*:/i);
next if (/^:/);
@@ -1515,9 +1546,6 @@ sub WriteTerm {
next if (/^ip add.*ipv4:/); # band-aid for 3620 12.0S
last;
}
- if (defined($config_register)) {
- ProcessHistory("","","","!\nconfig-register $config_register\n");
- }
tr/\015//d;
}
# some versions have other crap mixed in with the bits in the
@@ -1552,7 +1580,8 @@ sub WriteTerm {
}
if (/^username (\S+)(\s.*)? secret /) {
if ($filter_pwds >= 2) {
- ProcessHistory("USER","keysort","$1","!username $1$2 secret <removed>\n");
+ ProcessHistory("USER","keysort","$1",
+ "!username $1$2 secret <removed>\n");
} else {
ProcessHistory("USER","keysort","$1","$_");
}
@@ -1560,9 +1589,11 @@ sub WriteTerm {
}
if (/^username (\S+)(\s.*)? password ((\d) \S+|\S+)/) {
if ($filter_pwds >= 2) {
- ProcessHistory("USER","keysort","$1","!username $1$2 password <removed>\n");
+ ProcessHistory("USER","keysort","$1",
+ "!username $1$2 password <removed>\n");
} elsif ($filter_pwds >= 1 && $4 ne "5"){
- ProcessHistory("USER","keysort","$1","!username $1$2 password <removed>\n");
+ ProcessHistory("USER","keysort","$1",
+ "!username $1$2 password <removed>\n");
} else {
ProcessHistory("USER","keysort","$1","$_");
}
@@ -1581,7 +1612,8 @@ sub WriteTerm {
ProcessHistory("","","","!$1<removed>\n");
next;
}
- if (/^( set session-key (in|out)bound esp \d+ (authenticator|cypher) )/ && $filter_pwds >= 1) {
+ if (/^( set session-key (in|out)bound esp \d+ (authenticator|cypher) )/
+ && $filter_pwds >= 1) {
ProcessHistory("","","","!$1<removed>\n");
next;
}
@@ -1619,7 +1651,8 @@ sub WriteTerm {
ProcessHistory("","","","!$1 <removed>\n"); next;
}
# this is also reversable, despite 'md5 encrypted' in the cmd
- if (/^( message-digest-key \d+ md5 (7|encrypted)) / && $filter_pwds >= 1) {
+ if (/^( message-digest-key \d+ md5 (7|encrypted)) /
+ && $filter_pwds >= 1) {
ProcessHistory("","","","!$1 <removed>\n"); next;
}
if (/^((crypto )?isakmp key) \S+ / && $filter_pwds >= 1) {
@@ -1645,6 +1678,11 @@ sub WriteTerm {
}
next;
}
+ # ASA/PIX keys in more system:running-config
+ if (/^( pre-shared-key |failover key ).*/ && $filter_pwds >= 1) {
+ ProcessHistory("","","","!$1 <removed> $'"); next;
+ }
+ #
if (/^( cable shared-secret )/ && $filter_pwds >= 1) {
ProcessHistory("","","","!$1 <removed>\n");
next;
@@ -1726,7 +1764,8 @@ sub WriteTerm {
} elsif ($token =~ /^(informs?|traps?|(no)?auth)$/) {
$line .= " " . $token;
} else {
- $line = "!$line " . join(' ', ("<removed>", join(' ',@tokens)));
+ $line = "!$line " . join(' ', ("<removed>",
+ join(' ',@tokens)));
last;
}
}
@@ -1738,7 +1777,8 @@ sub WriteTerm {
}
if (/^(snmp-server community) (\S+)/) {
if ($filter_commstr) {
- ProcessHistory("SNMPSERVERCOMM","keysort","$_","!$1 <removed>$'") && next;
+ ProcessHistory("SNMPSERVERCOMM","keysort","$_",
+ "!$1 <removed>$'") && next;
} else {
ProcessHistory("SNMPSERVERCOMM","keysort","$_","$_") && next;
}
@@ -1784,6 +1824,8 @@ sub WriteTerm {
next;
}
+ /^Cryptochecksum:/ && next;
+
# catch anything that wasnt matched above.
ProcessHistory("","","","$_");
# end of config. the ": " game is for the PIX
@@ -1793,9 +1835,9 @@ sub WriteTerm {
}
}
# The ContentEngine lacks a definitive "end of config" marker. If we
- # know that it is a CE and we have seen at least 5 lines of write term
- # o/p, we can be reasonably sure that we got the config.
- if ($type =~ /^CE$/ && $linecnt > 5) {
+ # know that it is a CE, SAN, or NXOS and we have seen at least 5 lines
+ # of write term output, we can be reasonably sure that we got the config.
+ if (($type == "CE" || $type == "SAN" || $type == "NXOS" ) && $linecnt > 5) {
$found_end = 1;
return(0);
}
@@ -1866,6 +1908,7 @@ sub DoNothing {print STDOUT;}
{'show vlan' => 'ShowVLAN'},
{'show vlan-switch' => 'ShowVLAN'},
{'show debug' => 'ShowDebug'},
+ {'more system:running-config' => 'WriteTerm'}, # ASA/PIX
{'show running-config' => 'WriteTerm'},
{'write term' => 'WriteTerm'},
);
@@ -1874,8 +1917,8 @@ sub DoNothing {print STDOUT;}
@commands = map(keys(%$_), @commandtable);
%commands = map(%$_, @commandtable);
-$cisco_cmds=join(";",@commands);
-$cmds_regexp=join("|",@commands);
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
if (length($host) == 0) {
if ($file) {
@@ -1934,13 +1977,13 @@ ProcessHistory("COMMENTS","keysort","G0","!\n");
TOP: while(<INPUT>) {
tr/\015//d;
if (/[>#]\s?exit$/) {
- $clean_run=1;
+ $clean_run = 1;
last;
}
if (/^Error:/) {
print STDOUT ("$host clogin error: $_");
print STDERR ("$host clogin error: $_") if ($debug);
- $clean_run=0;
+ $clean_run = 0;
last;
}
while (/#\s*($cmds_regexp)\s*$/) {
diff --git a/bin/rivlogin.in b/bin/rivlogin.in
index 7a65986..b9ca2bc 100644
--- a/bin/rivlogin.in
+++ b/bin/rivlogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -255,7 +255,7 @@ proc login { router user userpswd passwd enapasswd } {
"Password:" {
incr pass_attempt
- send "$passwd\r"
+ send -- "$passwd\r"
exp_continue
}
@@ -263,16 +263,16 @@ proc login { router user userpswd passwd enapasswd } {
set pattempt 0
- send "$user\r"
+ send -- "$user\r"
expect {
"Password: " {
incr pattempt
if {$pattempt == 1} {
- send "$userpswd\r";
+ send -- "$userpswd\r";
} else {
- send "$enapasswd\r";
+ send -- "$enapasswd\r";
}
exp_continue
}
@@ -418,14 +418,14 @@ proc do_enable { enauser enapasswd userpswd } {
expect {
Username: {
set uses_username 1;
- send "$enauser\r";
+ send -- "$enauser\r";
exp_continue
}
Password: {
if {$uses_username == 1} {
- send "$userpswd\r";
+ send -- "$userpswd\r";
} else {
- send "$enapasswd\r";
+ send -- "$enapasswd\r";
}
exp_continue
}
@@ -435,7 +435,7 @@ proc do_enable { enauser enapasswd userpswd } {
return 1
}
- "CONS-W-AUTH_PASSWD" { send "$enapasswd\r"; }
+ "CONS-W-AUTH_PASSWD" { send -- "$enapasswd\r"; }
"$enable_prompt " { }
"%SYS-W-NOPASSWD*" { }
diff --git a/bin/rivrancid.in b/bin/rivrancid.in
index 0e86994..b647264 100644
--- a/bin/rivrancid.in
+++ b/bin/rivrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/rrancid.in b/bin/rrancid.in
index 78eb000..d55afc7 100644
--- a/bin/rrancid.in
+++ b/bin/rrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/srancid.in b/bin/srancid.in
index b59917c..f8549c5 100755
--- a/bin/srancid.in
+++ b/bin/srancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/tlogin.in b/bin/tlogin.in
new file mode 100644
index 0000000..e097da1
--- /dev/null
+++ b/bin/tlogin.in
@@ -0,0 +1,815 @@
+#! @EXPECT_PATH@ --
+##
+## $Id$
+##
+## Copyright (C) 1997-2008 by Terrapin Communications, Inc.
+## All rights reserved.
+##
+## This software may be freely copied, modified and redistributed
+## without fee for non-commerical purposes provided that this license
+## remains intact and unmodified with any RANCID distribution.
+##
+## There is no warranty or other guarantee of fitness of this software.
+## It is provided solely "as is". The author(s) disclaim(s) all
+## responsibility and liability with respect to this software's usage
+## or its effect upon hardware, computer systems, other software, or
+## anything else.
+##
+## Except where noted otherwise, rancid was written by and is maintained by
+## Henry Kilmer, John Heasley, Andrew Partan, Pete Whiting, and Austin Schutz.
+##
+#
+# The login expect scripts were based on Erik Sherk's gwtn, by permission.
+#
+# tlogin - Netopis login
+#
+# Modified by Ed Ravin for Netopia.
+
+# Usage line
+set usage "Usage: $argv0 \[-autoenable\] \[-noenable\] \[-c command\] \
+\[-debug] \
+\[-Evar=x\] \[-e enable-password\] \[-f cloginrc-file\] \[-p user-password\] \
+\[-s script-file\] \[-t timeout\] \[-u username\] \
+\[-v vty-password\] \[-w enable-username\] \[-x command-file\] \
+\[-y ssh_cypher_type\] router \[router...\]\n"
+
+# env(CLOGIN) may contain:
+# x == do not set xterm banner or name
+
+# Password file
+set password_file $env(HOME)/.cloginrc
+# Default is to login to the router
+set do_command 0
+set do_script 0
+# The default is to automatically enable
+set avenable 1
+# The default is that you login non-enabled (tacacs can have you login already
+# enabled)
+set avautoenable 0
+# The default is to look in the password file to find the passwords. This
+# tracks if we receive them on the command line.
+set do_passwd 1
+set do_enapasswd 1
+# attempt at platform switching.
+set platform ""
+
+# Find the user in the ENV, or use the unix userid.
+if {[ info exists env(CISCO_USER) ] } {
+ set default_user $env(CISCO_USER)
+} elseif {[ info exists env(USER) ]} {
+ set default_user $env(USER)
+} elseif {[ info exists env(LOGNAME) ]} {
+ set default_user $env(LOGNAME)
+} else {
+ # This uses "id" which I think is portable. At least it has existed
+ # (without options) on all machines/OSes I've been on recently -
+ # unlike whoami or id -nu.
+ if [ catch {exec id} reason ] {
+ send_error "\nError: could not exec id: $reason\n"
+ exit 1
+ }
+ regexp {\(([^)]*)} "$reason" junk default_user
+}
+
+# Sometimes routers take awhile to answer (the default is 10 sec)
+set timeout 45
+
+# Process the command line
+for {set i 0} {$i < $argc} {incr i} {
+ set arg [lindex $argv $i]
+
+ switch -glob -- $arg {
+ # Username
+ -u* -
+ -U* {
+ if {! [ regexp .\[uU\](.+) $arg ignore user]} {
+ incr i
+ set username [ lindex $argv $i ]
+ }
+ # VTY Password
+ } -p* -
+ -P* {
+ if {! [ regexp .\[pP\](.+) $arg ignore userpasswd]} {
+ incr i
+ set userpasswd [ lindex $argv $i ]
+ }
+ set do_passwd 0
+ # VTY Password
+ } -v* -
+ -v* {
+ if {! [ regexp .\[vV\](.+) $arg ignore passwd]} {
+ incr i
+ set passwd [ lindex $argv $i ]
+ }
+ set do_passwd 0
+ # Enable Username
+ } -w* -
+ -W* {
+ if {! [ regexp .\[wW\](.+) $arg ignore enauser]} {
+ incr i
+ set enausername [ lindex $argv $i ]
+ }
+ # Environment variable to pass to -s scripts
+ } -E*
+ {
+ if {[ regexp .\[E\](.+)=(.+) $arg ignore varname varvalue]} {
+ set E$varname $varvalue
+ } else {
+ send_user "\nError: invalid format for -E in $arg\n"
+ exit 1
+ }
+ # Enable Password
+ } -e*
+ {
+ if {! [ regexp .\[e\](.+) $arg ignore enapasswd]} {
+ incr i
+ set enapasswd [ lindex $argv $i ]
+ }
+ set do_enapasswd 0
+ # Command to run.
+ } -c* -
+ -C* {
+ if {! [ regexp .\[cC\](.+) $arg ignore command]} {
+ incr i
+ set command [ lindex $argv $i ]
+ }
+ set do_command 1
+ # Expect script to run.
+ } -s* -
+ -S* {
+ if {! [ regexp .\[sS\](.+) $arg ignore sfile]} {
+ incr i
+ set sfile [ lindex $argv $i ]
+ }
+ if { ! [ file readable $sfile ] } {
+ send_user "\nError: Can't read $sfile\n"
+ exit 1
+ }
+ set do_script 1
+ # 'ssh -c' cypher type
+ } -y* -
+ -Y* {
+ if {! [ regexp .\[eE\](.+) $arg ignore cypher]} {
+ incr i
+ set cypher [ lindex $argv $i ]
+ }
+ # alternate cloginrc file
+ } -f* -
+ -F* {
+ if {! [ regexp .\[fF\](.+) $arg ignore password_file]} {
+ incr i
+ set password_file [ lindex $argv $i ]
+ }
+ # Timeout
+ } -t* -
+ -T* {
+ if {! [ regexp .\[tT\](.+) $arg ignore timeout]} {
+ incr i
+ set timeout [ lindex $argv $i ]
+ }
+ # Command file
+ } -x* -
+ -X {
+ if {! [ regexp .\[xX\](.+) $arg ignore cmd_file]} {
+ incr i
+ set cmd_file [ lindex $argv $i ]
+ }
+ if [ catch {set cmd_fd [open $cmd_file r]} reason ] {
+ send_user "\nError: $reason\n"
+ exit 1
+ }
+ set cmd_text [read $cmd_fd]
+ close $cmd_fd
+ set command [join [split $cmd_text \n] \;]
+ set do_command 1
+ # Do we enable?
+ } -noenable {
+ set avenable 0
+ # Does tacacs automatically enable us?
+ } -autoenable {
+ set avautoenable 1
+ set avenable 0
+ } -debug {
+ exp_internal 1
+ } -* {
+ send_user "\nError: Unknown argument! $arg\n"
+ send_user $usage
+ exit 1
+ } default {
+ break
+ }
+ }
+}
+# Process routers...no routers listed is an error.
+if { $i == $argc } {
+ send_user "\nError: $usage"
+}
+
+# Only be quiet if we are running a script (it can log its output
+# on its own)
+if { $do_script } {
+ log_user 0
+} else {
+ log_user 1
+}
+
+#
+# Done configuration/variable setting. Now run with it...
+#
+
+# Sets Xterm title if interactive...if its an xterm and the user cares
+proc label { host } {
+ global env
+ # if CLOGIN has an 'x' in it, don't set the xterm name/banner
+ if [info exists env(CLOGIN)] {
+ if {[string first "x" $env(CLOGIN)] != -1} { return }
+ }
+ # take host from ENV(TERM)
+ if [info exists env(TERM)] {
+ if [regexp \^(xterm|vs) $env(TERM) ignore ] {
+ send_user "\033]1;[lindex [split $host "."] 0]\a"
+ send_user "\033]2;$host\a"
+ }
+ }
+}
+
+# This is a helper function to make the password file easier to
+# maintain. Using this the password file has the form:
+# add password sl* pete cow
+# add password at* steve
+# add password * hanky-pie
+proc add {var args} { global int_$var ; lappend int_$var $args}
+proc include {args} {
+ global env
+ regsub -all "(^{|}$)" $args {} args
+ if { [ regexp "^/" $args ignore ] == 0 } {
+ set args $env(HOME)/$args
+ }
+ source_password_file $args
+}
+
+proc find {var router} {
+ upvar int_$var list
+ if { [info exists list] } {
+ foreach line $list {
+ if { [string match [lindex $line 0] $router ] } {
+ return [lrange $line 1 end]
+ }
+ }
+ }
+ return {}
+}
+
+# Loads the password file. Note that as this file is tcl, and that
+# it is sourced, the user better know what to put in there, as it
+# could install more than just password info... I will assume however,
+# that a "bad guy" could just as easy put such code in the clogin
+# script, so I will leave .cloginrc as just an extention of that script
+proc source_password_file { password_file } {
+ global env
+ if { ! [file exists $password_file] } {
+ send_user "\nError: password file ($password_file) does not exist\n"
+ exit 1
+ }
+ file stat $password_file fileinfo
+ if { [expr ($fileinfo(mode) & 007)] != 0000 } {
+ send_user "\nError: $password_file must not be world readable/writable\n"
+ exit 1
+ }
+ if [ catch {source $password_file} reason ] {
+ send_user "\nError: $reason\n"
+ exit 1
+ }
+}
+
+# Log into the router.
+proc login { router user userpswd passwd enapasswd cmethod cyphertype } {
+ global spawn_id in_proc do_command do_script platform
+ global prompt u_prompt p_prompt e_prompt sshcmd usercmd usercmd_chat
+ global otpinuse
+ set in_proc 1
+ set uprompt_seen 0
+
+ # try each of the connection methods in $cmethod until one is successful
+ set progs [llength $cmethod]
+ foreach prog [lrange $cmethod 0 end] {
+ if [string match "telnet*" $prog] {
+ regexp {telnet(:([^[:space:]]+))*} $prog command suffix port
+ if {"$port" == ""} {
+ set retval [ catch {spawn telnet $router} reason ]
+ } else {
+ set retval [ catch {spawn telnet $router $port} reason ]
+ }
+ if { $retval } {
+ send_user "\nError: telnet failed: $reason\n"
+ exit 1
+ }
+ } elseif [string match "ssh*" $prog] {
+ regexp {ssh(:([^[:space:]]+))*} $prog command suffix port
+ if {"$port" == ""} {
+ set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user $router} reason ]
+
+ } else {
+ set retval [ catch {spawn $sshcmd -c $cyphertype -x -l $user -p $port $router} reason ]
+ }
+ if { $retval } {
+ send_user "\nError: $sshcmd failed: $reason\n"
+ exit 1
+ }
+ } elseif [string match "usercmd" $prog] { # user supplies connect cmd
+ set retval [ catch {eval spawn $usercmd} reason ]
+ if { $retval } {
+ send_user "\nError: '$usercmd' failed: $reason\n"
+ exit 1
+ }
+ if { [llength $usercmd_chat] > 0 } {
+ #send_user "\nExecuting usercmd_chat: $usercmd_chat\n"
+ sleep 0.3
+ foreach {i j} $usercmd_chat {
+ expect {
+ -re $i { eval send -- "\"$j\""}
+ timeout { send "\r"; send_user "\nTimeout in usercmd_chat waiting for -re $i: punting with CR\n"; break }
+ }
+ }
+ }
+ } elseif ![string compare $prog "rsh"] {
+ if [ catch {spawn rsh -l $user $router} reason ] {
+ send_user "\nError: rsh failed: $reason\n"
+ exit 1
+ }
+ } else {
+ puts "\nError: unknown connection method: $prog"
+ return 1
+ }
+ incr progs -1
+ sleep 0.3
+
+ # This helps cleanup each expect clause.
+ expect_after {
+ timeout {
+ send_user "\nError: TIMEOUT reached\n"
+ catch {close}; wait
+ if { $in_proc} {
+ return 1
+ } else {
+ continue
+ }
+ } eof {
+ send_user "\nError: EOF received\n"
+ catch {close}; wait
+ if { $in_proc} {
+ return 1
+ } else {
+ continue
+ }
+ }
+ }
+
+ # Here we get a little tricky. There are several possibilities:
+ # the router can ask for a username and passwd and then
+ # talk to the TACACS server to authenticate you, or if the
+ # TACACS server is not working, then it will use the enable
+ # passwd. Or, the router might not have TACACS turned on,
+ # then it will just send the passwd.
+ # if telnet fails with connection refused, try ssh
+ expect {
+ -re "(Connection refused|Secure connection \[^\n\r]+ refused)" {
+ catch {close}; wait
+ if !$progs {
+ send_user "\nError: Connection Refused ($prog): $router\n"
+ return 1
+ }
+ }
+ -re "(Connection closed by|Connection to \[^\n\r]+ closed)" {
+ catch {close}; wait
+ if !$progs {
+ send_user "\nError: Connection closed ($prog): $router\n"
+ return 1
+ }
+ }
+ eof { send_user "\nError: Couldn't login: $router\n"; wait; return 1 }
+ -nocase "unknown host\r" {
+ catch {close};
+ send_user "\nError: Unknown host $router\n"; wait; return 1
+ }
+ "Host is unreachable" {
+ catch {close};
+ send_user "\nError: Host Unreachable: $router\n"; wait; return 1
+ }
+ "No address associated with name" {
+ catch {close};
+ send_user "\nError: Unknown host $router\n"; wait; return 1
+ }
+ -re "(Host key not found |The authenticity of host .* be established).*\(yes\/no\)\?" {
+ send "yes\r"
+ send_user "\nHost $router added to the list of known hosts.\n"
+ exp_continue }
+ -re "HOST IDENTIFICATION HAS CHANGED.* \(yes\/no\)\?" {
+ send "no\r"
+ send_user "\nError: The host key for $router has changed. Update the SSH known_hosts file accordingly.\n"
+ return 1 }
+ -re "Offending key for .* \(yes\/no\)\?" {
+ send "no\r"
+ send_user "\nError: host key mismatch for $router. Update the SSH known_hosts file accordingly.\n"
+ return 1 }
+ -re "(denied|Sorry)" {
+ send_user "\nError: Check your passwd for $router\n"
+ catch {close}; wait; return 1
+ }
+ "Login failed" {
+ send_user "\nError: Check your passwd for $router\n"
+ return 1
+ }
+ -re "% (Bad passwords|Authentication failed)" {
+ send_user "\nError: Check your passwd for $router\n"
+ return 1
+ }
+ "Press any key to continue." {
+ # send_user "Pressing the ANY key\n"
+ send "\r"
+ exp_continue
+ }
+ -re "Enter Selection: " {
+ # Catalyst 1900s have some lame menu. Enter
+ # K to reach a command-line.
+ send "K\r"
+ exp_continue;
+ }
+ -re "Netopia.*always start from this main screen" {
+ # send control-N to escape from the Playskool menu
+ send -- "\x0e"
+ set platform "netopia"
+ set prompt "#"
+ set autoenable 1
+ return 0
+ }
+ -re "@\[^\r\n]+ $p_prompt" {
+ # ssh pwd prompt
+ sleep 1
+ send -- "$userpswd\r"
+ exp_continue
+ }
+ -re "$u_prompt" {
+ send -- "$user\r"
+ set uprompt_seen 1
+ exp_continue
+ }
+ -re "(s/key|otp-\[0-9a-zA-Z]+) +\[0-9]+ +\[-0-9a-zA-Z]+\[ \r\n]" {
+ if { !$otpinuse} {
+ exp_continue
+ }
+ set challenge $expect_out(0,string)
+ regsub {[ \r\n]$} $challenge {} challenge
+ if [ catch {exec otphelper $router "$challenge"} userpswd ] {
+ send_error "\nError: login: 'otphelper $router $challenge' failed.\nRun otphelper standalone to diagnose further.\n"
+ exit 1
+ }
+ exp_continue
+ }
+ -re "$p_prompt" {
+ sleep 1
+ if {$uprompt_seen == 1} {
+ send -- "$userpswd\r"
+ } else {
+ send -- "$passwd\r"
+ }
+ exp_continue
+ }
+ -re "$prompt" { break; }
+ "Login invalid" {
+ send_user "\nError: Invalid login: $router\n";
+ catch {close}; wait; return 1
+ }
+ }
+ }
+
+ set in_proc 0
+ return 0
+}
+
+# Enable
+proc do_enable { enauser enapasswd } {
+ global prompt in_proc
+ global u_prompt e_prompt
+ global router otpinuse
+ set in_proc 1
+
+ send "enable\r"
+ expect {
+ -re "(s/key|otp-\[0-9a-zA-Z]+) +\[0-9]+ +\[-0-9a-zA-Z]+\[ \r\n]" {
+ if { !$otpinuse} {
+ exp_continue
+ }
+ set challenge $expect_out(0,string)
+ regsub {[ \r\n]$} $challenge {} challenge
+ if [ catch {exec otphelper $router "$challenge"} enapasswd ] {
+ send_error "\nError: enable: 'otphelper $router $challenge' failed.\nRun otphelper standalone to diagnose further.\n"
+ exit 1
+ }
+ exp_continue
+ }
+ -re "$u_prompt" { send -- "$enauser\r"; exp_continue}
+ -re "$e_prompt" { send -- "$enapasswd\r"; exp_continue}
+ "#" { set prompt "#" }
+ "(enable)" { set prompt "> (enable) " }
+ -re "(denied|Sorry|Incorrect)" {
+ # % Access denied - from local auth and poss. others
+ send_user "\nError: Check your Enable passwd\n";
+ return 1
+ }
+ "% Error in authentication" {
+ send_user "\nError: Check your Enable passwd\n"
+ return 1
+ }
+ "% Bad passwords" {
+ send_user "\nError: Check your Enable passwd\n"
+ return 1
+ }
+ }
+ # We set the prompt variable (above) so script files don't need
+ # to know what it is.
+ set in_proc 0
+ return 0
+}
+
+# Run commands given on the command line.
+proc run_commands { prompt command } {
+ global in_proc platform
+ set in_proc 1
+
+ # If the prompt is (enable), then we are on a switch and the
+ # command is "set length 0"; otherwise its "term length 0".
+ # skip if its an extreme (since the pager can not be disabled on a
+ # per-vty basis).
+ if { [ string compare "extreme" "$platform" ] } {
+ if [ regexp -- ".*> .*enable" "$prompt" ] {
+ send "set length 0\r"
+ # This is ugly, but reduces code duplication, allowing the
+ # subsequent expects to handle everything as normal.
+ set command "set logging session disable;$command"
+ } elseif { ![ string compare "netopia" "$platform" ] } {
+ # kludge - should instead skip re-sensing prompt if platform netopia
+ set prompt "#"
+ } else {
+ send "term length 0\r"
+ }
+ # escape any parens in the prompt, such as "(enable)"
+ regsub -all {[)(]} $prompt {\\&} reprompt
+ # match cisco config mode prompts too, such as router(config-if)#,
+ # but catalyst does not change in this fashion.
+ regsub -all {^(.{1,14}).*([#>])$} $reprompt {\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
+ expect {
+ -re $reprompt {}
+ -re "\[\n\r]+" { exp_continue }
+ }
+ } else {
+ regsub -all "\[)(]" $prompt {\\&} reprompt
+ }
+
+ # this is the only way i see to get rid of more prompts in o/p..grrrrr
+ log_user 0
+
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ # the pager can not be turned off on the PIX, so we have to look
+ # for the "More" prompt. the extreme is equally obnoxious, with a
+ # global switch in the config.
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
+ expect {
+ -re "\b+" { exp_continue }
+ -re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
+ }
+ -re "^\[^\n\r]*$reprompt." { send_user -- "$expect_out(buffer)"
+ exp_continue }
+ -re "\[\n\r]+" { send_user -- "$expect_out(buffer)"
+ exp_continue }
+ -re "\[^\r\n]*Press <SPACE> to cont\[^\r\n]*" {
+ send " "
+ # bloody ^[[2K after " "
+ expect {
+ -re "^\[^\r\n]*\r" {}
+ }
+ exp_continue
+ }
+ -re "^ *--More--\[^\n\r]*" {
+ send " "
+ exp_continue }
+ -re "^<-+ More -+>\[^\n\r]*" {
+ send_user -- "$expect_out(buffer)"
+ send " "
+ exp_continue }
+ }
+ }
+ log_user 1
+
+ if { [ string compare "extreme" "$platform" ] } {
+ send "exit\r"
+ } else {
+ send "quit\r"
+ }
+ expect {
+ -re "^\[^\n\r *]*$reprompt" {
+ # the Cisco CE and Jnx ERX
+ # return to non-enabled mode
+ # on exit in enabled mode.
+ send "exit\r"
+ exp_continue;
+ }
+ "Do you wish to save your configuration changes" {
+ send "n\r"
+ exp_continue
+ }
+ -re "\[\n\r]+" { exp_continue }
+ timeout { close; return 0 }
+ eof { return 0 }
+ }
+ set in_proc 0
+}
+
+#
+# For each router... (this is main loop)
+#
+source_password_file $password_file
+set in_proc 0
+foreach router [lrange $argv $i end] {
+ set router [string tolower $router]
+ send_user "$router\n"
+
+ # Figure out prompt.
+ # Since autoenable is off by default, if we have it defined, it
+ # was done on the command line. If it is not specifically set on the
+ # command line, check the password file.
+ if $avautoenable {
+ set autoenable 1
+ set enable 0
+ set prompt "(#| \\(enable\\))"
+ } else {
+ set ae [find autoenable $router]
+ if { "$ae" == "1" } {
+ set autoenable 1
+ set enable 0
+ set prompt "(#| \\(enable\\))"
+ } else {
+ set autoenable 0
+ set enable $avenable
+ set prompt ">"
+ }
+ }
+
+ # look for noenable option in .cloginrc
+ if { [find noenable $router] != "" } {
+ set enable 0
+ }
+
+ # is OTP in use? If so, bypass password checks
+ set otpinuse 0
+ if { [find otp_secret $router] != "" } {
+ set otpinuse 1
+ }
+
+ # Figure out passwords
+ if { $do_passwd || $do_enapasswd } {
+ set pswd [find password $router]
+ if { [llength $pswd] == 0 && !$otpinuse} {
+ send_user "\nError: no password for $router in $password_file.\n"
+ continue
+ }
+ if { $enable && $do_enapasswd && $autoenable == 0 && [llength $pswd] < 2 && !$otpinuse } {
+ send_user "\nError: no enable password for $router in $password_file.\n"
+ continue
+ }
+ set passwd [join [lindex $pswd 0] ""]
+ set enapasswd [join [lindex $pswd 1] ""]
+ }
+
+ # Figure out username
+ if {[info exists username]} {
+ # command line username
+ set ruser $username
+ } else {
+ set ruser [join [find user $router] ""]
+ if { "$ruser" == "" } { set ruser $default_user }
+ }
+
+ # Figure out username's password (if different from the vty password)
+ if {[info exists userpasswd]} {
+ # command line username
+ set userpswd $userpasswd
+ } else {
+ set userpswd [join [find userpassword $router] ""]
+ if { "$userpswd" == "" } { set userpswd $passwd }
+ }
+
+ # Figure out enable username
+ if {[info exists enausername]} {
+ # command line enausername
+ set enauser $enausername
+ } else {
+ set enauser [join [find enauser $router] ""]
+ if { "$enauser" == "" } { set enauser $ruser }
+ }
+
+ # Figure out prompts
+ set u_prompt [find userprompt $router]
+ if { "$u_prompt" == "" } {
+ set u_prompt "(Username|Login|login|user name|name):"
+ } else {
+ set u_prompt [join [lindex $u_prompt 0] ""]
+ }
+ set p_prompt [find passprompt $router]
+ if { "$p_prompt" == "" } {
+ set p_prompt "(\[Pp]assword|passwd):"
+ } else {
+ set p_prompt [join [lindex $p_prompt 0] ""]
+ }
+ set e_prompt [find enableprompt $router]
+ if { "$e_prompt" == "" } {
+ set e_prompt "\[Pp]assword:"
+ } else {
+ set e_prompt [join [lindex $e_prompt 0] ""]
+ }
+
+ # Figure out cypher type
+ if {[info exists cypher]} {
+ # command line cypher type
+ set cyphertype $cypher
+ } else {
+ set cyphertype [find cyphertype $router]
+ if { "$cyphertype" == "" } { set cyphertype "3des" }
+ }
+
+ # Figure out connection method
+ set cmethod [find method $router]
+ if { "$cmethod" == "" } { set cmethod {{telnet} {ssh}} }
+
+ # Figure out the SSH executable name
+ set sshcmd [find sshcmd $router]
+ if { "$sshcmd" == "" } { set sshcmd {ssh} }
+
+ # If user provides a router-specific connection method, use it
+ set usercmd [find usercmd $router]
+ set usercmd_chat [find usercmd_chat $router]
+
+ # Login to the router
+ if {[login $router $ruser $userpswd $passwd $enapasswd $cmethod $cyphertype]} {
+ continue
+ }
+ if { $enable } {
+ if {[do_enable $enauser $enapasswd]} {
+ if { $do_command || $do_script } {
+ close; wait
+ continue
+ }
+ }
+ }
+ # we are logged in, now figure out the full prompt
+ send "\r"
+ expect {
+ -re "\[\r\n]+" { exp_continue; }
+ -re "^(.+:)1 $prompt" { # stoopid extreme cmd-line numbers and
+ # prompt based on state of config changes,
+ # which may have an * at the beginning.
+ set junk $expect_out(1,string)
+ regsub -all "^\\\* " $expect_out(1,string) {} junk
+ set prompt ".? ?$junk\[0-9]+ $expect_out(2,string)";
+ set platform "extreme"
+ }
+ -re "^.+$prompt" { set junk $expect_out(0,string);
+ regsub -all "\[\]\[]" $junk {\\&} prompt;
+ }
+ -re "^.+> \\\(enable\\\)" {
+ set junk $expect_out(0,string);
+ regsub -all "\[\]\[]" $junk {\\&} prompt;
+ }
+ }
+
+ if { $do_command } {
+ if {[run_commands $prompt $command]} {
+ continue
+ }
+ } elseif { $do_script } {
+ # If the prompt is (enable), then we are on a switch and the
+ # command is "set length 0"; otherwise its "term length 0".
+ if [ regexp -- ".*> .*enable" "$prompt" ] {
+ send "set length 0\r"
+ send "set logging session disable\r"
+ } elseif { ![ string compare "netopia" "$platform" ] } {
+ # do nothing
+ } else {
+ send "term length 0\r"
+ }
+ expect -re $prompt {}
+ source $sfile
+ close
+ } else {
+ label $router
+ log_user 1
+ interact
+ }
+
+ # End of for each router
+ wait
+ sleep 0.3
+}
+exit 0
diff --git a/bin/tntlogin.in b/bin/tntlogin.in
index 16a742e..8a265b3 100644
--- a/bin/tntlogin.in
+++ b/bin/tntlogin.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -381,16 +381,16 @@ proc login { router user userpswd passwd prompt cmethod cyphertype } {
return 1 }
-re "$u_prompt" {
- send "$user\r"
+ send -- "$user\r"
set uprompt_seen 1
exp_continue
}
-re "$p_prompt" {
sleep 1
if {$uprompt_seen == 1} {
- send "$userpswd\r"
+ send -- "$userpswd\r"
} else {
- send "$passwd\r"
+ send -- "$passwd\r"
}
exp_continue
}
@@ -420,25 +420,14 @@ proc run_commands { prompt command } {
expect -re $prompt {}
regsub -all "\[)(]" $prompt {\\&} reprompt
- # Is this a multi-command?
- if [ string match "*\;*" "$command" ] {
- set commands [split $command \;]
- set num_commands [llength $commands]
- for {set i 0} {$i < $num_commands} { incr i} {
- send "[subst -nocommands [lindex $commands $i]]\r"
- expect {
- -re "^\[^\n\r]*$reprompt" {}
- -re "^\[^\n\r ]*>>.*$reprompt" { exp_continue }
- -re "\[\n\r]+" { exp_continue }
- }
- }
- } else {
- send "[subst -nocommands $command]\r"
- send "y\r"
+ set commands [split $command \;]
+ set num_commands [llength $commands]
+ for {set i 0} {$i < $num_commands} { incr i} {
+ send -- "[subst -nocommands [lindex $commands $i]]\r"
expect {
- -re "^\[^\n\r]*$reprompt" {}
- -re "^\[^\n\r ]*>>.*$reprompt" { exp_continue }
- -re "\[\n\r]+" { exp_continue }
+ -re "^\[^\n\r]*$reprompt" {}
+ -re "^\[^\n\r ]*>>.*$reprompt" { exp_continue }
+ -re "\[\n\r]+" { exp_continue }
}
}
diff --git a/bin/tntrancid.in b/bin/tntrancid.in
index 748f532..19cba57 100644
--- a/bin/tntrancid.in
+++ b/bin/tntrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/bin/trancid.in b/bin/trancid.in
new file mode 100644
index 0000000..0e4f7fd
--- /dev/null
+++ b/bin/trancid.in
@@ -0,0 +1,300 @@
+#! @PERLV_PATH@
+##
+## $Id$
+##
+## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
+## All rights reserved.
+##
+## This software may be freely copied, modified and redistributed
+## without fee for non-commerical purposes provided that this license
+## remains intact and unmodified with any RANCID distribution.
+##
+## There is no warranty or other guarantee of fitness of this software.
+## It is provided solely "as is". The author(s) disclaim(s) all
+## responsibility and liability with respect to this software's usage
+## or its effect upon hardware, computer systems, other software, or
+## anything else.
+##
+## Except where noted otherwise, rancid was written by and is maintained by
+## Henry Kilmer, John Heasley, Andrew Partan, Pete Whiting, and Austin Schutz.
+##
+#
+# RANCID - Really Awesome New Cisco confIg Differ
+#
+# usage: rancid [-d] [-l] [-f filename | $host]
+#
+# Modified by Ed Ravin for Netopia.
+use Getopt::Std;
+getopts('dfl');
+$log = $opt_l;
+$debug = $opt_d;
+$file = $opt_f;
+$host = $ARGV[0];
+$clean_run = 0;
+$found_end = 0;
+$found_version = 0;
+$found_env = 0;
+$found_diag = 0;
+$timeo = 90; # clogin timeout in seconds
+$clogin_pgm= $ENV{'RANCID_CLOGIN'} || "tlogin";
+
+my(%filter_pwds); # password filtering mode
+
+# This routine is used to print out the router configuration
+sub ProcessHistory {
+ my($new_hist_tag,$new_command,$command_string,@string)=(@_);
+ if((($new_hist_tag ne $hist_tag) || ($new_command ne $command))
+ && defined %history) {
+ print eval "$command \%history";
+ undef %history;
+ }
+ if (($new_hist_tag) && ($new_command) && ($command_string)) {
+ if ($history{$command_string}) {
+ $history{$command_string} = "$history{$command_string}@string";
+ } else {
+ $history{$command_string} = "@string";
+ }
+ } elsif (($new_hist_tag) && ($new_command)) {
+ $history{++$#history} = "@string";
+ } else {
+ print "@string";
+ }
+ $hist_tag = $new_hist_tag;
+ $command = $new_command;
+ 1;
+}
+
+sub numerically { $a <=> $b; }
+
+# This is a sort routing that will sort numerically on the
+# keys of a hash as if it were a normal array.
+sub keynsort {
+ local(%lines)=@_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort numerically keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routing that will sort on the
+# keys of a hash as if it were a normal array.
+sub keysort {
+ local(%lines)=@_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort keys(%lines)) {
+ $sorted_lines[$i] = $lines{$key};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routing that will sort on the
+# values of a hash as if it were a normal array.
+sub valsort{
+ local(%lines)=@_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $key (sort values %lines) {
+ $sorted_lines[$i] = $key;
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a numerical sort routing (ascending).
+sub numsort {
+ local(%lines)=@_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $num (sort {$a <=> $b} keys %lines) {
+ $sorted_lines[$i] = $lines{$num};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# This is a sort routine that will sort on the
+# ip address when the ip address is anywhere in
+# the strings.
+sub ipsort {
+ local(%lines)=@_;
+ local($i) = 0;
+ local(@sorted_lines);
+ foreach $addr (sort sortbyipaddr keys %lines) {
+ $sorted_lines[$i] = $lines{$addr};
+ $i++;
+ }
+ @sorted_lines;
+}
+
+# These two routines will sort based upon IP addresses
+sub ipaddrval {
+ my(@a) = ($_[0] =~ m#^(\d+)\.(\d+)\.(\d+)\.(\d+)$#);
+ $a[3]+256*($a[2]+256*($a[1]+256*$a[0]));
+}
+sub sortbyipaddr {
+ &ipaddrval($a) <=> &ipaddrval($b);
+}
+
+# This routine parses "show version"
+sub ShowVersion {
+ print STDERR " In ShowVersion: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { $found_version=1; last};
+ next if(/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+ return(0) if ($found_version); # Only do this routine once
+
+ # no pagers in Netopia-land, but shouldn't hurt
+ s/^<-+ More -+>\s*//;
+
+### sample output:
+### #show version
+### cli version: 01.00d00
+### firmware version: 05.03.09f06
+### hardware version: 01.00f00
+### mib version: 01.00f00
+### html version: 01.01d07
+
+ ProcessHistory("COMMENTS","keysort","A1","# $_");
+ }
+
+ return(0);
+}
+
+sub ShowConfig {
+ print STDERR " In ShowConfig: $_" if ($debug);
+
+ while (<INPUT>) {
+ tr/\015//d;
+ if (/^$prompt/) { $found_end=1; $clean_run=1; return 0};
+ next if(/^(\s*|\s*$cmd\s*)$/);
+ return(1) if /(Invalid input detected|Type help or )/;
+ return(-1) if (/command authorization failed/i);
+
+ # no pagers in Netopia-land, but shouldn't hurt
+ s/^<-+ More -+>\s*//;
+
+ # no post-processing needed - just file it
+ ProcessHistory("","","","$_");
+ }
+}
+
+
+# dummy function
+sub DoNothing {print STDOUT;}
+
+# Main
+@commandtable=(
+ {'show version' => "ShowVersion"},
+ {'show config' => "ShowConfig"},
+);
+
+# Use array to preserve order of commands, and hash for mapping to subroutine
+my (%commands, @commands);
+foreach (@commandtable) {
+ push @commands, (keys(%{$_}))[0];
+ $commands{$commands[$#commands]}= (values(%{$_}))[0];
+};
+
+$cisco_cmds=join(";",@commands);
+$cmds_regexp=join("|",@commands);
+
+open(OUTPUT,">$host.new") || die "Can't open $host.new for writing: $!\n";
+select(OUTPUT);
+# make OUTPUT unbuffered if debugging
+if ($debug) { $| = 1; }
+
+if ($file) {
+ print STDERR "opening file $host\n" if ($debug);
+ print STDOUT "opening file $host\n" if ($log);
+ open(INPUT,"<$host") || die "open failed for $host: $!\n";
+} else {
+ print STDERR "executing $clogin_pgm -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug);
+ print STDOUT "executing $clogin_pgm -t $timeo -c\"$cisco_cmds\" $host\n" if ($log);
+ if (defined($ENV{NOPIPE})) {
+ system "$clogin_pgm -t $timeo -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "$clogin_pgm failed for $host: $!\n";
+ open(INPUT, "< $host.raw") || die "$clogin_pgm failed for $host: $!\n";
+ } else {
+ open(INPUT,"$clogin_pgm -t $timeo -c \"$cisco_cmds\" $host </dev/null |") || die "$clogin_pgm failed for $host: $!\n";
+ }
+}
+
+# determine password filtering mode
+if ($ENV{"FILTER_PWDS"} =~ /no/i) {
+ $filter_pwds = 0;
+} elsif ($ENV{"FILTER_PWDS"} =~ /all/i) {
+ $filter_pwds = 2;
+} else {
+ $filter_pwds = 1;
+}
+
+ProcessHistory("","","","#RANCID-CONTENT-TYPE: netopia\n#\n");
+ProcessHistory("COMMENTS","keysort","B0","#\n");
+ProcessHistory("COMMENTS","keysort","D0","#\n");
+ProcessHistory("COMMENTS","keysort","F0","#\n");
+ProcessHistory("COMMENTS","keysort","G0","#\n");
+TOP: while(<INPUT>) {
+ tr/\015//d;
+ if (/[>#]\s?exit$/) {
+ $clean_run=1;
+ last;
+ }
+ if (/^Error:/) {
+ print STDOUT ("$host $clogin_pgm error: $_");
+ print STDERR ("$host $clogin_pgm error: $_") if ($debug);
+ $clean_run=0;
+ last;
+ }
+ while (/#\s*($cmds_regexp)\s*$/) {
+ $cmd = $1;
+ if (!defined($prompt)) {
+ $prompt = "#"; # crude but effective
+ $prompt =~ s/([][}{)(\\])/\\$1/g;
+ print STDERR ("PROMPT MATCH: $prompt\n") if ($debug);
+ }
+ print STDERR ("HIT COMMAND:$_") if ($debug);
+ if (! defined($commands{$cmd})) {
+ print STDERR "$host: found unexpected command - \"$cmd\"\n";
+ $clean_run = 0;
+ last TOP;
+ }
+ $rval = &{$commands{$cmd}};
+ delete($commands{$cmd});
+ if ($rval == -1) {
+ $clean_run = 0;
+ last TOP;
+ }
+ }
+}
+print STDOUT "Done $logincmd: $_\n" if ($log);
+# Flush History
+ProcessHistory("","","","");
+# Cleanup
+close(INPUT);
+close(OUTPUT);
+
+if (defined($ENV{NOPIPE})) {
+ unlink("$host.raw") if (! $debug);
+}
+
+# check for completeness
+if (scalar(%commands) || !$clean_run || !$found_end) {
+ if (scalar(%commands)) {
+ printf(STDOUT "$host: missed cmd(s): %s\n", join(',', keys(%commands)));
+ printf(STDERR "$host: missed cmd(s): %s\n", join(',', keys(%commands))) if ($debug);
+ }
+ if (!$clean_run || !$found_end) {
+ print STDOUT "$host: End of run not found\n";
+ print STDERR "$host: End of run not found\n" if ($debug);
+ system("/usr/bin/tail -1 $host.new");
+ }
+ unlink "$host.new" if (! $debug);
+}
diff --git a/bin/xrancid.in b/bin/xrancid.in
index 130bf06..fdda169 100644
--- a/bin/xrancid.in
+++ b/bin/xrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -402,6 +402,7 @@ sub WriteTerm {
$found_end = 0;
return(-1);
}
+ $found_end = 1;
return(0);
}
@@ -424,8 +425,8 @@ sub DoNothing {print STDOUT;}
@commands = map(keys(%$_), @commandtable);
%commands = map(%$_, @commandtable);
-$cisco_cmds=join(";",@commands);
-$cmds_regexp=join("|",@commands);
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
if (length($host) == 0) {
if ($file) {
@@ -490,13 +491,13 @@ TOP: while(<INPUT>) {
# unreliable about echoing the 'exit\n' command. this match might really
# be a bad idea, but instead rely upon WriteTerm's found_end?
if (/$prompt\s?(quit|exit|Connection( to \S+)? closed)/ && $found_end) {
- $clean_run=1;
+ $clean_run = 1;
last;
}
if (/^Error:/) {
print STDOUT ("$host clogin error: $_");
print STDERR ("$host clogin error: $_") if ($debug);
- $clean_run=0;
+ $clean_run = 0;
last;
}
while (/$prompt\s*($cmds_regexp)\s*$/) {
diff --git a/bin/zrancid.in b/bin/zrancid.in
index 197c323..e26dda0 100755
--- a/bin/zrancid.in
+++ b/bin/zrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
diff --git a/configure b/configure
index 7aa7303..72fcaa3 100755
--- a/configure
+++ b/configure
@@ -1,9 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
+# Generated by GNU Autoconf 2.62.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -15,7 +15,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -37,17 +37,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
# Support unset when possible.
@@ -63,8 +91,6 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -87,7 +113,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi
@@ -100,17 +126,10 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -132,7 +151,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -158,7 +177,7 @@ else
as_have_required=no
fi
- if test $as_have_required = yes && (eval ":
+ if test $as_have_required = yes && (eval ":
(as_func_return () {
(exit \$1)
}
@@ -240,7 +259,7 @@ IFS=$as_save_IFS
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -261,7 +280,7 @@ _ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -341,10 +360,10 @@ fi
if test "x$CONFIG_SHELL" != x; then
for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
@@ -413,9 +432,10 @@ fi
test \$exitcode = 0") || {
echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
}
@@ -451,7 +471,7 @@ test \$exitcode = 0") || {
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
@@ -479,7 +499,6 @@ case `echo -n x` in
*)
ECHO_N='-n';;
esac
-
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -492,19 +511,22 @@ if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -529,10 +551,10 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
case $1 in
- -*)set "./$1";;
+ -*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
???[sx]*):;;*)false;;esac;fi
@@ -666,6 +688,7 @@ MAKEINFO
install_sh
STRIP
INSTALL_STRIP_PROGRAM
+MKDIR_P
mkdir_p
AWK
SET_MAKE
@@ -728,6 +751,15 @@ ENV_PATH
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_mk_localstatedir
+enable_conf_install
+with_svn
+enable_mail_plus
+enable_adminmail_plus
+'
ac_precious_vars='build_alias
host_alias
target_alias
@@ -742,6 +774,8 @@ CPP'
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -840,13 +874,21 @@ do
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
@@ -859,13 +901,21 @@ do
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1056,22 +1106,38 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -1091,7 +1157,7 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; }
;;
@@ -1100,16 +1166,16 @@ Try \`$0 --help' for more information." >&2
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
@@ -1118,22 +1184,38 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
{ (exit 1); exit 1; }; }
fi
-# Be sure to have absolute directory names.
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
do
eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
case $ac_val in
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; }
done
@@ -1148,7 +1230,7 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
@@ -1164,10 +1246,10 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
+ { $as_echo "$as_me: error: Working directory cannot be determined" >&2
{ (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
{ (exit 1); exit 1; }; }
@@ -1175,12 +1257,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1207,12 +1289,12 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
{ (exit 1); exit 1; }; }
pwd)`
# When building in place, set srcdir=.
@@ -1261,9 +1343,9 @@ Configuration:
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1273,25 +1355,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -1308,6 +1390,7 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
@@ -1347,15 +1430,17 @@ fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1391,7 +1476,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1401,10 +1486,10 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.61
+generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1415,7 +1500,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -1451,7 +1536,7 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
+ $as_echo "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -1486,7 +1571,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
@@ -1538,11 +1623,12 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) $as_unset $ac_var ;;
esac ;;
esac
@@ -1572,9 +1658,9 @@ _ASBOX
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
@@ -1589,9 +1675,9 @@ _ASBOX
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
@@ -1607,8 +1693,8 @@ _ASBOX
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -1650,21 +1736,24 @@ _ACEOF
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
+ ac_site_file1=$CONFIG_SITE
elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-shift
-for ac_site_file
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
+ test "x$ac_site_file" = xNONE && continue
if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
@@ -1674,16 +1763,16 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -1697,29 +1786,38 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -1729,10 +1827,10 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1784,8 +1882,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1811,11 +1909,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -1844,17 +1943,29 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
done
;;
esac
+
done
IFS=$as_save_IFS
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
@@ -1867,8 +1978,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -1878,8 +1989,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
# Just in case
sleep 1
echo timestamp > conftest.file
@@ -1902,9 +2013,9 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+ { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1915,26 +2026,23 @@ then
# Ok.
:
else
- { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
+$as_echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
{ (exit 1); exit 1; }; }
fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
+# Double any \ or $.
# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1945,15 +2053,15 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
if test "${ac_cv_path_mkdir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
@@ -1988,8 +2096,8 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-echo "${ECHO_T}$MKDIR_P" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
mkdir_p="$MKDIR_P"
case $mkdir_p in
@@ -2001,10 +2109,10 @@ for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AWK+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -2017,7 +2125,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2028,22 +2136,23 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
test -n "$AWK" && break
done
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
@@ -2060,12 +2169,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
SET_MAKE=
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -2084,8 +2193,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -2131,10 +2240,10 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -2147,7 +2256,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2158,11 +2267,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2171,10 +2280,10 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -2187,7 +2296,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2198,11 +2307,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -2210,10 +2319,10 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
@@ -2247,10 +2356,10 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
# make sure MAKE sets ${MAKE}
# Extract the first word of "gmake", so it can be a program name with args.
set dummy gmake; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MAKE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MAKE in
[\\/]* | ?:[\\/]*)
@@ -2265,7 +2374,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2278,11 +2387,11 @@ esac
fi
MAKE=$ac_cv_path_MAKE
if test -n "$MAKE"; then
- { echo "$as_me:$LINENO: result: $MAKE" >&5
-echo "${ECHO_T}$MAKE" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MAKE" >&5
+$as_echo "$MAKE" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2290,10 +2399,10 @@ if test $MAKE = no; then
unset ac_cv_path_MAKE
# Extract the first word of "make", so it can be a program name with args.
set dummy make; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MAKE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MAKE in
[\\/]* | ?:[\\/]*)
@@ -2308,7 +2417,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2321,26 +2430,27 @@ esac
fi
MAKE=$ac_cv_path_MAKE
if test -n "$MAKE"; then
- { echo "$as_me:$LINENO: result: $MAKE" >&5
-echo "${ECHO_T}$MAKE" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MAKE" >&5
+$as_echo "$MAKE" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test $MAKE = no; then
- { { echo "$as_me:$LINENO: error: can't locate a make." >&5
-echo "$as_me: error: can't locate a make." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: can't locate a make." >&5
+$as_echo "$as_me: error: can't locate a make." >&2;}
{ (exit 1); exit 1; }; }
exit 1
fi
fi
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
@@ -2357,12 +2467,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
SET_MAKE=
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -2376,10 +2486,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2392,7 +2502,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2403,11 +2513,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2416,10 +2526,10 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2432,7 +2542,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2443,11 +2553,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -2455,10 +2565,10 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
@@ -2473,10 +2583,10 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2489,7 +2599,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2500,11 +2610,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2513,10 +2623,10 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2534,7 +2644,7 @@ do
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2557,11 +2667,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2572,10 +2682,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2588,7 +2698,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2599,11 +2709,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2616,10 +2726,10 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2632,7 +2742,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -2643,11 +2753,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2659,10 +2769,10 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
@@ -2674,44 +2784,48 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
@@ -2730,27 +2844,22 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort. b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions. Remove them first so a
-# subsequent execution test works.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
ac_rmfiles=
for ac_file in $ac_files
do
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
* ) ac_rmfiles="$ac_rmfiles $ac_file";;
esac
done
@@ -2761,10 +2870,11 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
@@ -2775,7 +2885,7 @@ for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
@@ -2802,15 +2912,15 @@ else
ac_file=''
fi
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
+$as_echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
@@ -2819,8 +2929,8 @@ ac_exeext=$ac_cv_exeext
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
@@ -2829,49 +2939,51 @@ if test "$cross_compiling" != yes; then
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+ { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
+$as_echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
@@ -2880,31 +2992,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+ { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2927,40 +3039,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2986,20 +3099,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
@@ -3009,15 +3123,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
@@ -3044,20 +3162,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
CFLAGS=""
@@ -3082,20 +3201,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_c_werror_flag=$ac_save_c_werror_flag
@@ -3121,20 +3241,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -3149,8 +3270,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -3166,10 +3287,10 @@ else
CFLAGS=
fi
fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
@@ -3240,20 +3361,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_prog_cc_c89=$ac_arg
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -3269,15 +3391,15 @@ fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
x)
- { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
xno)
- { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
CC="$CC $ac_cv_prog_cc_c89"
- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
@@ -3298,8 +3420,8 @@ am__doit:
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
_am_result=none
@@ -3326,8 +3448,8 @@ if test "$am__include" = "#"; then
fi
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
rm -f confinc confmf
# Check whether --enable-dependency-tracking was given.
@@ -3351,10 +3473,10 @@ fi
depcc="$CC" am_compiler_list=
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -3442,8 +3564,8 @@ else
fi
fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -3457,11 +3579,11 @@ else
fi
-{ echo "$as_me:$LINENO: checking for function prototypes" >&5
-echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5
+$as_echo_n "checking for function prototypes... " >&6; }
if test "$ac_cv_prog_cc_c89" != no; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define PROTOTYPES 1
@@ -3473,8 +3595,8 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -3483,15 +3605,15 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3523,20 +3645,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -3560,13 +3683,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -3574,7 +3698,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -3599,8 +3723,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -3628,20 +3752,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -3665,13 +3790,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -3679,7 +3805,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -3695,9 +3821,9 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -3709,42 +3835,37 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
+ if test -z "$GREP"; then
ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
- # Check for GNU ac_path_GREP and select it if it is found.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'GREP' >> "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac_count=`expr $ac_count + 1`
@@ -3759,74 +3880,60 @@ case `"$ac_path_GREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_GREP_found && break 3
+ $ac_path_GREP_found && break 3
+ done
done
done
-
-done
IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ if test -z "$ac_cv_path_GREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
{ (exit 1); exit 1; }; }
-fi
-
+ fi
else
ac_cv_path_GREP=$GREP
fi
-
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
- # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+ if test -z "$EGREP"; then
ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
- # Check for GNU ac_path_EGREP and select it if it is found.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ $as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- echo 'EGREP' >> "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac_count=`expr $ac_count + 1`
@@ -3841,40 +3948,31 @@ case `"$ac_path_EGREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-
- $ac_path_EGREP_found && break 3
+ $ac_path_EGREP_found && break 3
+ done
done
done
-
-done
IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ if test -z "$ac_cv_path_EGREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
{ (exit 1); exit 1; }; }
-fi
-
+ fi
else
ac_cv_path_EGREP=$EGREP
fi
-
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3901,20 +3999,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
@@ -4006,37 +4105,40 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -4058,11 +4160,11 @@ fi
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4080,20 +4182,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
@@ -4101,12 +4204,14 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -4125,20 +4230,21 @@ fi
for ac_header in string.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4154,32 +4260,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4193,69 +4300,72 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -4268,15 +4378,15 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -4308,20 +4418,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -4345,13 +4456,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -4359,7 +4471,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -4384,8 +4496,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -4413,20 +4525,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
:
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
@@ -4450,13 +4563,14 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
@@ -4464,7 +4578,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
@@ -4480,9 +4594,9 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+ { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4493,10 +4607,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4568,20 +4682,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_c_const=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_const=no
@@ -4589,20 +4704,20 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
cat >>confdefs.h <<\_ACEOF
-#define const
+#define const /**/
_ACEOF
fi
-{ echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
@@ -4625,20 +4740,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_c_inline=$ac_kw
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -4649,8 +4765,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
@@ -4668,10 +4784,10 @@ _ACEOF
;;
esac
-{ echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
-echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
+$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
if test "${ac_cv_c_stringize+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4692,8 +4808,8 @@ fi
rm -f conftest*
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
-echo "${ECHO_T}$ac_cv_c_stringize" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
+$as_echo "$ac_cv_c_stringize" >&6; }
if test $ac_cv_c_stringize = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -4704,10 +4820,10 @@ fi
# check includes/headers
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4734,20 +4850,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
@@ -4839,37 +4956,40 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
+rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -4897,20 +5017,21 @@ for ac_header in ctype.h errno.h fcntl.h limits.h pty.h malloc.h memory.h \
siginfo.h string.h strings.h stropts.h sys/types.h \
sys/wait.h unistd.h util.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4926,32 +5047,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -4965,69 +5087,72 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -5037,20 +5162,21 @@ done
for ac_header in sysexits.h
do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -5066,32 +5192,33 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -5105,69 +5232,72 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -5191,11 +5321,11 @@ done
for ac_func in memcpy memmove memset strerror strchr \
strrchr strstr strtok strrtok index rindex unsetenv
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5248,35 +5378,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -5285,11 +5421,11 @@ done
for ac_func in openpty
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5342,35 +5478,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
openpty=1
else
@@ -5381,11 +5523,11 @@ done
# openlog() is not in the default libraries. See if it is in some other lib.
if test $openpty = 0; then
for lib in util; do
- as_ac_Lib=`echo "ac_cv_lib_$lib''_openpty" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for openpty in -l$lib" >&5
-echo $ECHO_N "checking for openpty in -l$lib... $ECHO_C" >&6; }
+ as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_openpty" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for openpty in -l$lib" >&5
+$as_echo_n "checking for openpty in -l$lib... " >&6; }
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$lib $LIBS"
@@ -5417,34 +5559,40 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_Lib=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-ac_res=`eval echo '${'$as_ac_Lib'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Lib'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Lib'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_OPENPTY 1
_ACEOF
@@ -5458,13 +5606,13 @@ fi
# openpty().
if test $openpty = 0; then
# This check (partially) comes from expect's configure
- { echo "$as_me:$LINENO: checking for SVR4 style pty allocation" >&5
-echo $ECHO_N "checking for SVR4 style pty allocation... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for SVR4 style pty allocation" >&5
+$as_echo_n "checking for SVR4 style pty allocation... " >&6; }
if test -r /dev/ptmx ; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_PTMX 1
_ACEOF
@@ -5473,11 +5621,11 @@ _ACEOF
for ac_func in ptsname
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5530,35 +5678,41 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_var=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -5567,11 +5721,11 @@ done
if test $ac_cv_func_ptsname+set != set; then
# ptsname is not in the default libraries.
for lib in pt; do
- as_ac_Lib=`echo "ac_cv_lib_$lib''_ptsname" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for ptsname in -l$lib" >&5
-echo $ECHO_N "checking for ptsname in -l$lib... $ECHO_C" >&6; }
+ as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_ptsname" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for ptsname in -l$lib" >&5
+$as_echo_n "checking for ptsname in -l$lib... " >&6; }
if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$lib $LIBS"
@@ -5603,47 +5757,53 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
eval "$as_ac_Lib=yes"
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
+rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-ac_res=`eval echo '${'$as_ac_Lib'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ac_res=`eval 'as_val=${'$as_ac_Lib'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Lib'}
+ $as_echo "$as_val"'` = yes; then
LIBS="$LIBS -l$lib"; break
fi
done
fi
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
# In OSF/1 case, SVR4 are somewhat different.
# Gregory Depp <depp@osf.org> 17Aug93
- { echo "$as_me:$LINENO: checking for OSF/1 style pty allocation" >&5
-echo $ECHO_N "checking for OSF/1 style pty allocation... $ECHO_C" >&6; }
+ { $as_echo "$as_me:$LINENO: checking for OSF/1 style pty allocation" >&5
+$as_echo_n "checking for OSF/1 style pty allocation... " >&6; }
if test -r /dev/ptmx_bsd ; then
@@ -5651,20 +5811,20 @@ echo $ECHO_N "checking for OSF/1 style pty allocation... $ECHO_C" >&6; }
#define HAVE_PTMX_OSF 1
_ACEOF
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
fi
# type checks
-{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
if test "${ac_cv_type_signal+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5689,20 +5849,21 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_type_signal=int
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_signal=void
@@ -5710,34 +5871,66 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
_ACEOF
-{ echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_size_t=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-typedef size_t ac__type_new_;
int
main ()
{
-if ((ac__type_new_ *) 0)
- return 0;
-if (sizeof (ac__type_new_))
+if (sizeof (size_t))
+ return 0;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((size_t)))
+ return 0;
;
return 0;
}
@@ -5748,29 +5941,38 @@ case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_type_size_t=yes
+ :
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_size_t=no
+ ac_cv_type_size_t=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
if test $ac_cv_type_size_t = yes; then
:
else
@@ -5786,20 +5988,20 @@ fi
#
# Check if user wants us to create LOCALSTATEDIR. If it's a package-system,
# they might create it themselves for book-keeping sake; eg: NetBSD
-{ echo "$as_me:$LINENO: checking whether to create the local state directory at install time" >&5
-echo $ECHO_N "checking whether to create the local state directory at install time... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether to create the local state directory at install time" >&5
+$as_echo_n "checking whether to create the local state directory at install time... " >&6; }
# Check whether --enable-mk-localstatedir was given.
if test "${enable_mk_localstatedir+set}" = set; then
enableval=$enable_mk_localstatedir; if test "$enable_mk_localstatedir" = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
else
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
enable_mk_localstatedir="yes"
fi
@@ -5814,20 +6016,20 @@ fi
# Check if user wants us to install sample configurations into the sysconfdir.
-{ echo "$as_me:$LINENO: checking whether to install sample .conf files in sysconfdir" >&5
-echo $ECHO_N "checking whether to install sample .conf files in sysconfdir... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether to install sample .conf files in sysconfdir" >&5
+$as_echo_n "checking whether to install sample .conf files in sysconfdir... " >&6; }
# Check whether --enable-conf-install was given.
if test "${enable_conf_install+set}" = set; then
enableval=$enable_conf_install; if test "$enable_conf_install" = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
else
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
enable_conf_install="yes"
fi
@@ -5843,43 +6045,43 @@ fi
# Configure for subversion revision control system instead of CVS.
SVN_FSTYPE="--fs-type fsfs"
-{ echo "$as_me:$LINENO: checking whether subversion" >&5
-echo $ECHO_N "checking whether subversion... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether subversion" >&5
+$as_echo_n "checking whether subversion... " >&6; }
# Check whether --with-svn was given.
if test "${with_svn+set}" = set; then
withval=$with_svn; case "$withval" in
yes)
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
RCSSYS="svn"
;;
fsfs)
- { echo "$as_me:$LINENO: result: yes fstype fsfs" >&5
-echo "${ECHO_T}yes fstype fsfs" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes fstype fsfs" >&5
+$as_echo "yes fstype fsfs" >&6; }
RCSSYS="svn"
SVN_FSTYPE="--fs-type fsfs"
;;
bdb)
- { echo "$as_me:$LINENO: result: yes fstype bdb" >&5
-echo "${ECHO_T}yes fstype bdb" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes fstype bdb" >&5
+$as_echo "yes fstype bdb" >&6; }
RCSSYS="svn"
SVN_FSTYPE="--fs-type bdb"
;;
no)
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
RCSSYS="cvs"
;;
*)
- { { echo "$as_me:$LINENO: error: unknown svn fs-type $withval" >&5
-echo "$as_me: error: unknown svn fs-type $withval" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: unknown svn fs-type $withval" >&5
+$as_echo "$as_me: error: unknown svn fs-type $withval" >&2;}
{ (exit 1); exit 1; }; }
esac
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
RCSSYS="cvs"
fi
@@ -5890,24 +6092,24 @@ rd_cv_RCSSYS=$RCSSYS
# Check for a preference for using mail addresses like rancid+group
# instead of the standard rancid-group
-{ echo "$as_me:$LINENO: checking whether mail addresses should be in the rancid+ form" >&5
-echo $ECHO_N "checking whether mail addresses should be in the rancid+ form... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether mail addresses should be in the rancid+ form" >&5
+$as_echo_n "checking whether mail addresses should be in the rancid+ form... " >&6; }
# Check whether --enable-mail-plus was given.
if test "${enable_mail_plus+set}" = set; then
enableval=$enable_mail_plus; if test "$enable_mail_plus" = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
MAILPLUS="rancid+"
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
MAILPLUS="rancid-"
fi
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
MAILPLUS="rancid-"
@@ -5917,24 +6119,24 @@ rd_cv_MAILPLUS=$MAILPLUS
# Check for a preference for using mail addresses like rancid+admin-group
# instead of the standard rancid-admin-group
-{ echo "$as_me:$LINENO: checking whether admin mail addresses should be in the rancid-admin+ form" >&5
-echo $ECHO_N "checking whether admin mail addresses should be in the rancid-admin+ form... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking whether admin mail addresses should be in the rancid-admin+ form" >&5
+$as_echo_n "checking whether admin mail addresses should be in the rancid-admin+ form... " >&6; }
# Check whether --enable-adminmail-plus was given.
if test "${enable_adminmail_plus+set}" = set; then
enableval=$enable_adminmail_plus; if test "$enable_adminmail_plus" = yes; then
- { echo "$as_me:$LINENO: result: rancid-admin+" >&5
-echo "${ECHO_T}rancid-admin+" >&6; }
+ { $as_echo "$as_me:$LINENO: result: rancid-admin+" >&5
+$as_echo "rancid-admin+" >&6; }
ADMINMAILPLUS="rancid-admin+"
else
- { echo "$as_me:$LINENO: result: ${MAILPLUS}admin-" >&5
-echo "${ECHO_T}${MAILPLUS}admin-" >&6; }
+ { $as_echo "$as_me:$LINENO: result: ${MAILPLUS}admin-" >&5
+$as_echo "${MAILPLUS}admin-" >&6; }
ADMINMAILPLUS="${MAILPLUS}admin-"
fi
else
- { echo "$as_me:$LINENO: result: ${MAILPLUS}admin-" >&5
-echo "${ECHO_T}${MAILPLUS}admin-" >&6; }
+ { $as_echo "$as_me:$LINENO: result: ${MAILPLUS}admin-" >&5
+$as_echo "${MAILPLUS}admin-" >&6; }
ADMINMAILPLUS="${MAILPLUS}admin-"
@@ -5944,10 +6146,10 @@ rd_cv_ADMINMAILPLUS=$ADMINMAILPLUS
# Extract the first word of "dirname", so it can be a program name with args.
set dummy dirname; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_DIRNAME+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $DIRNAME in
[\\/]* | ?:[\\/]*)
@@ -5962,7 +6164,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5975,18 +6177,18 @@ esac
fi
DIRNAME=$ac_cv_path_DIRNAME
if test -n "$DIRNAME"; then
- { echo "$as_me:$LINENO: result: $DIRNAME" >&5
-echo "${ECHO_T}$DIRNAME" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $DIRNAME" >&5
+$as_echo "$DIRNAME" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
# locate GNU diff (one supporting the -u option)
-{ echo "$as_me:$LINENO: checking for a diff(1) that supports -u" >&5
-echo $ECHO_N "checking for a diff(1) that supports -u... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for a diff(1) that supports -u" >&5
+$as_echo_n "checking for a diff(1) that supports -u... " >&6; }
_DIFF_PATH=`echo $PATH:${prefix}/bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:/usr/gnu/bin:/usr/contrib/bin | sed -e 's/:/ /g'`
for _diff in ${_DIFF_PATH} ;
do
@@ -6018,12 +6220,12 @@ if test "$DIFF" = "" ; then
DIFF_CMD=$ADIFF_CMD
fi
if test "$DIFF" = "" ; then
- { { echo "$as_me:$LINENO: error: can't locate diff." >&5
-echo "$as_me: error: can't locate diff." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: can't locate diff." >&5
+$as_echo "$as_me: error: can't locate diff." >&2;}
{ (exit 1); exit 1; }; }
fi
-{ echo "$as_me:$LINENO: result: ${DIFF_CMD}" >&5
-echo "${ECHO_T}${DIFF_CMD}" >&6; }
+{ $as_echo "$as_me:$LINENO: result: ${DIFF_CMD}" >&5
+$as_echo "${DIFF_CMD}" >&6; }
rd_cv_DIFF=$DIFF
rd_cv_DIFF_CMD=$DIFF_CMD
@@ -6031,10 +6233,10 @@ rd_cv_DIFF_CMD=$DIFF_CMD
# Extract the first word of "sendmail", so it can be a program name with args.
set dummy sendmail; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_SENDMAIL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $SENDMAIL in
[\\/]* | ?:[\\/]*)
@@ -6050,7 +6252,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_SENDMAIL="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6063,11 +6265,11 @@ esac
fi
SENDMAIL=$ac_cv_path_SENDMAIL
if test -n "$SENDMAIL"; then
- { echo "$as_me:$LINENO: result: $SENDMAIL" >&5
-echo "${ECHO_T}$SENDMAIL" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $SENDMAIL" >&5
+$as_echo "$SENDMAIL" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6078,10 +6280,10 @@ for ac_prog in gnutar gtar tar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_TAR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$TAR"; then
ac_cv_prog_TAR="$TAR" # Let the user override the test.
@@ -6094,7 +6296,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_TAR="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6105,11 +6307,11 @@ fi
fi
TAR=$ac_cv_prog_TAR
if test -n "$TAR"; then
- { echo "$as_me:$LINENO: result: $TAR" >&5
-echo "${ECHO_T}$TAR" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $TAR" >&5
+$as_echo "$TAR" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6121,10 +6323,10 @@ for ac_prog in automake
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AUTOMAKE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
if test -n "$AUTOMAKE"; then
ac_cv_prog_AUTOMAKE="$AUTOMAKE" # Let the user override the test.
@@ -6137,7 +6339,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AUTOMAKE="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6148,11 +6350,11 @@ fi
fi
AUTOMAKE=$ac_cv_prog_AUTOMAKE
if test -n "$AUTOMAKE"; then
- { echo "$as_me:$LINENO: result: $AUTOMAKE" >&5
-echo "${ECHO_T}$AUTOMAKE" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $AUTOMAKE" >&5
+$as_echo "$AUTOMAKE" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6173,11 +6375,12 @@ done
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -6206,17 +6409,29 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
done
;;
esac
+
done
IFS=$as_save_IFS
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
@@ -6229,8 +6444,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -6242,10 +6457,10 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "perl5", so it can be a program name with args.
set dummy perl5; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PERLV_PATH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PERLV_PATH in
[\\/]* | ?:[\\/]*)
@@ -6260,7 +6475,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PERLV_PATH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6273,11 +6488,11 @@ esac
fi
PERLV_PATH=$ac_cv_path_PERLV_PATH
if test -n "$PERLV_PATH"; then
- { echo "$as_me:$LINENO: result: $PERLV_PATH" >&5
-echo "${ECHO_T}$PERLV_PATH" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $PERLV_PATH" >&5
+$as_echo "$PERLV_PATH" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6285,10 +6500,10 @@ if test $PERLV_PATH = no; then
unset ac_cv_path_PERLV_PATH
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PERLV_PATH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PERLV_PATH in
[\\/]* | ?:[\\/]*)
@@ -6303,7 +6518,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PERLV_PATH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6316,24 +6531,24 @@ esac
fi
PERLV_PATH=$ac_cv_path_PERLV_PATH
if test -n "$PERLV_PATH"; then
- { echo "$as_me:$LINENO: result: $PERLV_PATH" >&5
-echo "${ECHO_T}$PERLV_PATH" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $PERLV_PATH" >&5
+$as_echo "$PERLV_PATH" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test $PERLV_PATH = no; then
- { { echo "$as_me:$LINENO: error: can't locate a suitable perl5." >&5
-echo "$as_me: error: can't locate a suitable perl5." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: can't locate a suitable perl5." >&5
+$as_echo "$as_me: error: can't locate a suitable perl5." >&2;}
{ (exit 1); exit 1; }; }
exit 1
else
$PERLV_PATH -e 'require 5;'
if test $? -ne 0 ; then
- { { echo "$as_me:$LINENO: error: can't locate a suitable perl5." >&5
-echo "$as_me: error: can't locate a suitable perl5." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: can't locate a suitable perl5." >&5
+$as_echo "$as_me: error: can't locate a suitable perl5." >&2;}
{ (exit 1); exit 1; }; }
exit 1
fi
@@ -6345,10 +6560,10 @@ PERLV=`basename $PERLV_PATH`
# Extract the first word of "expect", so it can be a program name with args.
set dummy expect; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_EXPECT_PATH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $EXPECT_PATH in
[\\/]* | ?:[\\/]*)
@@ -6363,7 +6578,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_EXPECT_PATH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6376,17 +6591,17 @@ esac
fi
EXPECT_PATH=$ac_cv_path_EXPECT_PATH
if test -n "$EXPECT_PATH"; then
- { echo "$as_me:$LINENO: result: $EXPECT_PATH" >&5
-echo "${ECHO_T}$EXPECT_PATH" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $EXPECT_PATH" >&5
+$as_echo "$EXPECT_PATH" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test $EXPECT_PATH = no; then
- { { echo "$as_me:$LINENO: error: can't locate expect." >&5
-echo "$as_me: error: can't locate expect." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: can't locate expect." >&5
+$as_echo "$as_me: error: can't locate expect." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -6394,10 +6609,10 @@ fi
# locate ping and it's syntax
# Extract the first word of "ping", so it can be a program name with args.
set dummy ping; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_PING_PATH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $PING_PATH in
[\\/]* | ?:[\\/]*)
@@ -6412,7 +6627,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_PING_PATH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6425,17 +6640,17 @@ esac
fi
PING_PATH=$ac_cv_path_PING_PATH
if test -n "$PING_PATH"; then
- { echo "$as_me:$LINENO: result: $PING_PATH" >&5
-echo "${ECHO_T}$PING_PATH" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $PING_PATH" >&5
+$as_echo "$PING_PATH" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
if test $PING_PATH = no; then
- { { echo "$as_me:$LINENO: error: can't locate ping." >&5
-echo "$as_me: error: can't locate ping." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: can't locate ping." >&5
+$as_echo "$as_me: error: can't locate ping." >&2;}
{ (exit 1); exit 1; }; }
exit 1
fi
@@ -6446,8 +6661,8 @@ $PING_PATH -c 1 -v 127.0.0.1 > /dev/null 2>&1
if test $? -ne 0 ; then
$PING_PATH 127.0.0.1 56 1 > /dev/null 2>&1
if test $? -ne 0 ; then
- { { echo "$as_me:$LINENO: error: can't figure out how to pass count == 1 to $PING_PATH." >&5
-echo "$as_me: error: can't figure out how to pass count == 1 to $PING_PATH." >&2;}
+ { { $as_echo "$as_me:$LINENO: error: can't figure out how to pass count == 1 to $PING_PATH." >&5
+$as_echo "$as_me: error: can't figure out how to pass count == 1 to $PING_PATH." >&2;}
{ (exit 1); exit 1; }; }
exit 1
else
@@ -6469,10 +6684,10 @@ ENV_PATH="$ENV_PATH:`dirname $DIRNAME`:`dirname $DIFF`"
if test $RCSSYS = "cvs" ; then
# Extract the first word of "cvs", so it can be a program name with args.
set dummy cvs; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_CVS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $CVS in
[\\/]* | ?:[\\/]*)
@@ -6487,7 +6702,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_CVS="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6500,11 +6715,11 @@ esac
fi
CVS=$ac_cv_path_CVS
if test -n "$CVS"; then
- { echo "$as_me:$LINENO: result: $CVS" >&5
-echo "${ECHO_T}$CVS" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $CVS" >&5
+$as_echo "$CVS" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6512,10 +6727,10 @@ fi
else
# Extract the first word of "svn", so it can be a program name with args.
set dummy svn; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_SVN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $SVN in
[\\/]* | ?:[\\/]*)
@@ -6530,7 +6745,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_SVN="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6543,11 +6758,11 @@ esac
fi
SVN=$ac_cv_path_SVN
if test -n "$SVN"; then
- { echo "$as_me:$LINENO: result: $SVN" >&5
-echo "${ECHO_T}$SVN" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $SVN" >&5
+$as_echo "$SVN" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -6555,10 +6770,10 @@ fi
fi
# Extract the first word of "comm", so it can be a program name with args.
set dummy comm; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_COMM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $COMM in
[\\/]* | ?:[\\/]*)
@@ -6573,7 +6788,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6586,21 +6801,21 @@ esac
fi
COMM=$ac_cv_path_COMM
if test -n "$COMM"; then
- { echo "$as_me:$LINENO: result: $COMM" >&5
-echo "${ECHO_T}$COMM" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $COMM" >&5
+$as_echo "$COMM" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_COMM`"
# Extract the first word of "find", so it can be a program name with args.
set dummy find; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_FIND+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $FIND in
[\\/]* | ?:[\\/]*)
@@ -6615,7 +6830,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6628,21 +6843,21 @@ esac
fi
FIND=$ac_cv_path_FIND
if test -n "$FIND"; then
- { echo "$as_me:$LINENO: result: $FIND" >&5
-echo "${ECHO_T}$FIND" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $FIND" >&5
+$as_echo "$FIND" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_FIND`"
# Extract the first word of "grep", so it can be a program name with args.
set dummy grep; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $GREP in
[\\/]* | ?:[\\/]*)
@@ -6657,7 +6872,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6670,21 +6885,21 @@ esac
fi
GREP=$ac_cv_path_GREP
if test -n "$GREP"; then
- { echo "$as_me:$LINENO: result: $GREP" >&5
-echo "${ECHO_T}$GREP" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $GREP" >&5
+$as_echo "$GREP" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_GREP`"
# Extract the first word of "id", so it can be a program name with args.
set dummy id; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_ID+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $ID in
[\\/]* | ?:[\\/]*)
@@ -6699,7 +6914,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ID="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6712,21 +6927,21 @@ esac
fi
ID=$ac_cv_path_ID
if test -n "$ID"; then
- { echo "$as_me:$LINENO: result: $ID" >&5
-echo "${ECHO_T}$ID" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $ID" >&5
+$as_echo "$ID" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_ID`"
# Extract the first word of "mkdir", so it can be a program name with args.
set dummy mkdir; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MKDIR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $MKDIR in
[\\/]* | ?:[\\/]*)
@@ -6741,7 +6956,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6754,21 +6969,21 @@ esac
fi
MKDIR=$ac_cv_path_MKDIR
if test -n "$MKDIR"; then
- { echo "$as_me:$LINENO: result: $MKDIR" >&5
-echo "${ECHO_T}$MKDIR" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $MKDIR" >&5
+$as_echo "$MKDIR" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_MKDIR`"
# Extract the first word of "rsh", so it can be a program name with args.
set dummy rsh; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_RSH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $RSH in
[\\/]* | ?:[\\/]*)
@@ -6783,7 +6998,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_RSH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6796,21 +7011,21 @@ esac
fi
RSH=$ac_cv_path_RSH
if test -n "$RSH"; then
- { echo "$as_me:$LINENO: result: $RSH" >&5
-echo "${ECHO_T}$RSH" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $RSH" >&5
+$as_echo "$RSH" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_RSH`"
# Extract the first word of "sort", so it can be a program name with args.
set dummy sort; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_SORT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $SORT in
[\\/]* | ?:[\\/]*)
@@ -6825,7 +7040,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6838,21 +7053,21 @@ esac
fi
SORT=$ac_cv_path_SORT
if test -n "$SORT"; then
- { echo "$as_me:$LINENO: result: $SORT" >&5
-echo "${ECHO_T}$SORT" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SORT`"
# Extract the first word of "ssh", so it can be a program name with args.
set dummy ssh; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_SSH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $SSH in
[\\/]* | ?:[\\/]*)
@@ -6867,7 +7082,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_SSH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6880,21 +7095,21 @@ esac
fi
SSH=$ac_cv_path_SSH
if test -n "$SSH"; then
- { echo "$as_me:$LINENO: result: $SSH" >&5
-echo "${ECHO_T}$SSH" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $SSH" >&5
+$as_echo "$SSH" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SSH`"
# Extract the first word of "telnet", so it can be a program name with args.
set dummy telnet; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_TELNET+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $TELNET in
[\\/]* | ?:[\\/]*)
@@ -6909,7 +7124,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_TELNET="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6922,21 +7137,21 @@ esac
fi
TELNET=$ac_cv_path_TELNET
if test -n "$TELNET"; then
- { echo "$as_me:$LINENO: result: $TELNET" >&5
-echo "${ECHO_T}$TELNET" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $TELNET" >&5
+$as_echo "$TELNET" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_TELNET`"
# Extract the first word of "touch", so it can be a program name with args.
set dummy touch; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_TOUCH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ $as_echo_n "(cached) " >&6
else
case $TOUCH in
[\\/]* | ?:[\\/]*)
@@ -6951,7 +7166,7 @@ do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -6964,11 +7179,11 @@ esac
fi
TOUCH=$ac_cv_path_TOUCH
if test -n "$TOUCH"; then
- { echo "$as_me:$LINENO: result: $TOUCH" >&5
-echo "${ECHO_T}$TOUCH" >&6; }
+ { $as_echo "$as_me:$LINENO: result: $TOUCH" >&5
+$as_echo "$TOUCH" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -7022,6 +7237,8 @@ ac_config_files="$ac_config_files bin/cssrancid"
ac_config_files="$ac_config_files bin/elogin bin/erancid"
+ac_config_files="$ac_config_files bin/f5rancid"
+
ac_config_files="$ac_config_files bin/f10rancid"
ac_config_files="$ac_config_files bin/flogin bin/francid"
@@ -7034,12 +7251,14 @@ ac_config_files="$ac_config_files bin/htlogin bin/htrancid"
ac_config_files="$ac_config_files bin/jlogin bin/jrancid bin/jerancid"
-ac_config_files="$ac_config_files bin/mrancid"
+ac_config_files="$ac_config_files bin/mrancid bin/mrvlogin bin/mrvrancid"
ac_config_files="$ac_config_files bin/nlogin bin/nrancid"
ac_config_files="$ac_config_files bin/nslogin bin/nsrancid"
+ac_config_files="$ac_config_files bin/nxrancid"
+
ac_config_files="$ac_config_files bin/prancid"
ac_config_files="$ac_config_files bin/rivlogin bin/rivrancid"
@@ -7048,8 +7267,12 @@ ac_config_files="$ac_config_files bin/rrancid"
ac_config_files="$ac_config_files bin/srancid"
+ac_config_files="$ac_config_files bin/tlogin"
+
ac_config_files="$ac_config_files bin/tntlogin bin/tntrancid"
+ac_config_files="$ac_config_files bin/trancid"
+
ac_config_files="$ac_config_files bin/xrancid"
ac_config_files="$ac_config_files bin/zrancid"
@@ -7084,11 +7307,12 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
*) $as_unset $ac_var ;;
esac ;;
esac
@@ -7121,12 +7345,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" &&
- { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -7142,7 +7366,7 @@ ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`echo "$ac_i" | sed "$ac_script"`
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -7154,40 +7378,41 @@ LTLIBOBJS=$ac_ltlibobjs
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${MK_LCLSTATEDIR_TRUE}" && test -z "${MK_LCLSTATEDIR_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"MK_LCLSTATEDIR\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"MK_LCLSTATEDIR\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MK_LCLSTATEDIR\" was never defined.
+$as_echo "$as_me: error: conditional \"MK_LCLSTATEDIR\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${CONF_INSTALL_TRUE}" && test -z "${CONF_INSTALL_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"CONF_INSTALL\" was never defined.
+ { { $as_echo "$as_me:$LINENO: error: conditional \"CONF_INSTALL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"CONF_INSTALL\" was never defined.
+$as_echo "$as_me: error: conditional \"CONF_INSTALL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -7200,7 +7425,7 @@ ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
@@ -7210,7 +7435,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
@@ -7232,17 +7457,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
# Support unset when possible.
@@ -7258,8 +7511,6 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -7282,7 +7533,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi
@@ -7295,17 +7546,10 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -7327,7 +7571,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -7378,7 +7622,7 @@ $as_unset CDPATH
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
@@ -7406,7 +7650,6 @@ case `echo -n x` in
*)
ECHO_N='-n';;
esac
-
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -7419,19 +7662,22 @@ if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -7456,10 +7702,10 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
case $1 in
- -*)set "./$1";;
+ -*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
???[sx]*):;;*)false;;esac;fi
@@ -7482,7 +7728,7 @@ exec 6>&1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -7495,7 +7741,7 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
@@ -7503,7 +7749,7 @@ config_commands="$ac_config_commands"
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
@@ -7516,9 +7762,9 @@ Usage: $0 [OPTIONS] [FILE]...
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -7532,13 +7778,13 @@ $config_commands
Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.61,
- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.62,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2008 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -7546,11 +7792,12 @@ ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
@@ -7572,30 +7819,36 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
+ $as_echo "$ac_cs_version"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
$ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- { echo "$as_me: error: ambiguous option: $1
+ { $as_echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; };;
--help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; } ;;
@@ -7614,27 +7867,29 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=$SHELL
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ exec "\$@"
fi
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- echo "$ac_log"
+ $as_echo "$ac_log"
} >&5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
@@ -7642,7 +7897,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Handling of arguments.
for ac_config_target in $ac_config_targets
@@ -7673,6 +7928,7 @@ do
"bin/cssrancid") CONFIG_FILES="$CONFIG_FILES bin/cssrancid" ;;
"bin/elogin") CONFIG_FILES="$CONFIG_FILES bin/elogin" ;;
"bin/erancid") CONFIG_FILES="$CONFIG_FILES bin/erancid" ;;
+ "bin/f5rancid") CONFIG_FILES="$CONFIG_FILES bin/f5rancid" ;;
"bin/f10rancid") CONFIG_FILES="$CONFIG_FILES bin/f10rancid" ;;
"bin/flogin") CONFIG_FILES="$CONFIG_FILES bin/flogin" ;;
"bin/francid") CONFIG_FILES="$CONFIG_FILES bin/francid" ;;
@@ -7685,23 +7941,28 @@ do
"bin/jrancid") CONFIG_FILES="$CONFIG_FILES bin/jrancid" ;;
"bin/jerancid") CONFIG_FILES="$CONFIG_FILES bin/jerancid" ;;
"bin/mrancid") CONFIG_FILES="$CONFIG_FILES bin/mrancid" ;;
+ "bin/mrvlogin") CONFIG_FILES="$CONFIG_FILES bin/mrvlogin" ;;
+ "bin/mrvrancid") CONFIG_FILES="$CONFIG_FILES bin/mrvrancid" ;;
"bin/nlogin") CONFIG_FILES="$CONFIG_FILES bin/nlogin" ;;
"bin/nrancid") CONFIG_FILES="$CONFIG_FILES bin/nrancid" ;;
"bin/nslogin") CONFIG_FILES="$CONFIG_FILES bin/nslogin" ;;
"bin/nsrancid") CONFIG_FILES="$CONFIG_FILES bin/nsrancid" ;;
+ "bin/nxrancid") CONFIG_FILES="$CONFIG_FILES bin/nxrancid" ;;
"bin/prancid") CONFIG_FILES="$CONFIG_FILES bin/prancid" ;;
"bin/rivlogin") CONFIG_FILES="$CONFIG_FILES bin/rivlogin" ;;
"bin/rivrancid") CONFIG_FILES="$CONFIG_FILES bin/rivrancid" ;;
"bin/rrancid") CONFIG_FILES="$CONFIG_FILES bin/rrancid" ;;
"bin/srancid") CONFIG_FILES="$CONFIG_FILES bin/srancid" ;;
+ "bin/tlogin") CONFIG_FILES="$CONFIG_FILES bin/tlogin" ;;
"bin/tntlogin") CONFIG_FILES="$CONFIG_FILES bin/tntlogin" ;;
"bin/tntrancid") CONFIG_FILES="$CONFIG_FILES bin/tntrancid" ;;
+ "bin/trancid") CONFIG_FILES="$CONFIG_FILES bin/trancid" ;;
"bin/xrancid") CONFIG_FILES="$CONFIG_FILES bin/xrancid" ;;
"bin/zrancid") CONFIG_FILES="$CONFIG_FILES bin/zrancid" ;;
"share/rtrfilter") CONFIG_FILES="$CONFIG_FILES share/rtrfilter" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
@@ -7742,219 +8003,143 @@ $debug ||
(umask 077 && mkdir "$tmp")
} ||
{
- echo "$me: cannot create a temporary directory in ." >&2
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
-_ACEOF
-
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-VERSION!$VERSION$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-am__isrc!$am__isrc$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAKE!$MAKE$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-U!$U$ac_delim
-ANSI2KNR!$ANSI2KNR$ac_delim
-MK_LCLSTATEDIR_TRUE!$MK_LCLSTATEDIR_TRUE$ac_delim
-MK_LCLSTATEDIR_FALSE!$MK_LCLSTATEDIR_FALSE$ac_delim
-CONF_INSTALL_TRUE!$CONF_INSTALL_TRUE$ac_delim
-CONF_INSTALL_FALSE!$CONF_INSTALL_FALSE$ac_delim
-RCSSYS!$RCSSYS$ac_delim
-SVN_FSTYPE!$SVN_FSTYPE$ac_delim
-MAILPLUS!$MAILPLUS$ac_delim
-ADMINMAILPLUS!$ADMINMAILPLUS$ac_delim
-DIRNAME!$DIRNAME$ac_delim
-DIFF!$DIFF$ac_delim
-DIFF_CMD!$DIFF_CMD$ac_delim
-SENDMAIL!$SENDMAIL$ac_delim
-TAR!$TAR$ac_delim
-PERLV_PATH!$PERLV_PATH$ac_delim
-PERLV!$PERLV$ac_delim
-EXPECT_PATH!$EXPECT_PATH$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
fi
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-PING_PATH!$PING_PATH$ac_delim
-LG_PING_CMD!$LG_PING_CMD$ac_delim
-CVS!$CVS$ac_delim
-SVN!$SVN$ac_delim
-COMM!$COMM$ac_delim
-FIND!$FIND$ac_delim
-ID!$ID$ac_delim
-MKDIR!$MKDIR$ac_delim
-RSH!$RSH$ac_delim
-SORT!$SORT$ac_delim
-SSH!$SSH$ac_delim
-TELNET!$TELNET$ac_delim
-TOUCH!$TOUCH$ac_delim
-ENV_PATH!$ENV_PATH$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; then
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then
break
elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
{ (exit 1); exit 1; }; }
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACAWK
_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
_ACEOF
-
# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
@@ -7970,19 +8155,133 @@ s/^[^=]*=[ ]*$//
}'
fi
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
-for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", line, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+ { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
{ (exit 1); exit 1; }; };;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
@@ -8011,26 +8310,38 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
{ (exit 1); exit 1; }; };;
esac
- ac_file_inputs="$ac_file_inputs $ac_f"
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
;;
esac
@@ -8040,7 +8351,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
+$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8066,7 +8377,7 @@ echo X"$ac_file" |
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -8075,7 +8386,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8096,17 +8407,17 @@ echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -8151,12 +8462,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
esac
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
p
q
}
@@ -8165,13 +8477,14 @@ case `sed -n '/datarootdir/ {
/@infodir@/p
/@localedir@/p
/@mandir@/p
-' $ac_file_inputs` in
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
s&@datadir@&$datadir&g
s&@docdir@&$docdir&g
@@ -8185,15 +8498,16 @@ _ACEOF
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
+s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -8204,135 +8518,75 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&2;}
rm -f "$tmp/stdin"
case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
;;
:H)
#
# CONFIG_HEADER
#
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status. If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless. But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
-ac_dB='\\)[ (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
- sed -n '
- t rset
- :rset
- s/^[ ]*#[ ]*define[ ][ ]*//
- t ok
- d
- :ok
- s/[\\&,]/\\&/g
- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
- ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[ #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
- # Write a here document:
- cat >>$CONFIG_STATUS <<_ACEOF
- # First, check the format of the line:
- cat >"\$tmp/defines.sed" <<\\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
-/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
-b
-:def
-_ACEOF
- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
- grep . conftest.tail >/dev/null || break
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
-
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
if test x"$ac_file" != x-; then
- echo "/* $configure_input */" >"$tmp/config.h"
- cat "$ac_result" >>"$tmp/config.h"
- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
- rm -f $ac_file
- mv "$tmp/config.h" $ac_file
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
fi
else
- echo "/* $configure_input */"
- cat "$ac_result"
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+ { (exit 1); exit 1; }; }
fi
- rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $ac_file | $ac_file:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8352,8 +8606,8 @@ echo X$ac_file |
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -8369,13 +8623,13 @@ echo "$as_me: executing $ac_file commands" >&6;}
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8419,7 +8673,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
+$as_echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8445,7 +8699,7 @@ echo X"$file" |
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -8454,7 +8708,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -8475,8 +8729,8 @@ echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
@@ -8499,6 +8753,7 @@ done
"bin/cssrancid":F) chmod a+x $ac_file ;;
"bin/elogin":F) chmod a+x $ac_file ;;
"bin/erancid":F) chmod a+x $ac_file ;;
+ "bin/f5rancid":F) chmod a+x $ac_file ;;
"bin/f10rancid":F) chmod a+x $ac_file ;;
"bin/flogin":F) chmod a+x $ac_file ;;
"bin/francid":F) chmod a+x $ac_file ;;
@@ -8511,17 +8766,22 @@ done
"bin/jrancid":F) chmod a+x $ac_file ;;
"bin/jerancid":F) chmod a+x $ac_file ;;
"bin/mrancid":F) chmod a+x $ac_file ;;
+ "bin/mrvlogin":F) chmod a+x $ac_file ;;
+ "bin/mrvrancid":F) chmod a+x $ac_file ;;
"bin/nlogin":F) chmod a+x $ac_file ;;
"bin/nrancid":F) chmod a+x $ac_file ;;
"bin/nslogin":F) chmod a+x $ac_file ;;
"bin/nsrancid":F) chmod a+x $ac_file ;;
+ "bin/nxrancid":F) chmod a+x $ac_file ;;
"bin/prancid":F) chmod a+x $ac_file ;;
"bin/rivlogin":F) chmod a+x $ac_file ;;
"bin/rivrancid":F) chmod a+x $ac_file ;;
"bin/rrancid":F) chmod a+x $ac_file ;;
"bin/srancid":F) chmod a+x $ac_file ;;
+ "bin/tlogin":F) chmod a+x $ac_file ;;
"bin/tntlogin":F) chmod a+x $ac_file ;;
"bin/tntrancid":F) chmod a+x $ac_file ;;
+ "bin/trancid":F) chmod a+x $ac_file ;;
"bin/xrancid":F) chmod a+x $ac_file ;;
"bin/zrancid":F) chmod a+x $ac_file ;;
"share/rtrfilter":F) chmod a+x $ac_file ;;
@@ -8535,6 +8795,11 @@ _ACEOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -8556,4 +8821,8 @@ if test "$no_create" != yes; then
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
diff --git a/configure.in b/configure.in
index a3962a6..2156e59 100644
--- a/configure.in
+++ b/configure.in
@@ -447,20 +447,24 @@ AC_CONFIG_FILES(bin/blogin bin/brancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/cat5rancid bin/clogin bin/rancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/cssrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/elogin bin/erancid, [chmod a+x $ac_file])
+AC_CONFIG_FILES(bin/f5rancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/f10rancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/flogin bin/francid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/fnrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/hlogin bin/hrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/htlogin bin/htrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/jlogin bin/jrancid bin/jerancid, [chmod a+x $ac_file])
-AC_CONFIG_FILES(bin/mrancid, [chmod a+x $ac_file])
+AC_CONFIG_FILES(bin/mrancid bin/mrvlogin bin/mrvrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/nlogin bin/nrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/nslogin bin/nsrancid, [chmod a+x $ac_file])
+AC_CONFIG_FILES(bin/nxrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/prancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/rivlogin bin/rivrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/rrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/srancid, [chmod a+x $ac_file])
+AC_CONFIG_FILES(bin/tlogin, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/tntlogin bin/tntrancid, [chmod a+x $ac_file])
+AC_CONFIG_FILES(bin/trancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/xrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(bin/zrancid, [chmod a+x $ac_file])
AC_CONFIG_FILES(share/rtrfilter, [chmod a+x $ac_file])
diff --git a/etc/Makefile.in b/etc/Makefile.in
index 345707d..539567e 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -168,6 +168,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
diff --git a/include/Makefile.in b/include/Makefile.in
index 1fca117..2a25207 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -164,6 +164,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@@ -231,8 +232,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -244,8 +245,8 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -255,13 +256,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
diff --git a/include/version.h b/include/version.h
index 5c759af..910c687 100644
--- a/include/version.h
+++ b/include/version.h
@@ -4,6 +4,6 @@
/* pkg version */
char package[] = "rancid";
-char version[] = "2.3.2a8";
+char version[] = "2.3.2a9";
#endif
diff --git a/include/version.h.in b/include/version.h.in
index 5c759af..910c687 100644
--- a/include/version.h.in
+++ b/include/version.h.in
@@ -4,6 +4,6 @@
/* pkg version */
char package[] = "rancid";
-char version[] = "2.3.2a8";
+char version[] = "2.3.2a9";
#endif
diff --git a/man/Makefile.am b/man/Makefile.am
index 585c7a2..bcdd17b 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -55,11 +55,11 @@ man_nogen_MANS = agmrancid.1 alogin.1 arancid.1 avologin.1 avorancid.1 \
control_rancid.1 cssrancid.1 elogin.1 erancid.1 f10rancid.1 \
flogin.1 fnrancid.1 francid.1 hlogin.1 hrancid.1 \
htlogin.1 htrancid.1 jerancid.1 jlogin.1 jrancid.1 \
- mrancid.1 nlogin.1 nrancid.1 nslogin.1 nsrancid.1 \
+ mrancid.1 nlogin.1 nrancid.1 nslogin.1 nsrancid.1 nxrancid.1 \
par.1 prancid.1 rancid-cvs.1 rancid-run.1 rancid.1 \
rancid_intro.1 rivlogin.1 rivrancid.1 router.db.5 \
- rrancid.1 srancid.1 tntlogin.1 tntrancid.1 xrancid.1 \
- zrancid.1
+ rrancid.1 srancid.1 tlogin.1 tntlogin.1 tntrancid.1 trancid.1 \
+ xrancid.1 zrancid.1
man_MANS = $(man_nogen_MANS) $(man_gen_MANS)
diff --git a/man/Makefile.in b/man/Makefile.in
index c2a23de..10f764c 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -165,6 +165,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies
@@ -174,11 +175,11 @@ man_nogen_MANS = agmrancid.1 alogin.1 arancid.1 avologin.1 avorancid.1 \
control_rancid.1 cssrancid.1 elogin.1 erancid.1 f10rancid.1 \
flogin.1 fnrancid.1 francid.1 hlogin.1 hrancid.1 \
htlogin.1 htrancid.1 jerancid.1 jlogin.1 jrancid.1 \
- mrancid.1 nlogin.1 nrancid.1 nslogin.1 nsrancid.1 \
+ mrancid.1 nlogin.1 nrancid.1 nslogin.1 nsrancid.1 nxrancid.1 \
par.1 prancid.1 rancid-cvs.1 rancid-run.1 rancid.1 \
rancid_intro.1 rivlogin.1 rivrancid.1 router.db.5 \
- rrancid.1 srancid.1 tntlogin.1 tntrancid.1 xrancid.1 \
- zrancid.1
+ rrancid.1 srancid.1 tlogin.1 tntlogin.1 tntrancid.1 trancid.1 \
+ xrancid.1 zrancid.1
man_MANS = $(man_nogen_MANS) $(man_gen_MANS)
EXTRA_DIST = $(man_nogen_MANS) $(man_gen_MANS:%=%.in)
diff --git a/man/clogin.1 b/man/clogin.1
index 1f22ff2..077403c 100644
--- a/man/clogin.1
+++ b/man/clogin.1
@@ -1,6 +1,6 @@
.\"
.hys 50
-.TH "clogin" "1" "7 February 2008"
+.TH "clogin" "1" "27 February 2008"
.SH NAME
clogin \- Cisco/Foundry login script
.SH SYNOPSIS
@@ -65,6 +65,7 @@ Juniper Networks,
Netscreen firewalls,
Netscaler,
Riverstone,
+Netopia,
and Lucent TNT,
named
.B alogin,
@@ -78,6 +79,7 @@ named
.B nlogin,
.B nslogin,
.B rivlogin,
+.B tlogin,
and
.B tntlogin,
respectively.
diff --git a/man/nxrancid.1 b/man/nxrancid.1
new file mode 100644
index 0000000..b4633ee
--- /dev/null
+++ b/man/nxrancid.1
@@ -0,0 +1 @@
+.so man1/rancid.1
diff --git a/man/rancid.1 b/man/rancid.1
index 18e3c39..e2695ee 100644
--- a/man/rancid.1
+++ b/man/rancid.1
@@ -1,6 +1,6 @@
.\"
.hys 50
-.TH "rancid" "1" "24 January 2007"
+.TH "rancid" "1" "27 February 2008"
.SH NAME
rancid \- Cisco configuration filter
.SH SYNOPSIS
@@ -47,6 +47,9 @@ ADC-kentrox EZ-T3 mux
.B f10rancid
Force10
.TP
+.B f5rancid
+F5 BigIPs
+.TP
.B fnrancid
Fortinet Firewalls
.TP
@@ -74,6 +77,9 @@ Netscreen firewalls
.B nsrancid
Netscaler
.TP
+.B nxrancid
+Cisco Nexus boxes
+.TP
.B prancid
Procket Networks
.TP
@@ -86,6 +92,9 @@ Redback
.B srancid
SMC switch (some Dell OEMs)
.TP
+.B trancid
+Netopia sDSL/T1 routers
+.TP
.B tntrancid
Lucent TNT
.TP
diff --git a/man/router.db.5 b/man/router.db.5
index a58e3be..5d65880 100644
--- a/man/router.db.5
+++ b/man/router.db.5
@@ -49,6 +49,12 @@ The type of device from the set:
.RS 8n
.TP
.ID 15n
+.B agm
+A Cisco Anomoly Guard Module (aka Riverhead).
+Suspect that at some point the UI will become more cisco-like and it
+can be merged with the IOS rancid module.
+.TP
+.ID 15n
.B alteon
An Alteon WebOS switches.
.TP
@@ -75,6 +81,10 @@ A Cisco router, PIX, or switch such as the 3500XL or 6000 running IOS (or
IOS-like) OS.
.TP
.ID 15n
+.B cisco-nx
+A Cisco Nexus switch/router.
+.TP
+.ID 15n
.B css
A Cisco content services switch.
.TP
@@ -144,12 +154,6 @@ A Procket router.
A Redback router, NAS, etc.
.TP
.ID 15n
-.B riverhead
-A Cisco Anomoly Guard Module (aka Riverhead).
-We suspect that at some point the UI will become more cisco-like and it
-can be merged with the IOS rancid module.
-.TP
-.ID 15n
.B riverstone
A Riverstone NAS or Cabletron (starting with version ~9.0.3) router.
.TP
diff --git a/man/tlogin.1 b/man/tlogin.1
new file mode 100644
index 0000000..4c83247
--- /dev/null
+++ b/man/tlogin.1
@@ -0,0 +1 @@
+.so man1/clogin.1
diff --git a/man/trancid.1 b/man/trancid.1
new file mode 100644
index 0000000..b4633ee
--- /dev/null
+++ b/man/trancid.1
@@ -0,0 +1 @@
+.so man1/rancid.1
diff --git a/share/Makefile.am b/share/Makefile.am
index 76b8fa4..90ccae0 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -3,7 +3,7 @@
## $Id$
##
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -53,7 +53,7 @@ dist_pkgdata_SCRIPTS=getipacctg
dist_pkgdata_DATA=README.misc cisco-load.exp cisco-reload.exp \
index.html lgnotes.html
-EXTRA_DIST = rtrfilter.in downreport.in
+EXTRA_DIST = rancid.spec rtrfilter.in downreport.in
CLEANFILES= downreport
diff --git a/share/Makefile.in b/share/Makefile.in
index 362b3d4..ac8858b 100644
--- a/share/Makefile.in
+++ b/share/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -175,6 +175,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@@ -185,7 +186,7 @@ dist_pkgdata_SCRIPTS = getipacctg
dist_pkgdata_DATA = README.misc cisco-load.exp cisco-reload.exp \
index.html lgnotes.html
-EXTRA_DIST = rtrfilter.in downreport.in
+EXTRA_DIST = rancid.spec rtrfilter.in downreport.in
CLEANFILES = downreport
# auto_edit does the autoconf variable substitution. This allows the
diff --git a/share/rancid.spec b/share/rancid.spec
new file mode 100644
index 0000000..3d2ada7
--- /dev/null
+++ b/share/rancid.spec
@@ -0,0 +1,113 @@
+Name: rancid
+Version: 2.3.2a8
+Release: 2%{?dist}
+Summary: Really Awesome New Cisco confIg Differ
+
+Group: Applications/System
+License: non-free
+URL: http://www.shrubbery.net/rancid/
+Source: rancid-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Requires: cvs expect >= 5.40
+
+%package lg
+Summary: RANCID Looking Glass CGI scripts
+Group: Applications/System
+
+%description
+Rancid is a "Really Awesome New Cisco confIg Differ" developed to
+maintain CVS controlled copies of router configs. Rancid is not limited
+to Cisco devices. It currently supports Cisco routers, Juniper routers,
+Catalyst switches, Foundry switches, Redback NASs, ADC EZT3 muxes, MRTd
+(and thus likely IRRd), Alteon switches, and HP procurve switches and a
+host of others.
+
+%description lg
+RANCID also includes looking glass software. It is based on Ed Kern's
+looking glass which was once used for http://nitrous.digex.net/, for the
+old-school folks who remember it. Our version has added functions, supports
+cisco, juniper, and foundry and uses the login scripts that come with
+rancid; so it can use telnet or ssh to connect to your devices(s).
+
+%prep
+%setup -q
+
+%build
+%configure --localstatedir=%{_localstatedir}/rancid
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+# Get rid of unwanted /usr/share/rancid install
+rm -rf $RPM_BUILD_ROOT/%{_datadir}/rancid
+# Move lg CGI scripts to CGI directory
+mkdir -p $RPM_BUILD_ROOT/var/www/cgi-bin
+mv $RPM_BUILD_ROOT/%{_bindir}/*.cgi $RPM_BUILD_ROOT/var/www/cgi-bin
+# Workaround for the stupid rpmbuild to NOT search for dependencies in the
+# documentation. We need to do it here as %doc ignores %attr.
+find share -type f -print | xargs chmod a-x
+# Install the sample .cloginrc file
+cp cloginrc.sample $RPM_BUILD_ROOT/%{_localstatedir}/rancid/.cloginrc
+
+%pre
+if [ $1 -eq 1 ]; then
+ egrep -q '^rancid:' /etc/passwd || useradd -M -r -d %{_localstatedir}/rancid -c "RANCID User" rancid
+fi
+
+%postun
+if [ $1 -eq 0 ]; then
+ # It's a matter of taste if we should remove the user on uninstall or not
+ userdel rancid
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc BUGS CHANGES COPYING FAQ README UPGRADING Todo
+%doc share/cisco-load.exp share/cisco-reload.exp
+%doc share/downreport share/getipacctg share/rtrfilter
+%config(noreplace) /etc/rancid.conf
+%{_bindir}/*
+%{_mandir}/man1/[a-k]*
+%{_mandir}/man1/[m-z]*
+%{_mandir}/man5/[a-k]*
+%{_mandir}/man5/[m-z]*
+%dir %attr(770,rancid,rancid) %{_localstatedir}/rancid
+%config(noreplace) %attr(640,rancid,rancid) %{_localstatedir}/rancid/.cloginrc
+
+%files lg
+%config(noreplace) /etc/lg.conf
+%{_mandir}/man1/lg_intro*
+%{_mandir}/man5/lg.conf*
+/var/www/cgi-bin/*
+%doc README.lg
+
+%changelog
+* Fri Feb 15 2008 Steve Snodgrass <ssnodgra@xxxxxxxx> 2.3.2a8-1
+- Install .cloginrc as a configuration file
+- Don't try to create the rancid user if it already exists
+
+* Wed Feb 13 2008 Steve Snodgrass <ssnodgra@xxxxxxxx> 2.3.2a8-1
+- Create subpackage for looking glass CGI scripts
+- Include configuration files in RPM
+- Many other tweaks
+
+* Wed Nov 16 2005 Michael Stefaniuc <mstefani@xxxxxxxxxx> 2.3.1-3
+- Use /var/rancid as localstatedir
+- Create the rancid user on install and remove it on uninstall
+- Use %doc correctly
+
+* Wed Nov 02 2005 Michael Stefaniuc <mstefani@xxxxxxxxxx> 2.3.1-2
+- Original spec file by Dan Pfleger.
+- Add a changelog.
+- Make the formating of the spec file adhere to the Fedora Extras Packaging
+ guidelines.
+- New %description based on the README and the website.
+- Add cvs Requires.
+- Changed Group
+- Use macros in the files section. Simplify it.
+- Do not install the looking glass cgi's. Those make rpm pull in more perl
+ module dependencies.