From: Patrick M. <ume...@us...> - 2007-05-23 18:33:51
|
Update of /cvsroot/radmind/radmind In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5511 Modified Files: Makefile.in configure configure.ac ra.sh Log Message: ./configure searches for the echo binary for ra.sh. This is to address where the built-in echo doesn't support "-n". Index: Makefile.in =================================================================== RCS file: /cvsroot/radmind/radmind/Makefile.in,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** Makefile.in 22 Jan 2007 19:33:30 -0000 1.100 --- Makefile.in 23 May 2007 18:33:45 -0000 1.101 *************** *** 24,27 **** --- 24,28 ---- TLS_CERT=${CERTDIR}/cert.pem GNU_DIFF=@diffpath@ + ECHO=@echopath@ MKTEMP=@mktemppath@ RADMIND_HOST=@server@ *************** *** 253,256 **** --- 254,258 ---- -e 's@_RADMIND_COMMANDFILE@${COMMANDFILE}@g' \ -e 's@_RADMIND_VERSION@$(shell cat VERSION)@g' \ + -e 's@_RADMIND_ECHO_PATH@${ECHOPATH}@g' \ ${srcdir}/ra.sh > tmp/ra.sh; Index: configure.ac =================================================================== RCS file: /cvsroot/radmind/radmind/configure.ac,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** configure.ac 9 Mar 2007 14:33:04 -0000 1.40 --- configure.ac 23 May 2007 18:33:45 -0000 1.41 *************** *** 9,12 **** --- 9,13 ---- # Set up variables AC_ARG_VAR(diffpath, [path to diff utility]) + AC_ARG_VAR(echopath, [path to echo utility]) AC_ARG_WITH(server, AC_HELP_STRING([--with-server=SERVER], [default radmind server]), server="$withval", server="radmind" ) *************** *** 38,41 **** --- 39,43 ---- AC_PROG_INSTALL AC_PATH_PROG(diffpath, diff) + AC_PATH_PROG(echopath, echo) AC_PATH_PROG(mktemppath, mktemp) AC_SYS_LARGEFILE Index: ra.sh =================================================================== RCS file: /cvsroot/radmind/radmind/ra.sh,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ra.sh 23 Feb 2007 20:21:14 -0000 1.39 --- ra.sh 23 May 2007 18:33:45 -0000 1.40 *************** *** 35,38 **** --- 35,39 ---- CHECKEDOUT="_RADMIND_DIR/client/.CheckedOut" MAILDOMAIN="_RADMIND_MAIL_DOMAIN" + ECHO="_RADMIND_ECHO_PATH" VERSION=_RADMIND_VERSION *************** *** 49,53 **** RASHTMP=`${MKTEMP} -qd "${TMPDIR}/.ra.$$.XXXXXX"` if [ $? -ne 0 ]; then ! echo "mktemp failed" exit 1 fi --- 50,54 ---- RASHTMP=`${MKTEMP} -qd "${TMPDIR}/.ra.$$.XXXXXX"` if [ $? -ne 0 ]; then ! $ECHO "mktemp failed" exit 1 fi *************** *** 65,69 **** Yn() { ! echo -n "$*" "[Yn] " read ans if [ $? -ne 0 ]; then --- 66,70 ---- Yn() { ! $ECHO -n "$*" "[Yn] " read ans if [ $? -ne 0 ]; then *************** *** 85,89 **** usage() { ! echo "Usage: $0 [ -ctV ] [ -h server ] [ -w authlevel ] { trip | update | create | auto | force | checkout | checkin } [ /path/or/file ]" >&2 exit 1 } --- 86,90 ---- usage() { ! $ECHO "Usage: $0 [ -ctV ] [ -h server ] [ -w authlevel ] { trip | update | create | auto | force | checkout | checkin } [ /path/or/file ]" >&2 exit 1 } *************** *** 130,134 **** checkedout if [ $? -eq 1 ]; then ! echo "Checked out by ${OWNER}" if [ x"$opt" = x"interactive" -a x"$USER" = x"$OWNER" ]; then Yn "Continue with update?" --- 131,135 ---- checkedout if [ $? -eq 1 ]; then ! $ECHO "Checked out by ${OWNER}" if [ x"$opt" = x"interactive" -a x"$USER" = x"$OWNER" ]; then Yn "Continue with update?" *************** *** 161,165 **** RC=$? if [ $RC -ne 1 ]; then ! echo Nothing to update cleanup exit $RC --- 162,166 ---- RC=$? if [ $RC -ne 1 ]; then ! $ECHO Nothing to update cleanup exit $RC *************** *** 182,186 **** if [ ! -s ${FTMP} ]; then ! echo Nothing to apply. cleanup exit 0 --- 183,187 ---- if [ ! -s ${FTMP} ]; then ! $ECHO Nothing to apply. cleanup exit 0 *************** *** 206,212 **** while [ 1 ]; do if [ x"${can_edit}" = x"yes" ]; then ! echo -n "(e)dit difference transcript, " fi ! echo -n "(a)pply or (c)ancel? " read ans --- 207,213 ---- while [ 1 ]; do if [ x"${can_edit}" = x"yes" ]; then ! $ECHO -n "(e)dit difference transcript, " fi ! $ECHO -n "(a)pply or (c)ancel? " read ans *************** *** 221,226 **** c|C) ! echo ! echo Update cancelled cleanup exit 0 --- 222,227 ---- c|C) ! $ECHO ! $ECHO Update cancelled cleanup exit 0 *************** *** 245,255 **** *) if [ x"$opt" = x"hook" ]; then ! echo -n "Applying changes failed, trying again " ! echo "in ${RETRY} seconds..." sleep ${RETRY} RETRY=${RETRY}0 ! echo %OPENDRAWER ! echo %BEGINPOLE else cleanup --- 246,256 ---- *) if [ x"$opt" = x"hook" ]; then ! $ECHO -n "Applying changes failed, trying again " ! $ECHO "in ${RETRY} seconds..." sleep ${RETRY} RETRY=${RETRY}0 ! $ECHO %OPENDRAWER ! $ECHO %BEGINPOLE else cleanup *************** *** 309,313 **** ;; ! V) echo ${VERSION} exit 0 ;; --- 310,314 ---- ;; ! V) $ECHO ${VERSION} exit 0 ;; *************** *** 333,337 **** mkdir -m 700 "${RASHTMP}" if [ $? -ne 0 ]; then ! echo "Cannot create temporary directory $RASHTMP" exit 1 fi --- 334,338 ---- mkdir -m 700 "${RASHTMP}" if [ $? -ne 0 ]; then ! $ECHO "Cannot create temporary directory $RASHTMP" exit 1 fi *************** *** 344,348 **** checkout) if [ ${USER} = root ]; then ! echo -n "Username? [root] " read ans USER=${ans:-root} --- 345,349 ---- checkout) if [ ${USER} = root ]; then ! $ECHO -n "Username? [root] " read ans USER=${ans:-root} *************** *** 350,354 **** checkedout if [ $? -eq 1 ]; then ! echo "Already checked out by ${OWNER}" if [ x${OWNER} = x${USER} ]; then exit 1 --- 351,355 ---- checkedout if [ $? -eq 1 ]; then ! $ECHO "Already checked out by ${OWNER}" if [ x${OWNER} = x${USER} ]; then exit 1 *************** *** 358,364 **** exit 1 fi ! echo ${USER} has removed your checkout on `hostname` | mail -s `hostname`": Checkout broken" ${OWNER}@${MAILDOMAIN:-`hostname`} fi ! echo ${USER} > ${CHECKEDOUT} ;; --- 359,365 ---- exit 1 fi ! $ECHO ${USER} has removed your checkout on `hostname` | mail -s `hostname`": Checkout broken" ${OWNER}@${MAILDOMAIN:-`hostname`} fi ! $ECHO ${USER} > ${CHECKEDOUT} ;; *************** *** 366,379 **** checkedout if [ $? -eq 0 ]; then ! echo "Not checked out" exit 1 fi if [ ${USER} = root ]; then ! echo -n "Username? [root] " read ans USER=${ans:-root} fi if [ x${OWNER} != x${USER} ]; then ! echo "Currently checked out by ${OWNER}" exit 1 fi --- 367,380 ---- checkedout if [ $? -eq 0 ]; then ! $ECHO "Not checked out" exit 1 fi if [ ${USER} = root ]; then ! $ECHO -n "Username? [root] " read ans USER=${ans:-root} fi if [ x${OWNER} != x${USER} ]; then ! $ECHO "Currently checked out by ${OWNER}" exit 1 fi *************** *** 397,401 **** RC=$? if [ $RC -ne 1 ]; then ! echo Nothing to update cleanup exit $RC --- 398,402 ---- RC=$? if [ $RC -ne 1 ]; then ! $ECHO Nothing to update cleanup exit $RC *************** *** 408,412 **** ;; esac ! echo -n "Enter new transcript name [`hostname | cut -d. -f1`-`date +%Y%m%d`-${USER}.T]: " read TNAME if [ -z "${TNAME}" ]; then --- 409,413 ---- ;; esac ! $ECHO -n "Enter new transcript name [`hostname | cut -d. -f1`-`date +%Y%m%d`-${USER}.T]: " read TNAME if [ -z "${TNAME}" ]; then *************** *** 420,424 **** fi if [ ! -s ${FTMP} ]; then ! echo Nothing to create. cleanup exit 1 --- 421,425 ---- fi if [ ! -s ${FTMP} ]; then ! $ECHO Nothing to create. cleanup exit 1 *************** *** 432,436 **** if [ -n "${USERAUTH}" ]; then if [ -z "${USERNAME}" ]; then ! echo -n "username: " read USERNAME fi --- 433,437 ---- if [ -n "${USERAUTH}" ]; then if [ -z "${USERNAME}" ]; then ! $ECHO -n "username: " read USERNAME fi *************** *** 449,453 **** trip) if [ ! -f ${KFILE} ]; then ! echo Command file missing, skipping tripwire. cleanup exit 1 --- 450,454 ---- trip) if [ ! -f ${KFILE} ]; then ! $ECHO Command file missing, skipping tripwire. cleanup exit 1 *************** *** 459,463 **** ;; 1) ! echo Command file and/or transcripts are out of date. ;; *) --- 460,464 ---- ;; 1) ! $ECHO Command file and/or transcripts are out of date. ;; *) *************** *** 473,477 **** fi if [ -s ${FTMP} ]; then ! echo Trip failure: `hostname` cat ${FTMP} cleanup --- 474,478 ---- fi if [ -s ${FTMP} ]; then ! $ECHO Trip failure: `hostname` cat ${FTMP} cleanup *************** *** 483,497 **** checkedout if [ $? -eq 1 ]; then ! echo "Checked out by ${OWNER}" exit 1 fi fsdiff -C ${CASE} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then ! echo Auto failure: `hostname` fsdiff cleanup exit 1 fi if [ -s ${FTMP} ]; then ! echo Auto failure: `hostname` trip cat ${FTMP} cleanup --- 484,498 ---- checkedout if [ $? -eq 1 ]; then ! $ECHO "Checked out by ${OWNER}" exit 1 fi fsdiff -C ${CASE} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then ! $ECHO Auto failure: `hostname` fsdiff cleanup exit 1 fi if [ -s ${FTMP} ]; then ! $ECHO Auto failure: `hostname` trip cat ${FTMP} cleanup *************** *** 505,509 **** fsdiff -A ${CASE} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then ! echo Auto failure: `hostname`: fsdiff cleanup exit 1 --- 506,510 ---- fsdiff -A ${CASE} ${CHECKSUM} -o ${FTMP} ${FSDIFFROOT} if [ $? -ne 0 ]; then ! $ECHO Auto failure: `hostname`: fsdiff cleanup exit 1 *************** *** 515,519 **** case $? in 0) ! echo Auto update: `hostname` cat ${FTMP} dopostapply ${FTMP} --- 516,520 ---- case $? in 0) ! $ECHO Auto update: `hostname` cat ${FTMP} dopostapply ${FTMP} *************** *** 524,533 **** *) if [ ${RETRY} -gt 10000 ]; then ! echo Auto failure: `hostname` cat ${LTMP} cleanup exit 1 fi ! echo Auto failure: `hostname` retrying cat ${LTMP} sleep ${RETRY} --- 525,534 ---- *) if [ ${RETRY} -gt 10000 ]; then ! $ECHO Auto failure: `hostname` cat ${LTMP} cleanup exit 1 fi ! $ECHO Auto failure: `hostname` retrying cat ${LTMP} sleep ${RETRY} *************** *** 537,541 **** esac else ! echo Nothing to apply. cleanup exit 0 --- 538,542 ---- esac else ! $ECHO Nothing to apply. cleanup exit 0 *************** *** 548,552 **** checkedout if [ $? -eq 1 ]; then ! echo "Checked out by ${OWNER}" exit 1 fi --- 549,553 ---- checkedout if [ $? -eq 1 ]; then ! $ECHO "Checked out by ${OWNER}" exit 1 fi *************** *** 568,572 **** if [ ! -s ${FTMP} ]; then ! echo Nothing to apply. cleanup exit 0 --- 569,573 ---- if [ ! -s ${FTMP} ]; then ! $ECHO Nothing to apply. cleanup exit 0 Index: configure =================================================================== RCS file: /cvsroot/radmind/radmind/configure,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** configure 9 Mar 2007 14:33:04 -0000 1.50 --- configure 23 May 2007 18:33:45 -0000 1.51 *************** *** 315,319 **** ac_subdirs_all="$ac_subdirs_all libsnet" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS diffpath server authlevel radminddir maxconnections maildomain build_date build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA mktemppath CPP EGREP OPTOPTS subdirs LIBOBJS LTLIBOBJS' ac_subst_files='' --- 315,319 ---- ac_subdirs_all="$ac_subdirs_all libsnet" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS diffpath echopath server authlevel radminddir maxconnections maildomain build_date build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA mktemppath CPP EGREP OPTOPTS subdirs LIBOBJS LTLIBOBJS' ac_subst_files='' *************** *** 760,763 **** --- 760,767 ---- ac_cv_env_diffpath_set=${diffpath+set} ac_cv_env_diffpath_value=$diffpath + ac_env_echopath_set=${echopath+set} + ac_env_echopath_value=$echopath + ac_cv_env_echopath_set=${echopath+set} + ac_cv_env_echopath_value=$echopath ac_env_CC_set=${CC+set} ac_env_CC_value=$CC *************** *** 877,880 **** --- 881,885 ---- Some influential environment variables: diffpath path to diff utility + echopath path to echo utility CC C compiler command CFLAGS C compiler flags *************** *** 1346,1349 **** --- 1351,1355 ---- + # Check whether --with-server or --without-server was given. if test "${with_server+set}" = set; then *************** *** 2621,2624 **** --- 2627,2669 ---- fi + # Extract the first word of "echo", so it can be a program name with args. + set dummy echo; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_path_echopath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $echopath in + [\\/]* | ?:[\\/]*) + ac_cv_path_echopath="$echopath" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_echopath="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + ;; + esac + fi + echopath=$ac_cv_path_echopath + + if test -n "$echopath"; then + echo "$as_me:$LINENO: result: $echopath" >&5 + echo "${ECHO_T}$echopath" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + # Extract the first word of "mktemp", so it can be a program name with args. set dummy mktemp; ac_word=$2 *************** *** 6024,6027 **** --- 6069,6073 ---- s,@LIBS@,$LIBS,;t t s,@diffpath@,$diffpath,;t t + s,@echopath@,$echopath,;t t s,@server@,$server,;t t s,@authlevel@,$authlevel,;t t |