summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTar Committer <tar@ocjtech.us>2000-11-24 22:14:14 +0000
committerTar Committer <tar@ocjtech.us>2000-11-24 22:14:14 +0000
commit25c2b7c2c8a333b276c3499bcce004137d4b4fe0 (patch)
treebaad136bdfcea88812dd658a682f126d1af4dfc3 /bin
parent1651adc35224e149715bd85af4ba108c5ee184bc (diff)
downloadrancid-25c2b7c2c8a333b276c3499bcce004137d4b4fe0.tar.gz
rancid-25c2b7c2c8a333b276c3499bcce004137d4b4fe0.tar.xz
rancid-25c2b7c2c8a333b276c3499bcce004137d4b4fe0.zip
Imported from rancid-2.1b.tar.gz.rancid-2.1b
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile.in4
-rwxr-xr-xbin/clogin.in5
-rwxr-xr-xbin/configure349
-rw-r--r--bin/configure.in25
-rwxr-xr-xbin/elogin.in5
-rw-r--r--bin/env.in1
-rwxr-xr-xbin/flogin.in5
-rwxr-xr-xbin/jlogin.in5
-rwxr-xr-xbin/rancid.in11
9 files changed, 27 insertions, 383 deletions
diff --git a/bin/Makefile.in b/bin/Makefile.in
index ca5616b..8a97def 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -3,8 +3,8 @@ PREFIX = @prefix@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-BIN_PROGS = @RD_BIN_PROGS@
-BIN_DATAS = @RD_BIN_DATAS@
+BIN_PROGS=@RD_BIN_PROGS@
+BIN_DATAS=@RD_BIN_DATAS@
all:
diff --git a/bin/clogin.in b/bin/clogin.in
index bfe3ae1..e239d50 100755
--- a/bin/clogin.in
+++ b/bin/clogin.in
@@ -248,7 +248,10 @@ proc source_password_file { } {
send_user "Error: $password_file must not be world readable/writable\n"
exit 1
}
- source $password_file
+ if [ catch {source $password_file} reason ] {
+ send_user "Error: $reason\n"
+ exit 1
+ }
}
# Log into the router.
diff --git a/bin/configure b/bin/configure
index b586b8d..b0770e7 100755
--- a/bin/configure
+++ b/bin/configure
@@ -619,345 +619,7 @@ PERLV_PATH=$ac_cv_path_PERLV_PATH
EXPECT_PATH=$ac_cv_path_EXPECT_PATH
-# locate tools to build $PATH for env. order is significant. want to be
-# sure that we pick up the the proper diff and ucbmail in bin/env.
-unset ENV_PATH
-# Extract the first word of "diff", so it can be a program name with args.
-set dummy diff; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:629: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_DIFF'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$DIFF" in
- /*)
- ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_DIFF="$DIFF" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_DIFF="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_DIFF" && ac_cv_path_DIFF="no"
- ;;
-esac
-fi
-DIFF="$ac_cv_path_DIFF"
-if test -n "$DIFF"; then
- echo "$ac_t""$DIFF" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH=`dirname $ac_cv_path_DIFF`
-# Extract the first word of "Mail", so it can be a program name with args.
-set dummy Mail; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:666: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_UCBMAIL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$UCBMAIL" in
- /*)
- ac_cv_path_UCBMAIL="$UCBMAIL" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_UCBMAIL="$UCBMAIL" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_UCBMAIL="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_UCBMAIL" && ac_cv_path_UCBMAIL="no"
- ;;
-esac
-fi
-UCBMAIL="$ac_cv_path_UCBMAIL"
-if test -n "$UCBMAIL"; then
- echo "$ac_t""$UCBMAIL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_UCBMAIL`"
-# Extract the first word of "cvs", so it can be a program name with args.
-set dummy cvs; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:703: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$CVS" in
- /*)
- ac_cv_path_CVS="$CVS" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_CVS="$CVS" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_CVS="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_CVS" && ac_cv_path_CVS="no"
- ;;
-esac
-fi
-CVS="$ac_cv_path_CVS"
-if test -n "$CVS"; then
- echo "$ac_t""$CVS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_CVS`"
-# Extract the first word of "comm", so it can be a program name with args.
-set dummy comm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:740: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_COMM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$COMM" in
- /*)
- ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_COMM="$COMM" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_COMM="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_COMM" && ac_cv_path_COMM="no"
- ;;
-esac
-fi
-COMM="$ac_cv_path_COMM"
-if test -n "$COMM"; then
- echo "$ac_t""$COMM" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_COMM`"
-# Extract the first word of "mkdir", so it can be a program name with args.
-set dummy mkdir; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:777: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$MKDIR" in
- /*)
- ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_MKDIR="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="no"
- ;;
-esac
-fi
-MKDIR="$ac_cv_path_MKDIR"
-if test -n "$MKDIR"; then
- echo "$ac_t""$MKDIR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_MKDIR`"
-# Extract the first word of "dirname", so it can be a program name with args.
-set dummy dirname; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:814: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_DIRNAME'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$DIRNAME" in
- /*)
- ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_DIRNAME="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_DIRNAME" && ac_cv_path_DIRNAME="no"
- ;;
-esac
-fi
-DIRNAME="$ac_cv_path_DIRNAME"
-if test -n "$DIRNAME"; then
- echo "$ac_t""$DIRNAME" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_DIRNAME`"
-# Extract the first word of "touch", so it can be a program name with args.
-set dummy touch; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:851: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$TOUCH" in
- /*)
- ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_TOUCH="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_TOUCH" && ac_cv_path_TOUCH="no"
- ;;
-esac
-fi
-TOUCH="$ac_cv_path_TOUCH"
-if test -n "$TOUCH"; then
- echo "$ac_t""$TOUCH" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_TOUCH`"
-# Extract the first word of "sendmail", so it can be a program name with args.
-set dummy sendmail; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:888: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$SENDMAIL" in
- /*)
- ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="no"
- ;;
-esac
-fi
-SENDMAIL="$ac_cv_path_SENDMAIL"
-if test -n "$SENDMAIL"; then
- echo "$ac_t""$SENDMAIL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SENDMAIL`"
-# Extract the first word of "sort", so it can be a program name with args.
-set dummy sort; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:925: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SORT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$SORT" in
- /*)
- ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_SORT="$SORT" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_SORT="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_SORT" && ac_cv_path_SORT="no"
- ;;
-esac
-fi
-SORT="$ac_cv_path_SORT"
-if test -n "$SORT"; then
- echo "$ac_t""$SORT" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SORT`"
-ENV_PATH="$ENV_PATH:/usr/local/bin:/usr/bin"
-
-ENV_PATH=`echo $ENV_PATH | $PERLV_PATH -e 'foreach $x(split(":",<>)){next unless (length($x));push(@F, $x),$seen{$x}=1 unless (defined $seen{$x});}print join(":",@F);'`
+ENV_PATH=$ac_cv_env_path
trap '' 1 2 15
@@ -1112,15 +774,6 @@ s%@RD_BIN_DATAS@%$RD_BIN_DATAS%g
s%@RD_BIN_PROGS@%$RD_BIN_PROGS%g
s%@PERLV_PATH@%$PERLV_PATH%g
s%@EXPECT_PATH@%$EXPECT_PATH%g
-s%@DIFF@%$DIFF%g
-s%@UCBMAIL@%$UCBMAIL%g
-s%@CVS@%$CVS%g
-s%@COMM@%$COMM%g
-s%@MKDIR@%$MKDIR%g
-s%@DIRNAME@%$DIRNAME%g
-s%@TOUCH@%$TOUCH%g
-s%@SENDMAIL@%$SENDMAIL%g
-s%@SORT@%$SORT%g
s%@ENV_PATH@%$ENV_PATH%g
CEOF
diff --git a/bin/configure.in b/bin/configure.in
index cdade86..02b7d71 100644
--- a/bin/configure.in
+++ b/bin/configure.in
@@ -17,30 +17,7 @@ AC_SUBST(PERLV_PATH)
EXPECT_PATH=$ac_cv_path_EXPECT_PATH
AC_SUBST(EXPECT_PATH)
-# locate tools to build $PATH for env. order is significant. want to be
-# sure that we pick up the the proper diff and ucbmail in bin/env.
-unset ENV_PATH
-AC_PATH_PROG(DIFF,diff,no)
-ENV_PATH=`dirname $ac_cv_path_DIFF`
-AC_PATH_PROG(UCBMAIL,Mail,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_UCBMAIL`"
-AC_PATH_PROG(CVS,cvs,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_CVS`"
-AC_PATH_PROG(COMM,comm,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_COMM`"
-AC_PATH_PROG(MKDIR,mkdir,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_MKDIR`"
-AC_PATH_PROG(DIRNAME,dirname,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_DIRNAME`"
-AC_PATH_PROG(TOUCH,touch,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_TOUCH`"
-AC_PATH_PROG(SENDMAIL,sendmail,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SENDMAIL`"
-AC_PATH_PROG(SORT,sort,no)
-ENV_PATH="$ENV_PATH:`dirname $ac_cv_path_SORT`"
-ENV_PATH="$ENV_PATH:/usr/local/bin:/usr/bin"
-
-ENV_PATH=`echo $ENV_PATH | $PERLV_PATH -e 'foreach $x(split(":",<>)){next unless (length($x));push(@F, $x),$seen{$x}=1 unless (defined $seen{$x});}print join(":",@F);'`
+ENV_PATH=$ac_cv_env_path
AC_SUBST(ENV_PATH)
AC_OUTPUT(Makefile env $RD_BIN_DATAS $RD_BIN_PROGS)
diff --git a/bin/elogin.in b/bin/elogin.in
index e75efed..5ef908b 100755
--- a/bin/elogin.in
+++ b/bin/elogin.in
@@ -234,7 +234,10 @@ proc source_password_file { } {
send_user "Error: $password_file must not be world readable/writable\n"
exit 1
}
- source $password_file
+ if [ catch {source $password_file} reason ] {
+ send_user "Error: $reason\n"
+ exit 1
+ }
}
# Log into the router.
diff --git a/bin/env.in b/bin/env.in
index 37e9a8b..1a34ce3 100644
--- a/bin/env.in
+++ b/bin/env.in
@@ -15,7 +15,6 @@ TERM=network;export TERM
TMPDIR=/tmp; export TMPDIR
BASEDIR=@prefix@; export BASEDIR
PATH=$BASEDIR/bin:@ENV_PATH@; export PATH
-#PATH=$BASEDIR/bin:/usr/local/bin:/usr/ucb:/usr/bin:/bin:/usr/lib:/usr/sbin;export PATH
CVSROOT=$BASEDIR/CVS; export CVSROOT
#
# if NOPIPE is set, temp files will be used instead of a cmd pipe during
diff --git a/bin/flogin.in b/bin/flogin.in
index 0419bb6..a43ddda 100755
--- a/bin/flogin.in
+++ b/bin/flogin.in
@@ -242,7 +242,10 @@ proc source_password_file { } {
send_user "Error: $password_file must not be world readable/writable\n"
exit 1
}
- source $password_file
+ if [ catch {source $password_file} reason ] {
+ send_user "Error: $reason\n"
+ exit 1
+ }
}
# Log into the router.
diff --git a/bin/jlogin.in b/bin/jlogin.in
index 0718321..28e773b 100755
--- a/bin/jlogin.in
+++ b/bin/jlogin.in
@@ -221,7 +221,10 @@ proc source_password_file { } {
send_user "Error: $password_file must not be world readable/writable\n"
exit 1
}
- source $password_file
+ if [ catch {source $password_file} reason ] {
+ send_user "Error: $reason\n"
+ exit 1
+ }
}
# Log into the router.
diff --git a/bin/rancid.in b/bin/rancid.in
index d7b5fbf..24b9d14 100755
--- a/bin/rancid.in
+++ b/bin/rancid.in
@@ -210,6 +210,9 @@ sub ShowVersion {
} elsif ( $1 =~ /WS-C29/) {
$type = "2900XL";
$device = "switch";
+ } elsif ( $1 =~ /WS-C35/) {
+ $type = "3500XL";
+ $device = "switch";
} else {
$type = $1;
}
@@ -352,7 +355,7 @@ sub ShowGSR {
# This routine parses "show boot"
sub ShowBoot {
- # Pick up boot variables if 7000/7200/7500/12000/2900;
+ # Pick up boot variables if 7000/7200/7500/12000/2900/3500;
# otherwise pick up bootflash.
print STDERR " In ShowBoot: $_" if ($debug);
@@ -369,7 +372,7 @@ sub ShowBoot {
$H0=1; ProcessHistory("COMMENTS","keysort","H0","!\n");
}
if ($type !~ /^(120|7)/) {
- if ($type !~ /^2900/) {
+ if ($type !~ /^(29|35)00/) {
ProcessHistory("COMMENTS","keysort","H2","!BootFlash: $_");
} else {
ProcessHistory("COMMENTS","keysort","H1","!Variable: $_");
@@ -825,8 +828,8 @@ sub WriteTerm {
/^(enable )?(password|passwd) / &&
ProcessHistory("ENABLE","","","!$1$2 <removed>\n") &&
next;
- /^username (\S+) password /&&
- ProcessHistory("USER","keysort","$1","!username $1 password <removed>\n") && next;
+ /^username (\S+)(\s.*)? password /&&
+ ProcessHistory("USER","keysort","$1","!username $1$2 password <removed>\n") && next;
/^\s*password / &&
ProcessHistory("LINE-PASS","","","! password <removed>\n") && next;
/^\s*neighbor (\S*) password / &&