netmrg-0.20/0000775000076400007640000000000011000016361013101 5ustar silfreedsilfreednetmrg-0.20/configure.ac0000664000076400007640000002361610772570211015415 0ustar silfreedsilfreed# Process this file with autoconf to produce a configure script. ############################################################# # # Autoconf requirements # AC_INIT(package, version, bug-report-address) # information on the package # checks for programs # checks for libraries # checks for header files # checks for types # checks for structures # checks for compiler characteristics # checks for library functions # checks for system services # AC_CONFIG_FILES([file...]) # AC_OUTPUT # ############################################################# AC_PREREQ(2.53) AC_INIT(NetMRG,0.20) AC_REVISION($Revision:1281 $) AC_CONFIG_SRCDIR(src/netmrg.cpp) AC_CANONICAL_HOST AM_INIT_AUTOMAKE AM_CONFIG_HEADER(src/include/config.h) AC_PROG_MAKE_SET # We wanna use C++, not that silly C language ;) AC_LANG(C++) # # Autoconf is dumb and doesn't expand ${prefix} for this variable # If it does this in the future, this can probably be removed # if test "x$exec_prefix" = "xNONE"; then if test "x$prefix" = "xNONE" ; then exec_prefix="/usr/local" else exec_prefix="$prefix" fi ac_configure_args="$ac_configure_args --exec-prefix=$exec_prefix" fi # # --with configs # # rrdtool AC_ARG_WITH(rrdtool, AC_HELP_STRING( [--with-rrdtool=PROGRAM], [location of the rrdtool program]), [rrdtool_prog=$withval]) AC_PATH_PROG(RRDTOOL, rrdtool, $rrdtool_prog) if test "x$RRDTOOL" = "x"; then AC_MSG_ERROR([Couldn't find rrdtool. Please verify that it is installed.]) fi # mysql AC_ARG_WITH(mysql_config, AC_HELP_STRING( [--with-mysql_config=PROGRAM], [location of the mysql_config program]), [mysql_config_prog=$withval]) AC_PATH_PROG(MYSQL_CONFIG, mysql_config, $mysql_config_prog) if test "x$MYSQL_CONFIG" = "x"; then AC_MSG_ERROR([Couldn't find mysql_config. Please verify that it is installed.]) fi # snmp AC_ARG_WITH(snmp-include-dir, AC_HELP_STRING( [--with-snmp-include-dir], [SNMP include base directory [[/usr/(local/)include]]]), [snmp_include_dir=$withval]) AC_ARG_WITH(snmp-lib-dir, AC_HELP_STRING( [--with-snmp-lib-dir], [SNMP library directory [[/usr/(local/)lib[64]]]]), [snmp_lib_dir=$withval]) # xml2 AC_ARG_WITH(xml2-include-dir, AC_HELP_STRING( [--with-xml2-include-dir], [XML2 include directory]), [xml2_include_dir=$withval]) AC_ARG_WITH(xml2-lib-dir, AC_HELP_STRING( [--with-xml2-lib-dir], [XML2 library directory]), [xml2_lib_dir=$withval]) # www dir www_dir="${localstatedir}/www/${PACKAGE}" AC_ARG_WITH(www-dir, AC_HELP_STRING( [--with-www-dir], [install directory for web files]), [www_dir=$withval]) AC_SUBST(WWWDIR, $www_dir) # # Special hacks for certain operating systems # # if host_alias is empty, ac_cv_host_alias may still have the info if test -z "$host_alias"; then host_alias=$ac_cv_host_alias fi # Platform-specific tweaks case $host_alias in *solaris*) AC_DEFINE(HAVE_LONG_LONG_SCANF, 1, scanf supports long long) LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" LIBS="-lkstat $LIBS";; *linux*) AC_DEFINE(HAVE_LONG_LONG_SCANF, 1, scanf supports long long);; *freebsd*) CPPFLAGS="$CPPFLAGS -I/usr/local/include";; *openbsd*) LIBS="-ldes $LIBS";; esac ### Checks for programs. AC_PROG_CXX AC_PROG_CPP AC_PROG_INSTALL AC_MSG_CHECKING([whether to enable -Wall]) AC_ARG_ENABLE(warnings, AC_HELP_STRING( [--enable-warnings], [Enable -Wall if using g++]), [ if test -n "$GXX"; then AC_MSG_RESULT(adding -Wall to CPPFLAGS.) CPPFLAGS="$CPPFLAGS -Wall" fi], AC_MSG_RESULT(no)) ### Checks for libraries. AC_CHECK_LIB(intl, bindtextdomain) AC_CHECK_LIB(dl, dlopen) AC_CHECK_LIB(z, compress) AC_CHECK_LIB(pthread, pthread_create, [ CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" LIBS="-lpthread $LIBS" ], AC_CHECK_LIB(c_r, pthread_create, [ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" LIBS="-pthread $LIBS"], AC_MSG_ERROR([POSIX threads not found.]) ) ) AC_CHECK_LIB(stdc++, main) ## Determine XML2 library path # try and find libs without any additional libraries AC_CHECK_LIB(xml2, xmlParseFile, XML2_LIBS=" ", XML2_LIBS= ) # hunt through several directories trying to find the libraries if test "x$XML2_LIBS" = "x"; then old_LDFLAGS="$LDFLAGS" for try in $xml2_lib_dir /usr/lib64 /usr/lib /usr/local/lib ; do LDFLAGS="$old_LDFLAGS -L$try" unset ac_cv_lib_xml2_xmlParseFile AC_CHECK_LIB(xml2, xmlParseFile, XML2_LIBS="-L$try", XML2_LIBS= ) if test "x$XML2_LIBS" != "x"; then break; fi done LDFLAGS="$old_LDFLAGS $XML2_LIBS" fi if test "x$XML2_LIBS" = "x"; then AC_MSG_ERROR([XML2 libraries not found. Use --with-xml2-lib-dir=]) fi # don't forget to add xml2 to the list of libraries LIBS="-lxml2 $LIBS" ## Determine MySQL library path MYSQL_LIBS=$($MYSQL_CONFIG --libs) LIBS="$LIBS $MYSQL_LIBS" # now that we've found the libraries, check for MySQL < 4.0 MYSQL_VERSION=$($MYSQL_CONFIG --version) if test "x${MYSQL_VERSION//.*/}" = "x3"; then AC_DEFINE(OLD_MYSQL, 1, [Old MySQL version]) fi ### Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_CHECK_HEADERS( \ cstdio \ cstdlib \ string \ list \ unistd.h \ netinet/in.h ) ## Determine XML2 include path AC_MSG_CHECKING(for libxml/xmlmemory.h) # Can we include headers using system include dirs? AC_TRY_COMPILE([#include ], [int a = 1;], XML2_INCLUDE=" ", XML2_INCLUDE= ) # hunt through several directories trying to find the includes if test "x$XML2_INCLUDE" = "x"; then old_CPPFLAGS="$CPPFLAGS" for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do CPPFLAGS="$old_CPPFLAGS -I$i" AC_TRY_COMPILE([#include ], [int a = 1;], XML2_INCLUDE="-I$i", XML2_INCLUDE= ) if test "x$XML2_INCLUDE" != "x"; then break; fi done CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE" fi if test "x$XML2_INCLUDE" = "x"; then AC_MSG_RESULT(no) AC_MSG_ERROR([XML2 headers not found. Use --with-xml2-include-dir=]) fi AC_MSG_RESULT(yes) ## Determine MySQL include path MYSQL_INCLUDE=$($MYSQL_CONFIG --cflags) CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE" ### Checks for typedefs, structures, and compiler characteristics. #AC_CHECK_TYPES([long long]) AC_C_CONST AC_TYPE_SIZE_T ### Checks for library functions. AC_TYPE_SIGNAL AC_FUNC_MEMCMP AC_FUNC_STAT AC_CHECK_FUNCS( \ memmove \ llround \ setenv ) AC_SEARCH_LIBS(nanosleep, rt posix4,, AC_ERROR([nanosleep function not found.])) # Determine UCD or Net-SNMP include path if test "x$snmp_include_dir" != "x"; then for i in / /ucd-snmp /include/ucd-snmp; do test -f $snmp_include_dir/$i/snmp.h && SNMP_INCDIR=$snmp_include_dir/$i done for i in / /net-snmp /include/net-snmp; do test -f $snmp_include_dir/$i/net-snmp-config.h && SNMP_INCDIR=$snmp_include_dir/$i done else for i in /usr/local/include /usr/include; do test -f $i/snmp.h && SNMP_INCDIR=$i test -f $i/ucd-snmp/snmp.h && SNMP_INCDIR=$i/ucd-snmp test -f $i/net-snmp/net-snmp-config.h && SNMP_INCDIR=$i/net-snmp test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp test -f $i/snmp/include/net-snmp/net-snmp-config.h && SNMP_INCDIR=$i/snmp/include/net-snmp done fi # Determine UCD or Net-SNMP library path if test "x$snmp_lib_dir" != "x"; then test -f $snmp_lib_dir/libsnmp.a -o -f $snmp_lib_dir/libsnmp.so -o -f $snmp_lib_dir/libsnmp.dylib && SNMP_LIBDIR=$snmp_lib_dir test -f $snmp_lib_dir/libnetsnmp.a -o -f $snmp_lib_dir/libnetsnmp.so -o -f $snmp_lib_dir/libnetsnmp.dylib && SNMP_LIBDIR=$snmp_lib_dir else for i in /usr/local/lib /usr/sfw/lib /usr/lib /usr/lib64 ; do test -f $i/libsnmp.a -o -f $i/libsnmp.so -o -f $i/libsnmp.dylib && SNMP_LIBDIR=$i test -f $i/libnetsnmp.a -o -f $i/libnetsnmp.so -o -f $i/libnetsnmp.dylib && SNMP_LIBDIR=$i done fi if test -z "$SNMP_INCDIR"; then if test "x$snmp_include_dir" != "x";then AC_MSG_ERROR(Cannot find SNMP headers under $snmp_include_dir) else AC_MSG_ERROR(Cannot find SNMP headers. Use --with-snmp-include-dir= to specify non-default path.) fi fi if test -z "$SNMP_LIBDIR"; then if test "x$snmp_lib_dir" != "x";then AC_MSG_ERROR(Cannot find SNMP libraries under $snmp_lib_dir) else AC_MSG_ERROR(Cannot find SNMP libraries. Use --with-snmp-lib-dir= to specify non-default path.) fi fi LDFLAGS="$LDFLAGS -L$SNMP_LIBDIR" CPPFLAGS="$CPPFLAGS -I$SNMP_INCDIR" # Net/UCD-SNMP includes v3 support and insists on crypto unless # compiled --without-openssl SNMP_SSL=no AC_MSG_CHECKING([if Net-SNMP needs crypto support]) AC_TRY_COMPILE([#include ], [exit(USE_OPENSSL != 1);], [AC_MSG_RESULT(yes) SNMP_SSL=yes ], AC_MSG_RESULT(no)) AC_MSG_CHECKING([if UCD-SNMP needs crypto support]) AC_TRY_COMPILE([#include ], [exit(USE_OPENSSL != 1);], [AC_MSG_RESULT(yes) SNMP_SSL=yes ], AC_MSG_RESULT(no)) if test "$SNMP_SSL" = "yes"; then AC_CHECK_LIB(crypto, CRYPTO_free,,AC_MSG_ERROR(libcrypto not found!)) fi HAVE_NET_SNMP=no AC_CHECK_LIB(netsnmp, snmp_timeout, [LIBS="-lnetsnmp $LIBS" AC_DEFINE(HAVE_NET_SNMP, 1, Net-SNMP Version) HAVE_NET_SNMP=yes ], AC_MSG_RESULT(Cannot find Net-SNMP libraries...checking for UCD-SNMP)) if test "$HAVE_NET_SNMP" = "no"; then AC_CHECK_LIB(snmp, snmp_timeout,, AC_MSG_ERROR(Cannot find UCD-SNMP libraries)) fi # Internationalization support AM_GNU_GETTEXT([external]) # # Run configure in directories # #AC_CONFIG_SUBDIRS(src) AC_CONFIG_FILES( \ Makefile \ subst \ bin/rrdedit \ etc/Makefile \ etc/cron.d-netmrg \ etc/init.d-netmrg \ etc/netmrg.conf \ etc/netmrg.xml \ m4/Makefile \ po/Makefile.in \ src/Makefile \ src/include/netmrg.h \ var/Makefile \ var/lib/Makefile \ var/lib/rrd/Makefile \ www/Makefile \ www/include/config.php ) AC_OUTPUT perl subst etc/cron.d-netmrg perl subst etc/init.d-netmrg perl subst etc/netmrg.conf perl subst etc/netmrg.xml perl subst src/include/netmrg.h perl subst src/include/config.h perl subst www/Makefile netmrg-0.20/config.guess0000775000076400007640000011315007702667001015443 0ustar silfreedsilfreed#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-09-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; sparc*:NetBSD:*) echo `uname -p`-unknown-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) case "${HPUX_REV}" in 11.[0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac fi ;; esac if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in big) echo mips-unknown-linux-gnu && exit 0 ;; little) echo mipsel-unknown-linux-gnu && exit 0 ;; esac ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-pc-linux-gnu\n", argv[1]); # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: netmrg-0.20/share/0000775000076400007640000000000011000016355014206 5ustar silfreedsilfreednetmrg-0.20/share/images/0000775000076400007640000000000011000016355015453 5ustar silfreedsilfreednetmrg-0.20/share/images/default/0000775000076400007640000000000011000016355017077 5ustar silfreedsilfreednetmrg-0.20/share/images/default/arrow_limit.svg0000664000076400007640000000325110332536345022166 0ustar silfreedsilfreed netmrg-0.20/share/images/default/disk.svg0000664000076400007640000000346607637750161020610 0ustar silfreedsilfreed netmrg-0.20/share/images/default/viewdisk.svg0000664000076400007640000001514710133362414021463 0ustar silfreedsilfreed netmrg-0.20/share/images/default/view.svg0000664000076400007640000000577210131531515020611 0ustar silfreedsilfreed netmrg-0.20/share/images/default/viewgraph.svg0000664000076400007640000000271007664563435021647 0ustar silfreedsilfreed netmrg-0.20/share/images/default/slideshow.svg0000664000076400007640000000371007767204225021646 0ustar silfreedsilfreed netmrg-0.20/share/images/default/edit.svg0000664000076400007640000000576210055243326020570 0ustar silfreedsilfreed netmrg-0.20/share/images/default/arrow.svg0000664000076400007640000000306107757155746021012 0ustar silfreedsilfreed netmrg-0.20/share/images/default/status.svg0000664000076400007640000000275007651637120021167 0ustar silfreedsilfreed netmrg-0.20/share/images/default/recacheinterface.svg0000664000076400007640000001721710133362414023111 0ustar silfreedsilfreed netmrg-0.20/share/images/default/duplicate.svg0000664000076400007640000000330310131531515021575 0ustar silfreedsilfreed netmrg-0.20/share/images/default/recacheproperties.svg0000664000076400007640000000461610522144106023342 0ustar silfreedsilfreed image/svg+xmlP netmrg-0.20/share/images/default/parameters.svg0000664000076400007640000000210310133362414021765 0ustar silfreedsilfreed %_ netmrg-0.20/share/images/default/imagespec.php0000664000076400007640000000366410332536345021573 0ustar silfreedsilfreed "applytemplate.png", "edit" => "edit.png", "logo" => "netmrg-logo-small.png", "delete" => "delete.png", "disk" => "disk.png", "duplicate" => "duplicate.png", "arrow-up" => "arrow-up.png", "arrow-right" => "arrow-right.png", "arrow-down" => "arrow-down.png", "arrow-left" => "arrow-left.png", "arrow-up-disabled" => "arrow-up-disabled.png", "arrow-right-disabled" => "arrow-right-disabled.png", "arrow-down-disabled" => "arrow-down-disabled.png", "arrow-left-disabled" => "arrow-left-disabled.png", "arrow_limit-up" => "arrow_limit-up.png", "arrow_limit-right" => "arrow_limit-right.png", "arrow_limit-down" => "arrow_limit-down.png", "arrow_limit-left" => "arrow_limit-left.png", "arrow_limit-up-disabled" => "arrow_limit-up-disabled.png", "arrow_limit-right-disabled" => "arrow_limit-right-disabled.png", "arrow_limit-down-disabled" => "arrow_limit-down-disabled.png", "arrow_limit-left-disabled" => "arrow_limit-left-disabled.png", "parameters" => "parameters.png", "view" => "view.png", "recachedisk" => "recachedisk.png", "viewdisk" => "viewdisk.png", "recacheinterface" => "recacheinterface.png", "viewinterface" => "viewinterface.png", "viewgraph-on" => "viewgraph-on.png", "viewgraph-off" => "viewgraph-off.png", "slideshow" => "slideshow.png", "status-good-trig" => "status-good-trig.png", "status-good-untrig" => "status-good-untrig.png", "status-warning-trig" => "status-warning-trig.png", "status-warning-untrig" => "status-warning-untrig.png", "status-critical-trig" => "status-critical-trig.png", "status-critical-untrig" => "status-critical-untrig.png", "status-unknown-trig" => "status-unknown-trig.png", "status-unknown-untrig" => "status-unknown-untrig.png" ); ?> netmrg-0.20/share/images/default/applytemplate.svg0000664000076400007640000000376210131531515022515 0ustar silfreedsilfreed netmrg-0.20/share/images/default/delete.svg0000664000076400007640000000441510131531515021072 0ustar silfreedsilfreed netmrg-0.20/share/images/default/viewinterface.svg0000664000076400007640000002012110133362414022455 0ustar silfreedsilfreed netmrg-0.20/share/images/default/recachedisk.svg0000664000076400007640000001424610133362414022102 0ustar silfreedsilfreed netmrg-0.20/share/images/default/Makefile0000664000076400007640000000622510522144106020550 0ustar silfreedsilfreed.SUFFIXES: .svg BATIK = batik-rasterizer FILES = status-unknown-trig.svg status-unknown-untrig.svg status-good-trig.svg status-good-untrig.svg status-warning-trig.svg status-warning-untrig.svg status-critical-trig.svg status-critical-untrig.svg viewgraph-on.svg viewgraph-off.svg all : $(FILES) @$(BATIK) -h 15 applytemplate.svg @$(BATIK) -h 15 edit.svg @$(BATIK) -h 15 delete.svg @$(BATIK) -h 15 disk.svg @$(BATIK) -h 15 duplicate.svg @$(BATIK) -h 15 recachedisk.svg @$(BATIK) -h 15 recacheinterface.svg @$(BATIK) -h 15 recacheproperties.svg @$(BATIK) -h 15 parameters.svg @$(BATIK) -h 15 slideshow.svg @$(BATIK) -h 15 view.svg @$(BATIK) -h 15 viewdisk.svg @$(BATIK) -h 15 viewinterface.svg @$(BATIK) -h 15 viewgraph-on.svg @$(BATIK) -h 15 viewgraph-off.svg @$(BATIK) -h 35 -d netmrg-logo-small.png netmrg-logo.svg @$(BATIK) -h 100 -d netmrg-logo-medium.png netmrg-logo.svg @$(BATIK) -h 250 -d netmrg-logo-large.png netmrg-logo.svg arrow: @cp arrow.svg arrow-up.svg @$(BATIK) -h 15 arrow-up.svg @convert -rotate 90 arrow-up.png arrow-right.png @convert -rotate 180 arrow-up.png arrow-down.png @convert -rotate 270 arrow-up.png arrow-left.png @cat arrow-up.svg | perl -ne 's/#000000/#808080/; s/#333333/#A0A0A0/; print;' > arrow-up-disabled.svg @$(BATIK) -h 15 arrow-up-disabled.svg @convert -rotate 90 arrow-up-disabled.png arrow-right-disabled.png @convert -rotate 180 arrow-up-disabled.png arrow-down-disabled.png @convert -rotate 270 arrow-up-disabled.png arrow-left-disabled.png arrow_limit: @cp arrow_limit.svg arrow_limit-up.svg @$(BATIK) -h 15 arrow_limit-up.svg @convert -rotate 90 arrow_limit-up.png arrow_limit-right.png @convert -rotate 180 arrow_limit-up.png arrow_limit-down.png @convert -rotate 270 arrow_limit-up.png arrow_limit-left.png @cat arrow_limit-up.svg | perl -ne 's/#000000/#808080/; s/#333333/#A0A0A0/; print;' > arrow_limit-up-disabled.svg @$(BATIK) -h 15 arrow_limit-up-disabled.svg @convert -rotate 90 arrow_limit-up-disabled.png arrow_limit-right-disabled.png @convert -rotate 180 arrow_limit-up-disabled.png arrow_limit-down-disabled.png @convert -rotate 270 arrow_limit-up-disabled.png arrow_limit-left-disabled.png status: @$(MAKE) -s createstatus C1="#ff0000" C2="#ff4c4c" NAME="status-critical-trig.svg" @$(MAKE) -s createstatus C1="#ff0000" C2="#7f4c4c" NAME="status-critical-untrig.svg" @$(MAKE) -s createstatus C1="#009000" C2="#009000" NAME="status-good-trig.svg" @$(MAKE) -s createstatus C1="#009000" C2="#002000" NAME="status-good-untrig.svg" @$(MAKE) -s createstatus C1="#0000bf" C2="#4c4cc0" NAME="status-unknown-trig.svg" @$(MAKE) -s createstatus C1="#0000bf" C2="#4c4c7f" NAME="status-unknown-untrig.svg" @$(MAKE) -s createstatus C1="#e6e600" C2="#e6e500" NAME="status-warning-trig.svg" @$(MAKE) -s createstatus C1="#e6e600" C2="#999900" NAME="status-warning-untrig.svg" viewgraph: @cp -f viewgraph.svg viewgraph-on.svg @cat viewgraph.svg | perl -ne 's/stroke:#e67f00;/stroke:#606060;/; s/fill:#e67f00;/fill:#606060;/; print;' > viewgraph-off.svg createstatus: @cat status.svg | perl -ne 's/#7f7f7f/$(C1)/; s/#4c4c4c/$(C2)/; print;' > $(NAME) %.svg: status viewgraph arrow @$(BATIK) -h 15 $@ clean: rm -f $(FILES) netmrg-0.20/share/images/default/netmrg-logo.svg0000664000076400007640000000654407651660034022103 0ustar silfreedsilfreed netmrg-0.20/share/doc/0000775000076400007640000000000011000016355014753 5ustar silfreedsilfreednetmrg-0.20/share/doc/ChangeLog0000664000076400007640000011625210774565003016554 0ustar silfreedsilfreed2008.04.01 v0.20cvs balleman - bug#488 : ajax monitor selection - add built-ins 2008.03.26 v0.20cvs silfreed - bug#482 : fixing configure/compilation issues - bug#491 : fixing gcc 4.3 errors 2008.01.21 v0.20cvs silfreed - updated bugs.netmrg.net to mantis 1.1.1 2007.12.19 v0.20cvs silfreed - bug#490 - fail to find net-snmp in x86_64 adding detection of /usr/lib64 2007.05.29 v0.20cvs silfreed - adding scripts contributed by Uwe Steinmann for monitoring linux load w/o SNMP and Apple systems battery status with a PMU - incorporating modifications to linux26diskaccess.pl (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=412549) 2007.05.14 v0.20cvs silfreed - updated wiki.netmrg.net to mediawiki 1.10.0 2007.04.05 v0.20cvs silfreed - updated bugs.netmrg.net to mantis 1.0.7 - updated lists.netmrg.net to phpBB 2.0.22 2006.11.13 v0.20cvs silfreed - bug#0000458: View page should have action items beside each graph improved html structure of view page and improved CSS wrapping of graphs. setup CSS hack for IE to allow the images to still center but throw the new controls to the left. - updated copyright to 2007 2007.01.30 v0.20cvs balleman - bug#0000466: Release Checklist for 0.20 - version bumps 2007.01.24 v0.20cvs balleman - updated bugs.netmrg.net to mantis 1.0.6 - updated wiki.netmrg.net to mediawiki 1.6.9 2006.11.13 v0.20cvs silfreed - setup Auto Bot Questions for lists.netmrg.net to try to cut down on spam registrations http://www.phpbb.com/phpBB/viewtopic.php?t=383305 2006.11.10 v0.20cvs balleman - added watermarks in rrdtool 1.2 graphs 2006.11.03 v0.20cvs balleman - bug#0000480: AJAX monitor selection: if there is only one device, no monitors can be selected - bug#0000303: add ability to have 'max' lines on the weekly, monthly, yearly graphs - bug#0000468: HTML codes in condition operator drop-down - bug#0000419: write unknown to rrdtool when snmp agent restarts 2006.11.01 v0.20cvs balleman - bug#0000471: Device Properties should be gathered infrequently - bug#0000483: When the device type changes, cached properties should be discarded/translated 2006.10.24 v0.20cvs silfreed - updated bugs.netmrg.net to mantis 1.0.5 2006.09.24 v0.20cvs balleman - bug#0000479: fixed device properties multidelete 2006.09.22 v0.20cvs keb - bug#0000460: MySQL header and library detection cleanup 2006.07.02 v0.20cvs balleman - bug#0000441: Documentation on how to become daemonized 2006.06.30 v0.20cvs silfreed - updated lists.netmrg.net to phpBB 2.0.21 - updated wiki.netmrg.net to mediawiki 1.6.7 - updated bugs.netmrg.net to mantis 1.0.3 2006.06.25 v0.20cvs balleman - bug#0000473: basic CDP interface linkage support 2006.06.24 v0.20cvs balleman - bug#0000465: infinite loop on nanosleep() - fixed uninited param - bug#0000462: Device Properties - fixed memory leak - bug#0000459: Cool AJAX stuff to investigate: xajax is the way to go - bug#0000415: new monitor/subdev selection method - bug#0000256: Added support for special sub-dev-variable "nexthop" to link interfaces 2006.06.16 v0.20cvs keb - bug#0000469: Configure tweak for OS X compatibility 2006.04.14 v0.20cvs silfreed - updated lists.netmrg.net to phpBB 2.0.20 - updated wiki.netmrg.net to mediawiki 1.6.2 2006.03.24 v0.20cvs silfreed - putting backticks around "conditions" for mysql 5.0 compatibility 2006.02.27 v0.20cvs silfreed - bug#0000456: Should be able to search within a view page on titles that last update contained patches to view page that weren't supposed to make it up yet, sorry 2006.02.26 v0.20cvs silfreed - updated bugs.netmrg.net to mantis 1.0.1 - updated wiki.netmrg.net to mediawiki 1.5.6 2006.02.21 v0.20cvs silfreed - bug#0000461: Support for D-Link FSM726 Switch's ifAlias - adding script to poll surfboard status information 2006.02.19 v0.20cvs balleman - bug#0000462: Device Properties Completed initial framework. - bug#0000393: line number messages 2006.02.13 v0.20cvs silfreed - bug#0000452: Menu Rendering problems in IE added
between #header and #content to clear; fix recommended by Scott Gonzalez (http://www.scottsplayground.com, scott.gonzalez@gmail.com) - quit using onload="" to run javascript onload functions. Use addOnloadEvent() that does stuff through the window.onload element - bug#0000457: Separator should be cleaned up a bit changed the table to a div, and cleaned up the css 2006.02.03 v0.20cvs keb - reordered users.php so the code is more readable 2006.02.03 v0.19cvs silfreed - bug#0000392: Release Checklist for 0.19 * final doc changes and branching before release 2006.01.30 v0.19cvs silfreed - bug#0000449: ReadAll Users should be able to goto Edit pages, but not save - bug#0000392: Release Checklist for 0.19 - updated docs 2006.01.10 v0.19cvs keb - bug#0000444: ReadAll users can edit sub-devices - bug#0000430: permissions 'gotcha' 2006.01.08 v0.19cvs silfreed - updated wiki.netmrg.net to mediawiki 1.5.5 2006.01.09 v0.19cvs balleman - bug#0000433: problem with graph min/max - bug#0000392: bumping versions to 0.19 2006.01.08 v0.19cvs silfreed - bug#0000439: netmrg.sgml still needs maintained for the README, INSTALL, and netmrg-gatherer.1 files - bug#0000442: We should get ourselves added to the rrdtool 1.2's rrdworld pages 2006.01.04 v0.19cvs silfreed - bug#0000371: Grouped + Non-Grouped display in device tree is confusing - bug#0000286: provide a way to check integrity of a release tarball 2006.01.04 v0.19cvs balleman - bug#0000438: rewrote script tests using execve() 2006.01.02 v0.19cvs silfreed - updated lists.netmrg.net to phpBB 2.0.19 - updated wiki.netmrg.net to mediawiki 1.5.4 2005.12.18 v0.19cvs silfreed - updated bugs.netmrg.net to Mantis BT 0.19.4 2005.12.16 v0.19cvs balleman - fixed problem on monitors.php that showed unknown values as 0.00 - bug#0000437: added snmpwalk count method 2005.12.15 v0.19cvs silfreed - added killspike2 from cricket (with some modifications) 2005.12.09 v0.19cvs silfreed - updated wiki.netmrg.net to mediawiki 1.5.3 2005.12.08 v0.19cvs silfreed - bug#0000294: Search feature - bug#0000372: RFE: Add link for current level in device path 2005.11.11 v0.19cvs balleman - bufish://balleman@oak/var/www/netmrg/trunk/share/doc/ChangeLogg#0000410: updated 'Manual' URL to point to the wiki 2005.11.09 v0.19cvs balleman - bug#0000406: verify against rrdtool-1.2 - revisited comments escaping 2005.11.03 v0.19cvs balleman - bug#0000427: use RRDTOOL create instead of restore for zero.rrd - bug#0000342: delete template view items associated with deleted subdevices - bug#0000112: view edit should have move top and move bottom features - added "arrow_limit" icon 2005.10.31 v0.19cvs silfreed - updated wiki.netmrg.net to mediawiki 1.5.1 - updated lists.netmrg.net to phpBB 2.0.18 2005.10.22 v0.19cvs keb - bug#0000430: permissions 'gotcha' * responses.php snmp_cache_view.php conditions.php 2005.10.13 v0.19cvs balleman - bug#0000429: ReadAll user can add/edit/delete devices 2005.10.12 v0.19cvs silfreed - updated wiki.netmrg.net to mediawiki 1.4.11 - updated bugs.netmrg.net to Mantis BT 0.19.3 2005.09.21 v0.19cvs silfreed - updated wiki.netmrg.net to mediawiki 1.4.10 2005.09.12 v0.19cvs balleman - bug#0000287: on the monitor edit page, subdevice dropdown should not be displayed by default - bug#0000403: Upper/lower graph limit problem fixed both instances described; mins and maxes of 0 should now behave properly, and 'U' works again, too 2005.09.10 v0.19cvs balleman - bug#0000424: rrdtool 1.2 slope feature (use by default for 1.2) - bug#0000414: view edit enhancements 2005.09.09 v0.19cvs silfreed - upgrade version to 0.19cvs - bug#0000365: Web Interface redesign made sure all *.php pages were in the menu - bug#0000294: Search feature created a stock search page that just shows you your query back 2005.09.09 v0.18.2 silfreed - bug#0000365: Web Interface redesign updated header section to be all-inclusive of the nav bars (in case we want to do background images later) more CSS work to make hovers work nicely - bug#0000294: Search feature created the search box in the page header and hide it on the login page search box auto-focuses w/ the word "search" on page load 2005.09.06 v0.18.2 silfreed - updated wiki.netmrg.net to mediawiki 1.4.9 - bug#0000365: Web Interface redesign removing javascript; reformatting nav layers 2005.08.31 v0.18.2 balleman - bug#0000422: disabled notifications act as if they are enabled - bug#0000421: notifications page should display whether a notification is disabled or not 2005.08.24 v0.18.2 balleman - bug#0000373: contrib: Script action to count active modems on a Livingston Portmaster 2005.08.24 v0.18.2 keb - bug#0000420: macro variables should be configurable 2005.08.17 v0.18.2 balleman - bug#0000417: when a device is disabled, all of its status information should be 'unknown' 2005.08.15 v0.18.2 balleman - bug#0000413: apply templates page should not display subdevice dropdown by default - bug#0000394: Change license to GPL, upgrade keb to developer 2005.08.12 v0.18.2 balleman - bug#0000398: for devices without SNMP support, don't display 'pending...' 2005.07.21 v0.18.2 silfreed - updated wiki.netmrg.net to mediawiki 1.4.7 2005.07.18 v0.18.2 silfreed - updated lists.netmrg.net to phpBB 2.0.17 2005.07.15 v0.18.2 balleman - use localtime_r() to avoid concurrency issues 2005.07.08 v0.18.2 balleman - bug#0000400: monitors.cpp does not compile on Solaris/SPARC - Solaris does not have setenv/unsetenv 2005.07.06 v0.18.2 balleman - bug#0000385: Graph titles, axis labels, legend labels not properly escaped - bug#0000406: verify against rrdtool-1.2 (added config option for rrd version, fixed escaping) 2005.06.28 v0.18.2 silfreed - updated lists.netmrg.net to phpBB 2.0.15 2005.06.13 v0.18.2 keb - bug#0000391: remove netmrg_cron.sh 2005.05.31 v0.18.2 balleman - bug#0000408: lukasz_engel's graphing shell escaping patch 2005.05.28 v0.18.2 balleman - bug#0000409: an internal monitor (# 8) to replace win2kcpu.pl 2005.05.23 v0.18.2 balleman - bug#0000407: Notifications should have duplicate feature 2005.05.16 v0.18.2 silfreed - updated lists.netmrg.net to phpBB 2.0.15 - bug#0000365: fixing javascript to collapse all items before opening a new menu 2005.04.20 v0.18.2 silfreed - updated lists.netmrg.net to phpBB 2.0.14 2005.04.01 v0.18.2 silfreed - bug#0000366: testing new RSS aggregator for SVN commits - bug#0000365: Web Interface redesign try new idea of putting items below the main menu bar; still needs cleaned up - bug#0000395: monitors table test_id can not store tests_snmp rows with id>127 - bug#0000401: linux26diskaccess.pl only works for IDE drives 2005.03.28 v0.18.2 keb - bug#0000399: nanosleep needs rt library 2005.03.26 v0.18.2 keb - bug#0000387: Way to apply a template graph to multiple subdevices 2005.03.09 v0.18.2 silfreed - updated about, contributions pages - updated to 2005 in all docs 2005.03.02 v0.18.2 silfreed - bug#0000366: testing getting svn comments into mantis [x4] 2005.02.28 v0.18.2 silfreed - updated lists.netmrg.net to phpBB 2.0.13 - bug#0000365: Web Interface redesign added 'hidden' menu items that will expand the menu list 2005.02.27 v0.18.2 silfreed - merging silbranch from r1104:1125 - bug#0000381: Update source tree items that use cvs to make things happen - bug#0000379: Snapshots need to be made of the source trees - bug#0000380: Documentation needs auto-generated from source tree 2005.02.22 v0.18.2 silfreed - updated lists.netmrg.net to phpBB 2.0.12 2005.02.15 v0.18.2 keb - bug#0000388 - utils.cpp build warnings - bug#0000390 - libintl linking errors - bug#0000389 - build errors: WEXITSTATUS and WIFEXITED 2005.01.26 v0.18.2 balleman - bug#0000328 - SIGTERM/SIGINT should result in clean shutdown - Avoid SNMP tests for SNMP-disabled devices 2005.01.16 v0.18.2 balleman - bug#0000346 - Use correct sums in advanced graph view - bug#0000382 - when applying templates, they should be added to the sub-device view - bug#0000383 - if a STACK is first, change it to an AREA - bug#0000347 - fractional multipliers starting with "1" are broken 2005.01.16 v0.18.2 balleman - bug#0000375 - Gatherer can crash with certain versions of net-snmp against broken agents - bug#0000359 - error code scripts don't really return the error code - bug#0000358 - Duplicating a device does not duplicate status of "Disable SNMP Uptime Check" - bug#0000368 - RFE: Pass parameters as environment variables - bug#0000307 - kill stale lockfiles automatically 2004.12.20 v0.18.2 keb - bug#0000369 - 'Delete' under device groups fails with no device selected - bug#0000376 - devices.php: break statement missing 2004.12.12 v0.18.2 keb - bug#0000362 - gettext support 2004.12.10 v0.18.2 keb - bug#0000348 - More SVO "Access denied" issues (problems with MySQL 3.X) 2004.12.09 v0.18.2 silfreed - bug#0000281 - Support for a config_site.php in addition to config.php - bug#0000364 - PHP Library Restructure 2004.11.23 v0.18.2 keb - bug#0000352 - Escaping issues in graphing.php - bug#0000348 - More SVO "Access denied" issues 2004.11.19 v0.18.2 keb - bug#0000341 - Root group should always be returned from the Get*Groups functions 2004.11.16 v0.18.2 keb - bug#0000345 - get_graph.php needs cleaned up 2004.11.08 v0.18.1 silfreed - bug#0000325 - Access denied to custom graphs attached to subdevice and group - bug#0000316 - NETMRG_DEFAULT_MAP should not be allowed to edit prefs 2004.11.06 v0.18.1 keb - bug#0000271 - checkbox options should have a standard layout 2004.11.05 v0.18.1 balleman - bug#0000335 - disabled quickprint option so mandrake should work - bug#0000331 - snmp failure internal test doesn't work - bug#0000321 - don't use ifName if it is not unique in the cache 2004.11.04 v0.18.1 silfreed - bug#0000329 - escaping problems in snmp_cache_view.php 2004.10.24 v0.17 keb - bug#0000318 - CVS build fails due to unknown function llround 2004.10.23 v0.17 silfreed - bug#0000302 - Updater should support updating from any version 2004.10.23 v0.17 balleman - bug#0000317 - Function name conflict for stripnl on FreeBSD 2004.10.22 v0.17 keb - bug#0000308 - color should be reset when gatherer exits 2004.10.19 v0.17 balleman - bug#0000313 - internal test for snmp availability - bug#0000293 - SQL timeouts - bug#0000247 - simple parsing of snmp values 2004.10.16 v0.17 keb - bug#0000315 - netmrg build should have cleaner output - add more control over the install files in www/ 2004.10.14 v0.17 silfreed - bug#0000314 - zero.rrd needs to be built at 'make install' time 2004.10.13 v0.17 silfreed - bug#0000312 - Default external auth user should be added, but disabled - bug#0000310 - need more graphics 2004.10.12 v0.17 keb - bug#0000292 - checkbox delete gives errors in responses.php 2004.10.08 v0.17 silfreed - bug#0000310 - need more graphics; started 2004.10.07 v0.17 silfreed - bug#0000240 - default permissions for external auth users - bug#0000291 - adding new group always returns user to root group view 2004.10.05 v0.17 balleman - bug#0000282 - SNMP uptime should be displayed in a nice format 2004.10.04 v0.17 balleman - bug#0000283 - docs on notifications.php are wrong - bug#0000290 - negative (inverted) values not working 2004.09.21 v0.17 balleman - bug#0000288 - escape colons in graph item titles - bug#0000300 - graph sums don't take multipliers into account 2004.09.21 v0.17 silfreed - bug#0000299 - IE users can't submit forms 2004.09.19 v0.17 silfreed - bug#0000295 - db_escape_string can't be conditional 2004.09.13 v0.17cvs silfreed - updated bugs.netmrg.net to mantis 0.19.0, enabled sponsorships - bug#0000280 - Using checkbox delete in conditions.php gives errors when nothing is checked - bug#0000279 - new groups are always added with the Root parent - fixed 'disabled user check' to take into account if we were 0.17 or not (so updates can proceed) 2004.09.13 v0.17cvs keb - bug#0000271 - checkbox options should have a standard layout 2004.09.12 v0.17cvs balleman - bug#0000109 - tests_script.php checkboxes - bug#0000111 - tests_snmp.php checkboxes - bug#0000110 - tests_sql.php checkboxes - bug#0000103 - events.php checkboxes - bug#0000104 - responses.php checkboxes - bug#0000105 - conditions.php checkboxes 2004.09.11 v0.17cvs silfreed - bug#0000200 - Need a tutorial on how to create custom/template graphs - bug#0000259 - It should be noted that RRDs and variables aren't usable until after the gatherer runs - bug#0000275 - Tutorial on our Interface cache and Disk Cache - bug#0000276 - Document how variable substitution works - bug#0000273 - Move monitors to a new subdevice 2004.09.10 v0.17cvs silfreed - bug#0000272 - Move subdevices to different device 2004.09.08 v0.17cvs keb - bug#0000266 - apply templates should return to proper location 2004.09.07 v0.17cvs balleman - bug#0000213 - tests documentation - bug#0000108 - view.php checkboxes - bug#0000101 - subdevices.php checkboxes 2004.09.07 v0.17cvs silfreed - bug#0000267 - Device Group can't be reassigned to a new Parent 2004.09.03 v0.17cvs balleman - bug#0000102 - monitors.php checkboxes 2004.09.03 v0.17cvs silfreed - bug#0000229 - NavBar mods on snmp_cache_view 2004.09.01 v0.17cvs keb - bug#0000117 - an 'apply templates' page should be added - add graph count to graphs.php 2004.09.01 v0.17cvs balleman - bug#0000265 - column size for tests_internal.name not large enough - bug#0000107 - graph_items.php should have checkbox support - cleanup of graph_items.php / refactor graph item move - gradient feature on graph_items.php 2004.08.31 v0.17cvs balleman - bug#0000263 - internal test for reading a value from a file 2004.08.31 v0.17cvs silfreed - bug#0000248 - notifications.php has escaping issues - bug#0000261 - breadcrumbs break when you traverse multiple groups - bug#0000099, bug#0000100 - checkboxes on grpnav_list, devices, groups 2004.08.30 v0.17cvs keb - use global permit values for disabled users and the PERMIT_TYPES array 2004.08.29 v0.17cvs silfreed - bug#0000244 - global define for permit values - bug#0000248 - notifications.php has escaping issues 2004.08.29 v0.17cvs keb - ability to duplicate multiple graphs at once 2004.08.28 v0.17cvs keb - bug#0000106 - checkboxes to delete graphs for graphs.php 2004.08.24 v0.17cvs balleman - bug#0000258 - "Previous Value" should be available when processing conditions - bug#0000232 - correctly order cisco names on snmp interface cache page - bug#0000231 - make subdevice page sorting aware of cisco names 2004.08.24 v0.17cvs silfreed - bug#0000257 - doing a delayed insert for dynamic variables lowers mysql overhead 2004.08.21 v0.17cvs balleman - bug#0000241 - setting for syslog facility - bug#0000250 - internal ucd user+system monitor should return U's when necessary - added the rest of the included internal tests to tests_internal in the default database - bug#0000236 - escaping fields displayed by rrdtool - bug#0000158 - "advanced" monitor graphs, broken by timeframe changes, now fixed 2004.08.20 v0.17cvs balleman - bug#0000243 - gatherer man-page updates - bug#0000252 - status line, quick implementation - bug#0000251 - disable buttons on save - bug#0000245 - abstract graph duplication, add graph item duplication 2004.08.20 v0.17cvs silfreed - bug#0000253 - security: SQL injection to bypass auth - sub_dev_param.php: fixed escaping issues - bug#0000254 - Link to GNU Tar page is incorrect 2004.07.27 v0.17cvs balleman - bug#0000246 - improved monitor sorting on monitors.php and monitors dropdown 2004.07.20 v0.17cvs keb - bug#0000221 - ability to disable users 2004.07.18 v0.17cvs silfreed - bug#0000114 - checkboxes to delete users on users.php - bug#0000201 - summary of each section in netmrg 2004.06.30 v0.17cvs balleman - bug#0000239 - variable substitution for notifications - bug#0000238 - thread timestamps 2004.06.30 v0.17cvs dwarner - bug#0000235 - fixed SVO users viewing custom graphs in devices 2004.06.17 v0.17cvs keb - NetMRG now builds on Debian 3.0 (woody) 2004.06.15 v0.17cvs balleman - bug#0000211 - colorized gatherer output - bug#0000234 - change time frame for a view 2004.06.14 v0.17cvs balleman - version bump to 0.17cvs - bug#0000233 - 'disable snmp uptime check' should default to off - bug#0000230 - should be able to duplicate monitors 2004.06.06 v0.16cvs silfreed - bug#0000227 - problem w/ SVO users viewing a primary group 2004.06.04 v0.16cvs keb - bug#0000219 - build problems. Merged configure.ac and src/configure.ac 2004.06.04 v0.16cvs silfreed - bug#0000224 - rrdedit uses @RRDTOOL@ and /bin/sh 2004.06.01 v0.16cvs balleman - bug#0000177 - graph scaling options - bug#0000223 - docs links 2004.05.31 v0.16cvs balleman - bug#0000214 - syslog support - bug#0000157 - become a daemon 2004.05.27 v0.16cvs keb - cleanup subst perl script and make it stop using the .in files - bug#0000147 - fix warnings caused by autoconf PACKAGE_* defines 2004.05.27 v0.16cvs silfreed - bug#0000209 - docs should be a little prettier - bug#0000063 - all items on device tree have edit link - bug#0000217 - db driven news items - bug#0000218 - easier to maintain public website - bug#0000209 - easier to browse docs - bug#0000182 - FAQ system - bug#0000207 - disable password fields when external auth is in use - bug#0000210 - use cron.d for netmrg RPM installations 2004.05.26 v0.16cvs silfreed - bug#0000215 - fix view.php edit template/custom graph selection - bug#0000206 - make edit_rrd.pl as shell script and auto-confisize it - SVO users can view items in views attached to a subgroup - bug#0000063 - get into edit mode from device tree 2004.05.25 v0.16cvs balleman - bug#0000208 - when adding a group, remember your parent - bug#0000202 - ignore snmp uptime option - bug#0000187 - Nth subitem of an OID 2004.05.24 v0.16cvs silfreed - bug#0000197 - SVO users can't see custom graphs - bug#0000204 - SVO users can't see devices in subgroups when they're granted permissions for the parent group 2004.05.21 v0.16cvs silfreed - bug#0000203 - when submitting a group 0 (root) on users.php, there was a notice - default error reporting should be warnings and errors - version bump to 0.16cvs 2004.05.20 v0.15cvs balleman - doc updates for grpdev_list 2004.05.19 v0.15cvs silfreed - bug#0000196 - access denied graphic not displaying - bug#0000197 - SVO user can't see custom graphs - arbitrary user can't delete/duplicate subdevices - added titles to checkbox thingies - bug#0000159 - adding select box to choose your template for interface cache - fixed bug where you couldn't delete items on the view page w/ % signs 2004.05.18 v0.15cvs balleman - bug#0000195 - notifications.php errors 2004.05.15 v0.15cvs balleman - bug#0000192 - override default mysql socket - bug#0000193 - delete group generates warnings 2004.05.08 v0.15cvs silfreed - bug#0000186 - default view add custom graph db error - bug#0000181 - undefined index dev_type in test_script.php - bug#0000175 - in_array() can't take an array as needle in PHP < 4.2.0 - bug#0000174 - srand() needs seeded in php < 4.2.0 - bug#0000167 - don't allow non-SVO users to be chroot'd - bug#0000170 - don't allow devices in root group 2004.05.06 v0.15cvs balleman - bug#0000188 - Select All/None/Invert for checkboxes - bug#0000190 - Intelligent Subdev Defaults - bug#0000183 - escaping for ifAlias, ifDescr in gatherer - bug#0000189 - when applying a template, never duplicate a monitor - bug#0000172 - pthread_cond_wait() instead of busy-wait for thread counter 2004.04.08 v0.15cvs dwarner - added some quoting to lib/graphing.php to prevent db errors 2004.04.07 v0.15cvs balleman - bug#0000184 - Solaris doesn't check for NULL in sprintf 2004.03.29 v0.15cvs keb - bug#0000176 - OpenBSD needs des library to link libsnmp 2004.03.26 v0.15cvs keb - bug#0000179 - specify rrdtool location to configure 2004.03.17 v0.15cvs dwarner - fixed tripid bug in snmp_cache_view for 'Monitor/Graph All Checked' 2004.03.17 v0.14 dwarner - version bump to 0.15cvs 2004.03.10 v0.14cvs dwarner - bug#0000169 - stat.php interface operstatus doesn't match IF-MIB - bug#0000168 - duplicate users are allowed 2004.03.10 v0.14cvs keb - bug#0000165 - let single-view only users view/change preferences - bug#0000166 - fix bug where user can't modify preferences 2004.03.08 v0.14cvs silfreed - bug#0000164 - fix breadcrumbs - bug#0000160 - fix device duplication 2004.03.07 v0.14cvs keb - bug#0000147 - fix thread warnings 2004.02.28 v0.14cvs balleman - bug#0000158 - support 'advanced' features on monitor graphs - bug#0000139 - monitor mins/maxes should be templated 2004.02.24 v0.14cvs silfreed - bug#0000161 - space in front of sub groups on device tree page 2004.02.24 v0.13 silfreed - bug#0000046 & bug#0000047 - new group/device navigation w/ updated history bar - started on bug#0000160 - broken device duplication - version bump to 0.14cvs 2004.02.23 v0.13 silfreed - bug#0000150 - prerequisite matching (php safe mode + others) 2004.02.22 v0.13 silfreed - bug#0000046 - better group/device navigation 2004.02.14 v0.13 balleman - bug#0000155 - subdevice name escaping in snmp_cache_view.php - bug#0000154 - add navbar to conditions.php 2004.01.25 v0.13 balleman - bug#0000151 - fixed value field too short on graph_items.php - bug#0000142 - warning/error log (support added in gatherer and database) - bug#0000153 - possible name collision with Solaris mutex_* functions 2004.01.10 v0.13 balleman - bug#0000149 - recache.php security issues 2004.01.08 v0.13 silfreed - bug#0000143 - started deletion dependancy checking 2004.01.04 v0.13 balleman - bug#0000058 - get logos in the docbook manual - copyright year bump - bug#0000140 - interface cache sometimes is left empty 2003.12.30 v0.13 silfreed - bug#0000146 - reparent unparented child groups - bug#0000124 - cleanup groups.php 2003.12.29 v0.13 balleman - bug#0000145 - wrong link on graph_items.php - bug#0000144 - clicking on a view link on the snmp interface cache page results in an error - bug#0000126 - advanced graph view should parse dates like 'workday highlighting' does 2003.12.28 v0.13 balleman - enhance "test not present" checking. 2003.12.19 v0.13 balleman - parameter substitution in sql tests - escaping issue in dereferencing templated monitors 2003.12.19 v0.12 silfreed - bug#0000131 - dynamic 'resume slide show' link 2003.12.18 v0.12 balleman - bug#0000130 - descendants slideshow should sort groups by name - bug#0000132 - there should be a "previous slide" link during slideshow - bug#0000134 - "sums" column should be numerically formatted like the others - bug#0000136 - error on view.php page when trying to edit items - added lots of missing auth checks to view.php - bug#0000135 - read-only users can reorder graph items - bug#0000133 - for tests_sql, long queries should be truncated and an elipsis should be appended 2003.12.15 v0.12 balleman - bug#0000129 - uninitialized snmp session pointer can cause segfault 2003.12.14 v0.10 silfreed - bug#0000128 - add slideshow icon 2003.12.13 v0.10 balleman - bug#0000127 - unauthorized users can view/edit on test_*.php pages 2003.12.05 v0.10 balleman - rework slideshow/view.php to implement many enhancements 2003.11.26 v0.10 keb - bug#0000122 - configure enhancements for solaris - bug#0000123 - fixed several compile-time warnings 2003.11.26 v0.10 balleman - bug#0000120 - gatherer should check db version - bug#0000118 - total of sums should work - bug#0000119 - version bump checklist - not complete - broke [sub]devices.php into functions - bug#0000095 - device duplication - subdevice duplication 2003.11.24 v0.10 silfreed - bug#0000115 - add checkbox support to disks on snmp_cache_view.php - bug#0000088 - added slide show pref to user_prefs.php, use pref in view.php, and set all user prefs to true for users by default 2003.11.22 v0.10 silfreed - favicon 2003.11.20 v0.10 balleman - bug#0000116 - graph_items.php move up / move down icons 2003.11.20 v0.10 silfreed - bug#0000057 - added checkbox support to snmp_cache_view.php to make interfaces - start of user prefs (created table and function to return prefs) 2003.11.17 v0.10 balleman - add debug messages for thread locking 2003.11.17 v0.10 silfreed - bug#0000092 - test_* pages should redirect after saves - bug#0000093 - download page needs 'binary release' support and 'prettied up' - bug#0000094 - screenshots needs ordered by most recent release first - bug#0000082 - make netmrg_cron.sh use /bin/sh - bug#0000086 - view.php should display the custom name, not the dbrow name - bug#0000087 - session+external auth 'invalid' bug - bug#0000098 - be more specific in Makefile.am so CVS doesn't cause problems - new arrow images; used on view.php to reorder items 2003.11.16 v0.10 balleman - bug#0000091 - monitor parameter escaping issues - bug#0000074 - escaping issues editing sql tests - handle similar escaping issues for snmp and script tests 2003.10.25 v0.10 balleman - bug#0000083 - indent nested groups on device tree - bug#0000084 - reset sums when a total graph item is used - bug#0000075 - debugging enhancements - trivial rrdtool syntax highlighting 2003.10.24 v0.10 silfreed - updated viewgraph-off.png to be more apparent that there's nothing in it (made it gray instead of black) 2003.10.23 v0.10 balleman - bug#0000081 - applied patch for popen concurrency issue (rojer) 2003.10.21 v0.10 balleman - updated device page docs with new SNMP options - parse out SNMPv2 'bad oid' msgs 2003.10.18 v0.10 silfreed - bug#0000077 - deleting a device from a group deleted that device completely 2003.10.14 v0.10 balleman - bug#0000064 - SNMPv2c support - bug#0000066 - specify SNMP port support - bug#0000068 - specify SNMP timeout support 2003.10.12 v0.10 keb - always check /usr/local/include for libraries in FreeBSD - fix typo in src/configure when detecting xml2 libraries 2003.10.12 v0.10 balleman - bug#0000073 - nav error in sub_dev_params - bug#0000076 - show template name when applying 2003.10.10 v0.10 silfreed - CSS just for separator on view page 2003.10.06 v0.10pre2 silfreed - version bump to 0.10 - more doc updates; add custom dsl - add doc directories - updated spec file 2003.10.06 v0.10pre2 balleman - bug#0000072: db error on slide show if no active, viewable devices - doc updates 2003.10.04 v0.10pre2 balleman - bug#0000071: rate of change support in conditions 2003.09.29 v0.10pre2 silfreed - documentation updates 2003.09.27 v0.10pre2 silfreed - bug#0000059: sqaushed by adding grp nav to snmp_cache_view.php - make the device tree have it's 'view' images next to the device it represents - bug#0000070: header redirect on devices.php after db updates - bug#0000067: fixed notifications.php's docs a bit to make them more uniform 2003.09.24 v0.10pre2 balleman - bug#0000060: yesterday's highlight should be displayed on daily graphs - bug#0000069: infinite graph items shouldn't be included in "totals" - bug#0000061: document workday highlight feature - Add tags to the manual for organization 2003.09.23 v0.10pre2 balleman - bug#0000054: program crash on problem with runtime file - bug#0000065: can't change graph width/height - Set height/width for monitor graphs to default for custom graphs 2003.09.13 v0.10pre1 silfreed - bug#0000026: hiding advanced options on graph items edit page - bug#0000049: moved everything from DBChangeLog to netmrg.mysql and added names to template graphs - added 'advanced' hiding on graphs.php - bug#0000050: updater to go from version to version - move external auth to config file - version bump to 0.10pre2 2003.09.13 v0.10pre1 balleman - bug#0000042: --base support on graphs - bug#0000043: support logarithmic display (-o) - support legend hiding (-g) - bug#0000048: duplication problems - bug#0000020: polling interval configuration - bug#0000039: disk graph automagic, finalize 2003.09.12 v0.10pre1 silfreed - bug#0000041: add navigational history to the top of pages underneath 'Groups' 2003.09.11 v0.10pre1 balleman - bug#0000045: modularize SNMP further so that sessions aren't created on each SNMP query - bug#0000044: rojer's patches - error handling, windows disk mappings, and a series of new 'internal' tests. 2003.09.08 v0.10pre1 silfreed - bug#0000031: added a 'user_prefs.php' page as well as a whole new system of writing frontend pages 2003.08.31 v0.10pre1 silfreed - bug#0000024: the 'next' link shouldn't always work now - bug#0000027: when adding a monitor, it won't select the first item in the database - it should just select the first item - bug#0000035: deleting a group wasn't deleting devices because of the dev_parents change. - bug#0000034: wrapper script complains about more errors 2003.08.27 v0.10pre1 balleman - kill feature#28 graph dissection ("show children") feature restored 2003.08.25 v0.10pre1 balleman - kill bug#25 - log device names 2003.08.02 v0.10pre1 balleman - kill bug#0000008 - hide password on command line - add password prompting capability 2003.07.28 v0.8 silfreed - lots of doc upgrades - makedoctree addition to make docs for the website - xml config for web interface - version bump to 0.10pre1 2003.07.28 v0.8 balleman - bug#0000018 - SubDevParam page doesn't have a working delete - documentation - xml config for gatherer 2003.07.17 v0.8 silfreed - fixing directory paths - bug#0000014: fixed static paths for lockfile and runtime netmrg.cpp 2003.07.16 v0.8 silfreed - restructured cvs tree - added kevin's latest autoconf patch 2003.07.14 v0.8 silfreed - posted beta.netmrg.net to be live at www.netmrg.net - added makecvssnap to create cvs snapshots 2003.07.07 v0.8 silfreed - bug#0000005: where id != '$grp_id' should do the trick - bug#0000006: spiffy javascript to prevent min >= max in monitors.php - bug#0000007: spiffy javascript to write a 'U' in the min/max column in monitors.php - bug#0000004: can't figure out how to speed things up - added a 'makedist' script that will make a tarball out of the latest cvs 2003.07.06 v0.8 silfreed - enclose_graph checks for auth now - added an 'ACCESS DENIED' png for get_graph auth - get_graph now auths - external auth now works 2003.07.06 v0.8 balleman - bug#0000001: chrooting code had multiple issues with respect to device tree - break netmrg.cpp into more managable chunks (devices, monitors, mappings) - add settings management to gatherer - allow for override of some settings by command line - more verbose/graceful error handling in gatherer during startup/database failures 2003.07.05 v0.8 silfreed - bug#0000002: updated logos on beta website - bug#0000003: code to detect if type was passed in didn't take account for already existing type - modified view_check_auth() so that it works again on the view page 2003.07.02 v0.8 silfreed - new bugtracker using mantisbt (http://mantisbt.sourceforge.net) 2003.05.26 v0.8 silfreed - bug#7 : status images not vertically centered - bug#8 : monitors.php: no script options for new monitor - viewgraph now implemented on device_tree.php w/ different images for items w/ associated items or not 2003.05.15 v0.8 balleman - enclose_graph.php reworked - capability for 'zooming' on both axes - ability to apply arbitrary templates 2003.05.08 v0.8 balleman - abstract all mysql_* calls to db_* calls - db_escape_string deployed where seemingly useful 2003.05.06 v0.8 balleman - "Make Graph" functionality restored for interfaces - graph duplication fixed (custom and template) 2003.04.21 v0.8 balleman - graph templating exists (and works!) 2003.04.21 v0.8 silfreed - bug#2 : can't fix ifName/IfDescr link - bug#3 : fixed javascript bug w/ slashes - bug#4 : device_tree.php expand/collapse bug 2003.04.17 v0.8 silfreed - format.php: * cleanup/documentation * reworking make_display_table() and make_display_item() to get rid of $custom_add_link and make the code easier to read/use - www/*.php: modifying all pages that use above functions to use new way 2003.04.15 v0.8 balleman - reworking 'views' in preparation of graph templating 2003.04.01 v0.8 silfreed - making subpages CSS happy; still need to alternate list items 2003.03.31 v0.8 balleman - killed remainder of "mon_" files and tables 2003.03.24 v0.8 silfreed - more graphics (svg is good) - mostly got image specfiles working 2003.03.11 v0.8 balleman - change how graphs and graph items work - notifications and responses now work 2003.03.07 v0.8 silfreed - public website has a good majority of it finished. almost ready to post 2003.02.03 v0.8 balleman - event log working - bug in move up/down fixed (used to break after an item was deleted) 2003.01.25 v0.8 balleman - C++ program performs disk and interface caching - web interface has been updated to accept this 2003.01.19 v0.8 silfreed - created http://lists.netmrg.net using phpBB 2003.01.18 v0.8 silfreed - created http://bugs.netmrg.net and crossed one more thing off my TODO - changing my public email for netmrg to be 'silfred@netmrg.net' 2003.01.15 v0.8 silfreed - implemented external http auth support (untested) 2003.01.13 v0.8 silfreed - updated copyright info on every .php page to refer to doc/LICENSE - new versioning/changelog scheme 2003.01.12 v0.8 silfreed - wrote device_tree.php (based on last_status.php) - auth code much more complete * will logout a user if they've been logged in too long * will logout a user if they're from a new IP * implemented on every page - menu.php updated to use static array (in stat.php) * includes support for displaying links based on auth levels == versions before 2002.11.19 didn't have a date assocated with them == 0.79.3a - CVS-ification - continue rewrite of C++ code - extensive use of CSS - update of all web pages to work with 'register_globals' off * this requires PHP 4.1+ - use php long start tags instead of short ones - C++ code supports net-snmp library 0.79.2a - reconstruction of C++ code 0.79.1a - sub-devices and database restructuring. - menu and title bar redesign 0.79.0a - First version with a change log. - alternating table row colors - numeric sorting of if_index in snmp_cache - working multiple simultaneous pthreads - tiered deletion (facilitating orphan prevention) - make color selections static - allow for nested groups - removed cookie expiration for device tree - fixed some major inefficiencies in the device tree - popup color chooser - javascript-based delete confirmation netmrg-0.20/share/doc/netmrg.sgml0000664000076400007640000006537711000015417017153 0ustar silfreedsilfreed The NetMRG Reference Brady Alleman Douglas E. Warner 2007 2003-2007 Brady Alleman and Douglas E. Warner This project is licensed under the terms of the MIT License. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. All product names are property of their respective owners. Such names are used for identification purposes only and are not indicative of endorsement by or of any company, organization, product, or platform. Overview Introduction Welcome to NetMRG! NetMRG is a database-driven network monitoring and graphing tool for use on Linux systems. It offers an intuitive web-based configuration, customized monitoring capabilities for unusual situations, a fast multi-threaded polling application, and brilliant graphs rendered by RRDTOOL. This document aims to guide you swiftly through the installation and configuration of NetMRG, as well as act as a reference for those with existing installations. Revision History 0.20 2008.04.11 Major feature enhancements and bug fixes; Fixed compilation under GCC 4.3; restructuring of view pages to show graph titles (for easier in-page searching) and icons for graph actions; fixed mysql 5 compatibility; added device properties (keeps track of things like model #, serial #, etc); added ability to chain interfaces to travel between them; added ajax monitor selection on graphs. 0.19 2006.02.03 Major Feature Enhancements and Bug Fixes; Major Web Interface redesign to give more room for graphs and ease overall use. Security enhancements behind the scenes to ensure correct permissions checking. Added a search interface that will search groups, devices, sub devies, and sub device parameters. RRDtool 1.2 support (including graph smoothing); Depricated use of netmrg_cron.sh in favor of using netmrg-gatherer; migrated bulk of docs to wiki; numerous other bugfixes and enhancements. 0.18.2 2004.11.09 Minor Bug Fixes; Fixed some escaping problems on the interface cache page, disabled the 'quickprint' Net-SNMP option for better compatibility, fixed the snmp-failure test, fixed an SVO-user view issue, and added failover for duplicate ifNames when adding interfaces. 0.18.1 2004.11.01 Minor Bug Fixes; Fixed a small bug where the gatherer would not register negative values. 0.18 2004.10.25 Major Bug Fixes; Fixed an issue preventing form submissions on some browsers, fixed PHP string escaping problems, fixed inability to create inverted stacked graphs, and fixed parameter substituion and documentation regarding notifications and responses. Added better support on FreeBSDs (4.8-5.2) and x86-64 architectures (Linux and FreeBSD), the ability to multiply summed values, MySQL timeouts, simple value parsing (to get the numeric content out of quoted numbers, etc), graphic icons for most actions, support for a default external auth user (with regards to permissions), and cleaned up the gatherer build process output. 0.17 2004.09.13 Minor Feature Enhancements; Added colorized gatherer output, checkbox support on multiple pages, the ability to disable users, fixed a potential SQL-injection bug, updated navigation on group pages, updated tutorials. 0.16 2004.06.10 Minor Bugfixes and Feature Enhancements; fixed a user management bug and several bugs related to 'single view only' users not being able to see graphs, added the ability to ignore SNMP uptime checks for devices (permitting the monitoring of broken devices), added the ability to do an SNMP walk of an OID (useful for the Windows SNMP agent), enhanced group/device management, cleaned up autoconf (now supports FC2), and added experimental syslog and daemon support in the gatherer. 0.15 2004.05.20 Minor Bugfixes and Feature Enhancements; fixes for various db errors (including the infamous one on snmp_cache_view.php), better cross-platform compilation, select all/none/invert checkbox support, support for choosing what graph to apply to an interface, better support for php < 4.2.0, and some security fixes for single-view-only users. 0.14 2004.03.10 Minor Bugfixes and Feature Enhancements; escaping issues in template dereferencing, broken links on various pages, security issues regarding manual SNMP recaching, broken duplication on non-cutting-edge MySQL, more parameter substitution in SQL tests, better date parsing for advanced graph view, nav-bar and group navigation enhancements, advanced view capability for monitor-only graphs. 0.13 2003.12.19 Minor Bugfixes and Feature Enhancements; slide show ordering, previous slide, resume slide show, better formatting of 'sums', errors on view editing, fixes to permissions checking, and an occassional segfault in the gatherer was fixed. 0.12 2003.12.15 Major Feature Enhancents and Bugfixes; added SNMPv2 support, fixed a bug that would cause a device to be deleted from all groups, fixed session timeout when using external auth, added checkbox support to interface/disk cache pages, slide show enhancements, fixed permission issue where unauthorized users could view/edit test_* pages 0.10 2003.10.05 Major bug fix; fixes a db error when trying to view monitors, a bug that would always set the width and height to zero when creating graphs, and makes conditions with 'rate of change' work. Many documentation upgrades. 0.10pre2 2003.09.15 This release focuses on adding new features and sqaushing bugs. In addition, there is now an 'updater.php' that is required to be run between versions. A minor change needs to be made to everyone's 'netmrg.xml' to add an 'externalauth' field inside the 'website' section. 0.10pre1 2003.07.28 Initial publication Installation Software Requirements NetMRG Requires the following packages for compilation. PHP, Version >= 4.1 MySQL, Version >= 3.23 RRDTOOL, Version >= 1.0.28 Libxml2, Version >= 2.30 Libstdc++, Version >= 3.2Versions earlier than this may compile just fine, but may experience runtime issues. Specifically, we experienced software crashes on an SMP machine running version 2.96 that were resolved by upgrading to 3.2. NET/UCD-SNMP, Version >= 4.2.2 Satisfying Requirements Specific instructions to satisfy dependencies for certain platforms are presented below. They should be used more as suggestions, not necessarily step-by-step instructions. You may need to do more than what is listed, or much less, depending on the options you selected when installing your operating system. Red Hat Linux In order to satisfy the libstdc++ requirement, Redhat 8.0 or above is required. NetMRG may not be stable on older versions of libstdc++. Install the following RPMs from your Red Hat installation media: httpd php php-mysql mysql mysql-server mysql-devel libxml2 libxml2-devel net-snmp net-snmp-devel net-snmp-utils Installing RRDTOOL Download an RRDTOOL RPM from http://www.freshrpms.net/ OR Download the RRDTOOL source from http://www.rrdtool.org/ and compile it. Installing precompiled NetMRG RPM Download the latest NetMRG RPM and install it as follows: $ rpm -Uvh netmrg-0.10.rpm You will still have to perform the following tasks listed in the Install Instructions: Setup the Database Configure Apache Configure the Installation Setup Crontab FreeBSD (4.8) Install the following ports: www/apache13 rrdtool net-snmp libxml2 mod_php4 (specify MySQL support) lang/gcc32 Run configure, specifying gcc32: ./configure 'LDFLAGS=-L/usr/local/gcc3/lib' 'CPPFLAGS=-I/usr/local/gcc3/include' 'CXX=g++32' Installation Procedure Untar to some directory like /tmp/ (it will untar into a 'netmrg' directory) cd /tmp wget http://www.netmrg.net/download/release/netmrg.tar.gz tar xzvf netmrg.tar.gz Now we need to compile and install the source. cd into the directory made by your tar command and type the following: ./configure make make install If configure fails to locate the needed libraries they can be manually specified. Run ./configure --help for details on the necessary options. Setup the database Now we need to setup the database. Please change at least the password (netmrgpass below). mysqladmin create netmrg mysql -u root -p netmrg < share/netmrg.mysql mysql -u root -p > grant all on netmrg.* to netmrguser@localhost identified by 'netmrgpass'; You need to modify your apache config in order to make your NetMRG installation live (commonly in /etc/httpd/conf/httpd.conf). The first is to alias /netmrg to the installed web directory (commonly /usr/local/var/www/netmrg/webfiles). Alias /netmrg "/usr/local/var/www/netmrg/webfiles" The easier way (if you're running Apache >= 1.3) is to just Include the conf file we've created anywhere in your file (near the bottom is fine). Include /usr/local/etc/netmrg.conf You will need to restart your Apache after making config changes. Telling it to reload its config should be good enough killall -HUP httpd Configure the Installation All of NetMRG's common configuration options are controlled by an XML file, normally located at /usr/local/etc/netmrg.xml. You should edit this file to make any necessary changes before continuing with installation. For most installations, you will at least need to edit netmrg.xml to reflect your database username and password. Setup Permissions NetMRG does not need superuser permissions to run, therefore we will setup a user for it. # useradd netmrg # chown netmrg:netmrg /usr/local/var/log/netmrg # chown netmrg:netmrg /usr/local/var/lib/netmrg/rrd Setup crontab You can setup the crontab entries in two places: either edit /etc/crontab, or run crontab -e as the netmrg user. For 'crontab -e', use an entry similar to this: */5 * * * * bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" To edit the master crontab, edit /etc/crontab and add a line similar to this: */5 * * * * netmrg bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" Point your web browser at your install, and start graphing things! The default login is admin and the default password is nimda. Point your web browser at the host you built this on (something similar to http://yourhost.com/netmrg/) and please change your password! Upgrade Procedure After doing a 'make install' as described in the chapter on Installing NetMRG, the next step is to run the web-based updater. This is accomplished by logging into NetMRG with administrator privileges, and following the prompts. NetMRG's web interface will not operate normally and the gatherer will not run until the web-based upgrade is performed. Non-administrator users will only receive a message directing them to contact their NetMRG administrator. If you need to perform an upgrade, the updater will prompt you to apply all updates. Clicking this link will perform all necessary updates for this release. If for some reason an update fails, or you would like to re-apply an update for any reason, you can goto the updater and goto View all available updates. This will present you a list of the updates that are available and their status (applied, not applied, or error). If you have problems updating from one version to the next, you can force individual updates that fail so that they're considered 'applied'. Once all updates are applied for a particular version, the database will be automatically updated to the latest version that has all updates applied. Reference Manual Pages netmrg-gatherer 1 netmrg-gatherer Gathers data from devices. netmrg-gatherer OPTIONS Description netmrg-gatherer performs tests on all enabled hosts in NetMRG. It will store results in RRD files using RRDTOOL(1) and perform actions in response to events. Global Options Displays usage information and exits. Displays software version and exits. Operating Options num threads Run no more than the specified number of threads simultaneously. Become a daemon. mode Mode of operation. This option controls the manner in which the gatherer operates. The modes currently supported are "once" (the default, best used manually or via cron) which runs all tests once then exits, and "wait" (best used when daemonized) which will run all tests, wait for the gatherer interval to expire, and then repeat. To run netmrg-gatherer daemonized, the recommended set of options at this point is "-X -S -M wait" which will daemonize, repeat the gather cycle on each interval, and write output to syslog. Logging, Debugging and Verbosity Options Syslog. Logs messages to syslog instead of stdout. Bland. Disables color output. By default, netmrg-gatherer will display color output when connected to a terminal, but will use bland output when its output is written to a file. This option should only be needed when the detection mechanism has failed, or the user doesn't want to see colors when running the program by hand. All. Displays all log messages. Most. Displays more messages than default. Quiet. Silences all output. level mask Only outputs messages that match the specified level mask. component mask Only outputs messages that match the specified component mask. Safe. Tries to keep sensitive information out of the displayed messages. Configuration File Options config file Uses the specified XML configuration file. config file Parses the specified XML configuration file and exits. Database Options host Uses the specified host name for connecting to the database. database Uses the specified database name. user name Uses the specified user name for connecting to the database. password Uses the specified password for connecting to the database. If no password is specified, the user is prompted to enter one. Recaching Options device id Performs an interface recache on the specified device. device id Performs a disk recache on the specified device. Recaching options are intended for use by the web interface. These options should not be generally used by end users. Contact Information We have great aspirations for what NetMRG could become, but as with all open-source software, such aspriations can only be achieved with the active participation of the open-source community. Please do your part and support software that you use by helping to answer support questions on forums and report bugs to developers. Thanks! Main Website - http://www.netmrg.net/ Online Docs- http://wiki.netmrg.net/ Support Forum - http://lists.netmrg.net/ Bug Reporting and Tracking - http://bugs.netmrg.net/ netmrg-0.20/share/doc/man/0000775000076400007640000000000011000016355015526 5ustar silfreedsilfreednetmrg-0.20/share/doc/man/man1/0000775000076400007640000000000011000016355016362 5ustar silfreedsilfreednetmrg-0.20/share/doc/man/man1/netmrg-gatherer.10000664000076400007640000000654111000015417021543 0ustar silfreedsilfreed.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "NETMRG-GATHERER" "1" "11 April 2008" "" "Manual Pages" .SH NAME netmrg-gatherer \- Gathers data from devices. .SH SYNOPSIS \fBnetmrg-gatherer\fR [ \fBOPTIONS\fR ] .SH "DESCRIPTION" .PP \fBnetmrg-gatherer\fR performs tests on all enabled hosts in NetMRG. It will store results in RRD files using RRDTOOL(1) and perform actions in response to events. .SS "GLOBAL OPTIONS" .TP \fB -h \fR Displays usage information and exits. .TP \fB -v \fR Displays software version and exits. .SS "OPERATING OPTIONS" .TP \fB -t \fInum threads\fB \fR Run no more than the specified number of threads simultaneously. .TP \fB -X \fR Become a daemon. .TP \fB -M \fImode\fB \fR Mode of operation. This option controls the manner in which the gatherer operates. The modes currently supported are "once" (the default, best used manually or via cron) which runs all tests once then exits, and "wait" (best used when daemonized) which will run all tests, wait for the gatherer interval to expire, and then repeat. .sp .RS .B "Note:" To run \fBnetmrg-gatherer\fR daemonized, the recommended set of options at this point is "-X -S -M wait" which will daemonize, repeat the gather cycle on each interval, and write output to syslog. .RE .SS "LOGGING, DEBUGGING AND VERBOSITY OPTIONS" .TP \fB -S \fR Syslog. Logs messages to syslog instead of stdout. .TP \fB -b \fR Bland. Disables color output. By default, \fBnetmrg-gatherer\fR will display color output when connected to a terminal, but will use bland output when its output is written to a file. This option should only be needed when the detection mechanism has failed, or the user doesn't want to see colors when running the program by hand. .TP \fB -a \fR All. Displays all log messages. .TP \fB -m \fR Most. Displays more messages than default. .TP \fB -q \fR Quiet. Silences all output. .TP \fB -l \fIlevel mask\fB \fR Only outputs messages that match the specified level mask. .TP \fB -c \fIcomponent mask\fB \fR Only outputs messages that match the specified component mask. .TP \fB -s \fR Safe. Tries to keep sensitive information out of the displayed messages. .SS "CONFIGURATION FILE OPTIONS" .TP \fB -C \fIconfig file\fB \fR Uses the specified XML configuration file. .TP \fB -K \fIconfig file\fB \fR Parses the specified XML configuration file and exits. .SS "DATABASE OPTIONS" .TP \fB -H \fIhost\fB \fR Uses the specified host name for connecting to the database. .TP \fB -D \fIdatabase\fB \fR Uses the specified database name. .TP \fB -u \fIuser name\fB \fR Uses the specified user name for connecting to the database. .TP \fB -p [ \fIpassword\fB ] \fR Uses the specified password for connecting to the database. If no password is specified, the user is prompted to enter one. .SS "RECACHING OPTIONS" .TP \fB -i \fIdevice id\fB \fR Performs an interface recache on the specified device. .TP \fB -d \fIdevice id\fB \fR Performs a disk recache on the specified device. .sp .RS .B "Note:" Recaching options are intended for use by the web interface. These options should not be generally used by end users. .RE netmrg-0.20/share/doc/dirtree0000664000076400007640000000133107713015225016345 0ustar silfreedsilfreedideal cvs tree migration bin cmd -> libexec dat -> var/log db -> share/ doc -> share/doc images -> share/images include -> www/include lib -> www/lib rrd -> var/lib/rrd src www -> var/webfiles ends up like bin etc libexec share /doc /images src /include www /include /lib /webfiles var /log /lib ideal install $(EPREFIX)/bin (netmrg-gatherer) $(EPREFIX)/etc (netmrg.conf) $(EPREFIX)/libexec (tests) $(EPREFIX)/share/netmrg (images, db) $(EPREFIX)/share/doc/netmrg (docs) $(PREFIX)/var/www/netmrg (include, lib, webfiles) $(PREFIX)/var/lib/netmrg (rrd) $(PREFIX)/var/log/netmrg (lockfile) netmrg-0.20/share/doc/rrdworld.xml0000664000076400007640000000132610360343546017353 0ustar silfreedsilfreed NetMRG Brady Alleman, Douglas E. Warner, Kevin Bonner A network monitoring, reporting, and graphing system. Using MySQL, PHP, C++, pthreads, and RRDTOOL, it is capable of monitoring thousands of arbitrary values at user-configured intervals (typically 5 minutes). http://www.netmrg.net 2006 1 GPL http://demo.netmrg.net dev@netmrg.net netmrg-0.20/share/doc/netmrg-logo-small.png0000664000076400007640000000334010173042724021032 0ustar silfreedsilfreed‰PNG  IHDR##Ù³YsBIT|dˆtEXtTitleMade with SodipodiŸô/'tEXtAuthorUnknownŒ! òzTXtDescriptionxœKT(ÈL.)-J_~êô ,/IDATxœ½˜}LÓGÇ¿í¯¥@éD´°*–Q l„b‡Hƒ4ØØhd†ˆáÅ-™Ë0’ý1ÿYfd[LdN‡bÜtS§dJÀùΛšQ•!vãUŽaúF…ÖÒÞþ¨òÖÑoÒäžçî¹ûÜs×»k)¸Óßß_®ð÷÷400ÐÀú”˜Y‹rW‘š™™ùAVVÖ&“i£F£ÙÁçó7 …Bßîîî&c/ ÌA111WšššÈT©T*²{÷nm ï‘Éd‡‚ƒƒÃ^:ŒX,V7êïï'GŽ! …Â2,“ÉÊ$Éj´9Y¼xqL^^Þ#w0S5::JÊÊÊHNNŽ-,,lD*•ÖÉåò­X/ {¼¶¶öYY¦Éf³¥RIvîÜI¢¢¢ÆV¬XÑž””T ¸îÆt™ÎÈÈÈ†%åv?“ºººPQQòòr‹F£Z´hѓɴ·²²Rõ,ñééég•‡4Y yØ3aêt:rúôi’žžn]¶l™víÚµ—RSS7¸LŒD"ùº´´ôÅA¬fBjÒ ¹‘ã´Úb±ªª*²}ûv’ð—S˜ÈÈÈV£Ñ8;€®3„œ %äf>!•)„!Ç}Ñw¸ ÓëõYt',œ€€€6›í~!¿ ŽþöC;дø÷7»oÜ´pÝ—þžµ´´ôªŒH$ÊHKKópôþîÜyhÜT®FLúÕuÀƒ«Îì<è[›;€òh`ìqÜp#ô—ÞÉÎÎ~àÃ`0²’““íÆÀ5 &Pߘl ¹ Üʈ Ð5W¡z{]k1@\\]f P!š¿†ÿ*7Ú¿k›1löQ°Î„¡X,–€ÇãÙ­æ}€E(ó€Gzàþ¯öNLê)pÀùx nÐ]êä‰,†Éòàmà\, kA{Ÿ¹SÛÉ …}‰jž {ÅppInŸ‘³™[Ç€ÖƒîAœi܈þq¾eíç7~€i™ár¹§(V1ÐwP}ØÆ'+‡n¹^‚Pϯ€˜‘X ’ˆ&9 2Ïù ®Ô5Djž”'2ÃápD+ã~°¾:^£/)®h›øÎOÁ‚U‰çL‚D¯%!¯ ÆOsOsûØOì‰eÒiuRMî.€b€@<ŸÂíK{a8wNÜœj?Y¦×É‚%> ìl¹K™¨z×ɋߨ =iXÍ{ÁÛ\Û¾ö»§`Äbqîg[6PÑ èˆçRøn9 ¾4œ^é…Ä@ ™èHòÆe™VùÏè#!AÝuÆÁ²Ã¿8ÀX­ÖMŸ¼§@m‚7J¤,x=ƒÍ.g!ˆmO h {ßfaÓ¾Õ¾ZæÏçä‰[HÇ÷Ñ,¬­? €Ì„ñær¹‹8¼)€ç9ýPæ³éØ#f“"Ø#fÁgÊa°r!…­K™úÐÆg€éìÚÀaL>UòÞdbXý”JeCC¡P¸¥¨¨Èú´—Á™n‹Sÿè8!V›½œY7FpjdÚ'⼑4ë­duõ(y§r”BÈþýûïðšÉÂ`³Ù[ׯ_ïbN“J[Âpê÷š²L_Dx ¼Ï í£Éìê·^£ãÂ*/tm•JÕ'¿¹èƒ!´°°ׯ_‡Íf{“[ûб-„9aGͧ#G`·)Ê¡cppmmm7ÅS:®Çã5VWWûíÛ·ÏO©T²(Š¢ñù|0γáNËýèðó Ãσ†\!"ßé;üرcÚâââ,Ƨv–™˜˜øsLLLojjªùäÉ“D«Õ>çÛÓµ222êŸ{† ¸III±±±-kÖ¬)**"½½½³"ñññ?Î f†Xr¹|«T*ýC&“ X›››Ÿ æðáæÀÀÀås3U4‰D²Z&“•ÅÇÇ÷äçç›ëêêˆÍfs “’’òÏ\ƒ8(888L&“’J¥m¹¹¹†‹/³Ù< D£Ñ¸¸¸ /f†ü¤Réθ¸¸úM›6©KJJlƒ=zÔ&‰6º œÛ¿.ŋ޽½³ÕjuhGGÇRWÿH¶æ¨—/=IEND®B`‚netmrg-0.20/share/doc/TODO0000664000076400007640000000602011000003340015427 0ustar silfreedsilfreed== Requirements for 1.0 == bug#38 - inline docs bug#55 - Solaris support bug#56 - MRTG conf importer == global == documentation Usage information (description of every page) user preferences themes a device's type can affect the list of tests that can be performed on it == balleman == - ability to compile against librrd instead of using a pipe (should be able to compile for either) - rrdd support? - portability - freebsd - solaris == far-away features == customized 'view' page - on the main view page, select boxes to pick which graphs you would like to see (makes it easier to compare some graphs) - ability to move graphs up/down despite their original ordering (session fun) fast-fourier transforms for what data 'should look like' themes/skins for UI and graphs - I'd like to see a neon theme ;) - balleman distributed netmrg - have other netmrg installs that can report back to a master install that maintains all the rrd files. - how to delegate tasks: have the master keep a list of tasks for the slaves, and have the slaves get them periodically? this will require the installations to be named - new idea (2004.09.01) - derivation of other ideas * boss/worker setup * [boss] daemon figures out what needs done and puts that into a [jobs] table * [worker]s clock into the [timeclock] so the [boss] can give them [jobs] * if the [boss] notices that a [worker] forgot to clock out, it clocks them out itself * [worker]s report their [job_result]s back * have the [boss] keep a schedule in a MySQL Heap table. It can reschedule items by just bumping them up in the queue [worker]s can then just poll the mysql table for new tasks for it If the website allows for certain devices to only be polled by certain [worker]s, then the [boss] can just assign tasks to that [worker] wizards - /wizard dir - index.php reads in other files to know name, description, etc - used for generating/updating special/large devices (catalyst switches, maxtnts) == FOR A RELEASE == version bump in: configure.ac (run bootstrap) share/netmrg.mysql share/netmrg.spec share/doc/VERSION www/lib/static.php www/webfiles/updater.php bugs.netmrg.net generate new template database mysqldump --skip-extended-insert netmrg > netmrg.mysql update docs w/ release notes generate new docs ./bin/makedocs test tutorial test upgrade from previous version branch/tag SVN (ex: netmrg-0_10) build tarball ./bin/makedist - upload to devel, maybe release for non-devel releases, build RPM from tarball update docs on wiki.netmrg.net update demo.netmrg.net announce on www.netmrg.net announce on lists.netmrg.net announce on freshmeat.net notify other package maintainers == branching/tagging svn == svn copy \ svn+ssh://argo.pyxos.net/home/svnroot/netmrg/trunk \ svn+ssh://argo.pyxos.net/home/svnroot/netmrg/branches/netmrg-0_19 svn copy \ svn+ssh://argo.pyxos.net/home/svnroot/netmrg/branches/netmrg-0_19 \ svn+ssh://argo.pyxos.net/home/svnroot/netmrg/tags/netmrg-0_19_1 netmrg-0.20/share/doc/netmrgdoc.css0000664000076400007640000000231610140766676017477 0ustar silfreedsilfreedBODY { background-color : #FFFFFF; color : #000000; font-size : 1em; font-family : serif; } TABLE, TH, TR, TD { margin : 0; padding : 0; border : 0; } DIV, P, PRE, BLOCKQUOTE { margin : 0; padding : 0; margin-bottom : 0.5em; } IMG { border : 0; } .TITLEPAGE { background-image : url(netmrg-logo-medium.png); background-position : top right; background-repeat : no-repeat; } .TITLE { font-size : 2em; font-weight : bold; font-family : sans-serif; letter-spacing : 0.2em; } .NAVHEADER th { height : 35px; background-image : url(netmrg-logo-small.png); background-position : top right; background-repeat : no-repeat; font-size : 1em; font-weight : bold; font-family : sans-serif; letter-spacing : 0.2em; } .AUTHOR { font-size : 1em; font-weight : bold; margin : 0; } .FILENAME { color: #007A00; } .SCREEN { background-color : #E5E5E5; border : 1px dashed #D0D0D0; } .PROGRAMLISTING { background-color : #E5E5E5; border : 1px dashed #D0D0D0; } BLOCKQUOTE.NOTE { background-color : #F6FFBD; border-top : 1px dashed #FFE856; border-bottom : 1px dashed #FFE856; margin-left : 2em; margin-right : 2em; padding-left : 0.2em; padding-right : 0.2em; } BLOCKQUOTE.NOTE P{ padding : 0; } netmrg-0.20/share/doc/VERSION0000664000076400007640000000000510557704604016037 0ustar silfreedsilfreed0.20 netmrg-0.20/share/doc/netmrg-logo-medium.png0000664000076400007640000001215410173042724021205 0ustar silfreedsilfreed‰PNG  IHDRddpâ•TsBIT|dˆtEXtTitleMade with SodipodiŸô/'tEXtAuthorUnknownŒ! òzTXtDescriptionxœKT(ÈL.)-J_~êô ,»IDATxœí{pS×Ç?÷¡+]KòC B <Ì+˜@âX&›.I¦õ$mÉ4 ´ÓÚÍlCw»0Ùl!}d'm= B²K[³»­ ¡@pC‚!Òà…àÆ&ƒØØ’%ýC–mIÖËÈ<>3KWçœ{îï{ïùû»÷œ£0ˆhš¶GQ”åGêç`îï&áɼ€„,Ën]×÷߯$µf7(«1eÊQPP TUt‹ˆ”””“À³ÀÌdVò†!%%åM@lÙ²E!DKK‹Øºu«X¹r¥°Z­½Ä1™LMªªn–Z2ë}½¢+Šâ’eY466о8N±k×.±fÍ‘““ÓKUUº®WÅ€-©GqQˆyóæõ#Gëׯ3fÌè%Ž$I‹Årø.06™tM£iÚk€Ø¸qcD‚R__/ÊÊÊÄâÅ‹…¦i½²X,§eYþ0’xˆ×²ÑhlDMMMÔ‚ÒÞÞ.¶mÛ&Š‹‹…ÍfëëwZŒFã`)`Jæuæbܸqq‰Ñ·Û-ªªªDii©ÈÍÍíëwœ‹å àq`X2~È!IÒF@”––&T¾?~\lذAäçç Y–{ùÔÔÔ£ÀÓÀø¤c(’’ò) ªªªU@Î;'6oÞ,ŠŠŠ„®ë}ýNÁ`ø 0“i›d ›Í&Ün÷U$»Ý.*++ŪU«DVVV_¿Óf6›¯¨'ÓPW‹@'EŒ¾x½^Q]]-Ö®]+&MšÔ×ï¸ÒÒÒöâ‹(ŒH¦Ñ ³Ù|åååÉÖ"(µµµâ…^èÊ‘$É›žžþ¡¢(k;’kÅÄa“$É£išhooO¶í¤¹¹9d(Çjµ6èºþ"°P’jÕ8(Ä¢E‹’më¨ñ‡rV¯^Ý/”c2™.¥¥¥•æd8*t]ÿ# ÊÊÊ’m߸ñ‡ròòòúú.›Í¶ø02™öMUU êêê’mÏ„RWW2”“‘‘qBÓ´w&ÕúAX ˆ¼¼¼dÛoPiooåååAC9V«õ|jjêK@ &Q PUõe@¬[·.Ù6»jøC9%%%ýB9&“Éž™™Y¬¬W]“ÉtGŽI¶’†?”3wîÜ^¡EQÜÇ?¤ªê`ÔÕÐ#£FJ¶M¯'ê,áB96›­Öl6?L,AÖâ©§žk$¯Gˆ·âø/â*Æn·‹ŠŠŠ ¡«ÕÚœ™™¹ø"`Hˆf³ù ÞxãÄb(àq ñÖ?ñš"ÄŽ»…ÞÄëñˆêêjñÌ3Ïô åF‡ÅbùM¼OÝr€:‹ÅBSSF£1^}“Û{‚†]¾ïŠæo±_Nø®>ùä*++Ù´i'OžD×õ]ñ†£—,^¼øÚÃãgKèß]m°{I'œÚ2(ÕÉÍÍ¥¤¤„Ñ£Gàp8¶Å%ˆÙl~ ¨¨(Õ» üõYøÃdxs!¼W­öüæ8ëÛ~nÿ|Áç»úoOíííTUU¯éÚO“e•e¹U’$¥±±‘ÌÌÌ„TpÐðvAåÌÞ"¨:¤N€ôIÐz Z‡Î?j)<°=áÕ*//ç‘GÁl6ÐÙÙ9=ž;Ê%^¯WY°`ÁРæçÐúQïmn´|àûˆ  é0 ›•ÐjUVVÐÙÙù_Ç#M£Ñø%€+V$¤ba9ó&ÔUÄQ€€¿móýg+{>Ž:ôÇív³sçNÿ×Jˆ=æ¢!–ÂUðöz¨^ žË`Ì€¬{¢/£ö7Ð|4þº\Ø—>knüeïü©œÖÖVt]op85û²ÀårY&NœÈøñƒøb‡×o} :>õ9Ý·ƒ–¿F_Ní«>/öF_Ç ÇžüJv]¤âåïø>º\Ûü›cDQ”!‚«££:?‹e>ª¾ þPÞg°ïaßY)g÷úzI‰âl\>ß{Û™ðúl8²ª¿ o…/ÃÛ{VðúÁ&<Ïý?Å$ˆ¦i+!Aö?NLm÷ûë¡®²ÿööS°çApœ‹¬œã/‚»3úý‡¢³ÎW7€ŽÓ°g9ì[ésø°ŸósÓáÐeT=Êñ£oóɰ˜p¥¯‹ “GöðáÃÉÏϪý”ïì<·¯nŸýþï B43?òÂÕ¾œ‹Çáüèö { ú)Ø>ê·ûîñ‰Ôv²Þ÷¾uTv·¼ƒ²ðøŽE"€¥K—"Ëa²~._á…·À¹·#+ýR-~:ü5øÎÀ=Ë¡ëRè4ü8›#Ûo4´Ÿ‚/ûüZ(:þ{ŠÀþy϶O§^á¡ò}ߦÖK®ßf‹Z³Ùü( Ð\µƒsU=ß|wÆ}Ϥ¾tu@ÕW =BѸß×vÿåi_Þ@g¡1“`°hÿv/×E¸xÿ\m4¶Á¡Ó *’Þ ÌízpÖd2IMMM˜Í!^ÂØSõ¯÷ßžû¸ç×ÁóœÝç3l¬ÝÓ´Û!gL_ ø&œÜ[Y‰&k¾/&Öäë ¼ò6<ñŒÌ4=Ûìì5¤/Úûe€´páÂÐb\8ú̬«€S¯Áø¯öl8ò œúÏþ½—hh;éû«ß£ ¡aoìe%šÆwz}õû³ÍÎWú&J”””•v»=|sõþúÐζ«>ÜÙ÷ƒ9ÚNÀÕÐøgŸ¯I~a†(ìî ™õkF¢Dw: %IbùòåÁSœÝï†/¥ícx÷ ¸u œ(‹Ü_\'ì©GŒ´ζ8ëûþ x<ìY³ÈÎΞâØp‡éõøixË×ö8¢Øýõ¿wÕÔæ ú%â^–¦iA˜`bý8?ÀÕáG¸oH1„€×»Ë]þ7XšH‘%IZaº»ýtàní Î{§¡±lVµx?XšH›¬9N§3}̘1L:µ÷/þ›¤óÕñÕöÀß»^ñß¡ÒD$ˆ$I !(ZV§^…ó}w¢ó=—Qßëž ÿÝy§çw¡ÒD$ˆ®ëÛívŠ&4À;_OLín0NŸ‡ã  k²Ûáòî •.’k·ÛoKKµrof˜æMÂâo®lVõÀ*]$‚,™‘†Áõù@io¿ Ÿ7»úÝ2  f³ù€¢I­‰¨× ÉE;ìÿd ì —v Alv»}¶*KNJàCžŒÇÀí…œáÆZ ìs…œz¡B‘©ñýÝé€?<,B|ö} !K}ž~ð³’_ ¯9Õ¯÷çàyâË/ÛºŸBŸmvþŠ+ˆ)%åáËv; Ù ø•:§{'} ¬Ò„¨èÀùÀgt^©;UϦ¾R®Aš>¿HR°4a¶I=ú¥•zö ¼.^ø%àÂåáAŠp¿~4E3^ò¸œÿ~ ²n¨¬›ãÃ}°¡cú°FçŦ[J·Üçq95nxSŒx8²W祭‘$)ˆªª0kY"ªuãrÔש]Îÿ‰$yHAdÍô3 ,ä.›Ì¢[®Ù º ©ÅœæÞ‹$K(Aò\öŽ R‡Cnø—‹Ç[$~·‘í÷šøÒ(寛ÿ(ÝÍ•dNû¾9Œ$”ý|=föï~e‚—fcQ0ÈåóMAÜçë6Gš%¨ zší1f„n®Røádûoé±”,I¼:×Ä“ã Xâ4à艿¥°ý^šY4òk[ϧï#4/°;ÒlÁÌ–ãhk¹Íh21{áý¼ÛÖÿEP øÚX•5‚ÏyüâL#é(;ÕEsÈ0ZðÊÜ=Bæþ,…ïÜ®‘jè¹ÔÊf9ÔäàŒ#Ž!W“#>g®dO¨uöQÄGƒvÅÀÒ¥……ìüç¯qÙ µ^:Ý= –Ü¢ðÛ»ÃOÈv_–ŠA†÷š=\Žð…’{FȼµP§ KŨôn÷,‰ó—ï6%èí”A`¢UâÉq\^8»õ9ĹOðÍè¼ñÓ»~MVJJÊ•qƒª,ñüt#;îÕ™có%ž.ó‡{"›•µd¢ÆŠQ‘µ]·˜à§yFä0>ë_§jLOºÝ†GǨ<7ÍÈŸò½(5öùßóŸ†x308}Îzùòå»%IbÙ²žû™6…êE:¥·«TÜc¤Dîµ>ÓÈlÛÀF|x´ÊL[x?a%¾7Ñ€ij2=]æ“}MøÞ=»ér91§¤|4FSNßC[âõzջ¬¬¬Þ %‰ŸÍ01Ú5¬‰ç¦j 3jzV†Ì§G6¬ºø6÷ŒZ^¾>VÅ ûNԾ㣡—uýã=LmÑH•GGoºÒTX7Eëç3Âñ“é#†Ð°øÙ™2ßšà›Ãëõ²cÇÿOA¸„'PA7ø³Fæ ëuÞª°ìÖèúÈS3–‡ÉcÓ®ÞD‰F¾3Á€Ôíûª««¹pẮ75Ñ–h¡.—Ë’››ËäÉ“TÝ ²Ä/gÉèÜn•xiVlÓ¶ÿ4ÏÈDkÏUeÓ`Á0™ïÞn`÷}&ædÆïhÐ_å“yô =óÆø›«ÀqƒÑpå4SåAÇú½ÝgSx"×ÀsÇ»P%(h M‹í¶>]“øêXÛ?w3Ë&óÕ±¦eô\OŽmu⌣—<;SfÅ(•²]œ r'aQàŸ&÷¾ó 8n0®XC×õÏGö¾}û(((ˆ¥¬ˆBpÿ[4YâÍûwré…{íì;›"F~5ÛÈcc jòð­ÃN·ö.«p¤ÂŽ‚žc8uê&L@Ó´—Ë•NÀPµHñ_“GvFFóçÏé"E’$^kdÓœÁ_Ùèé;4¬1:“üa2õ5Ew SøóuÎQ®4a6 ~4-øÕ!IÒbz)(,,DU?Š7Ƭ0Æ<øn·0[eA ]d‹ÿxGoc§¨¿Ÿ¯óãéÙ&¸?KéÕDTTøÆ¨;‘=û† ¾qƒ×ά>Q°îNƒÍZ¢ˆ©-¡ðwÙÁOÌoß®±0K!µÏüoÍÍÍ8pY–=^¯÷Í ™#@²:;;§ –,Yk9C–9ÃfE~•dàÙ)á›ÓÉé 9}®ð;vàñxÐuý ‚A2Á‘é7XPP@jjj¬å i6LÓaïzþ…Y™Ñ7swçåQg@Ñu}ƒÛíg0èêêbĈØl××ju6£ÌGm^þz1|+ͯÌ1‘Ý=ŒÓéäÉ'ŸÄår<´ÇZWYQ”f£ÑxùäÉ“”––2nÜ8&OžÌÚµk9xð ^ïÐ wGÃóÓ4¾`Ïs÷°Ø®Ž}ûöÑÑÑÙl>‰oÍߘ‘;::¾ât:S233_µZ­-555lܸ‘üü|²³³yâ‰'¨¬¬Äá¸v‡¡ÐeVÜÚØVþåÎØºâñûê”™f6›WÆG[ZZ®L¥ë:<ðEEE,[¶¬_Dx¨sÙ#øÓ]¼ÛäåãK^j/y¯<Ñ\|‹ójNNgΜ˜Aˆ¡j‰d”ªªk†~HQ7=«?‹¹sçŠ 6ˆãÇ'd^Û«Mg—WüöS—(~×!^ˆmͬ#GŽøç{cփر+333+L&“Ý/ rssEII‰¨ªªJÚ‚`É`ݺuþµE^N† ¨@AjjêKV«õ<½ç7ÅÅÅ¢¼¼üšXþ(}YœL1‚q§¦i?ÌÈÈ8A€8š¦‰Å‹‹²²²ër±ºW¸fˆ/;>ø†ÍfÛ¯ªjååå‰õë׋£G&ÛžqSVV&ѽÜÓ5ƒx(--­Üd2]"@œœœ±zõj±k×.át:“mߨY´h‘ÿXŠ“iàxP€º®¿hµZè½tƒX¹r¥Øºu«hnnN¶­¤½½]hš&$Iò×MhãEQÖ¦§§(I’—žÕÐDAAxá…Dmmm²m”òòrˆîÅ4¯KF«ÒÒÒöªªê"àê™4i’X»v­¨®®^obÖòˆ—ââbýJ’i´«…™Íæ_›L¦6ÄÉÊÊ«V­•••Ân·'E ·Û¸J[b¦¹¾†yƒá'‹¥Žqt]EEEbóæÍâܹsWMªª*ˆî¥ÊoxÆO§¦¦ív¨WB9ùùùW%”SZZê_ÔxcrM1ôjA6nÜè/çµdàµÎX໋åP ßÄŒ3¢ åÌ›7ÏŸ÷ú{E'IØ€b]×+ü+\ûÿrrrÄš5kB†r…,ËBQ¾®ùMŒ,QUu“Édj"D(§¥¥E!Ä–-[üÝݘ߻ºItÌžMII9I€8þPΔ)SüÛV%³’7*c€o뺾_–å+®ñM0h/$pˆÿuMPØ=™t†Ëåúâ`íèÿâ›7ÞHœ¿IEND®B`‚netmrg-0.20/share/doc/html/0000775000076400007640000000000011000016355015717 5ustar silfreedsilfreednetmrg-0.20/share/doc/html/index.html0000664000076400007640000000607311000015417017720 0ustar silfreedsilfreed The NetMRG Reference

The NetMRG Reference

Brady Alleman

Douglas E. Warner


netmrg-0.20/share/doc/html/softwarereq.html0000664000076400007640000000733511000015417021155 0ustar silfreedsilfreed Software Requirements

Chapter 3. Software Requirements

NetMRG Requires the following packages for compilation.

  • PHP, Version >= 4.1

  • MySQL, Version >= 3.23

  • RRDTOOL, Version >= 1.0.28

  • Libxml2, Version >= 2.30

  • Libstdc++, Version >= 3.2

    Versions earlier than this may compile just fine, but may experience runtime issues. Specifically, we experienced software crashes on an SMP machine running version 2.96 that were resolved by upgrading to 3.2.

  • NET/UCD-SNMP, Version >= 4.2.2

netmrg-0.20/share/doc/html/netmrg-gatherer.html0000664000076400007640000002427111000015417021704 0ustar silfreedsilfreed netmrg-gatherer

netmrg-gatherer

Name

netmrg-gatherer -- Gathers data from devices.

Synopsis

netmrg-gatherer [OPTIONS]

Description

netmrg-gatherer performs tests on all enabled hosts in NetMRG. It will store results in RRD files using RRDTOOL(1) and perform actions in response to events.

Global Options


-h

Displays usage information and exits.


-v

Displays software version and exits.

Operating Options


-t num threads

Run no more than the specified number of threads simultaneously.


-X

Become a daemon.


-M mode

Mode of operation. This option controls the manner in which the gatherer operates. The modes currently supported are "once" (the default, best used manually or via cron) which runs all tests once then exits, and "wait" (best used when daemonized) which will run all tests, wait for the gatherer interval to expire, and then repeat.

Note: To run netmrg-gatherer daemonized, the recommended set of options at this point is "-X -S -M wait" which will daemonize, repeat the gather cycle on each interval, and write output to syslog.

Logging, Debugging and Verbosity Options


-S

Syslog. Logs messages to syslog instead of stdout.


-b

Bland. Disables color output. By default, netmrg-gatherer will display color output when connected to a terminal, but will use bland output when its output is written to a file. This option should only be needed when the detection mechanism has failed, or the user doesn't want to see colors when running the program by hand.


-a

All. Displays all log messages.


-m

Most. Displays more messages than default.


-q

Quiet. Silences all output.


-l level mask

Only outputs messages that match the specified level mask.


-c component mask

Only outputs messages that match the specified component mask.


-s

Safe. Tries to keep sensitive information out of the displayed messages.

Configuration File Options


-C config file

Uses the specified XML configuration file.


-K config file

Parses the specified XML configuration file and exits.

Database Options


-H host

Uses the specified host name for connecting to the database.


-D database

Uses the specified database name.


-u user name

Uses the specified user name for connecting to the database.


-p [password]

Uses the specified password for connecting to the database. If no password is specified, the user is prompted to enter one.

Recaching Options


-i device id

Performs an interface recache on the specified device.


-d device id

Performs a disk recache on the specified device.

Note: Recaching options are intended for use by the web interface. These options should not be generally used by end users.

netmrg-0.20/share/doc/html/overview.html0000664000076400007640000000501011000015417020445 0ustar silfreedsilfreed Overview

I. Overview

Table of Contents
1. Introduction
2. Revision History
netmrg-0.20/share/doc/html/upgrade.html0000664000076400007640000000727211000015417020242 0ustar silfreedsilfreed Upgrade Procedure

Chapter 6. Upgrade Procedure

After doing a 'make install' as described in the chapter on Installing NetMRG, the next step is to run the web-based updater. This is accomplished by logging into NetMRG with administrator privileges, and following the prompts. NetMRG's web interface will not operate normally and the gatherer will not run until the web-based upgrade is performed. Non-administrator users will only receive a message directing them to contact their NetMRG administrator.

If you need to perform an upgrade, the updater will prompt you to apply all updates. Clicking this link will perform all necessary updates for this release.

If for some reason an update fails, or you would like to re-apply an update for any reason, you can goto the updater and goto View all available updates. This will present you a list of the updates that are available and their status (applied, not applied, or error). If you have problems updating from one version to the next, you can force individual updates that fail so that they're considered 'applied'. Once all updates are applied for a particular version, the database will be automatically updated to the latest version that has all updates applied.

netmrg-0.20/share/doc/html/installation.html0000664000076400007640000000540511000015417021310 0ustar silfreedsilfreed Installation netmrg-0.20/share/doc/html/revisions.html0000664000076400007640000002062011000015417020624 0ustar silfreedsilfreed Revision History

Chapter 2. Revision History

  • 0.20

    2008.04.11

    Major feature enhancements and bug fixes; Fixed compilation under GCC 4.3; restructuring of view pages to show graph titles (for easier in-page searching) and icons for graph actions; fixed mysql 5 compatibility; added device properties (keeps track of things like model #, serial #, etc); added ability to chain interfaces to travel between them; added ajax monitor selection on graphs.

  • 0.19

    2006.02.03

    Major Feature Enhancements and Bug Fixes; Major Web Interface redesign to give more room for graphs and ease overall use. Security enhancements behind the scenes to ensure correct permissions checking. Added a search interface that will search groups, devices, sub devies, and sub device parameters. RRDtool 1.2 support (including graph smoothing); Depricated use of netmrg_cron.sh in favor of using netmrg-gatherer; migrated bulk of docs to wiki; numerous other bugfixes and enhancements.

  • 0.18.2

    2004.11.09

    Minor Bug Fixes; Fixed some escaping problems on the interface cache page, disabled the 'quickprint' Net-SNMP option for better compatibility, fixed the snmp-failure test, fixed an SVO-user view issue, and added failover for duplicate ifNames when adding interfaces.

  • 0.18.1

    2004.11.01

    Minor Bug Fixes; Fixed a small bug where the gatherer would not register negative values.

  • 0.18

    2004.10.25

    Major Bug Fixes; Fixed an issue preventing form submissions on some browsers, fixed PHP string escaping problems, fixed inability to create inverted stacked graphs, and fixed parameter substituion and documentation regarding notifications and responses. Added better support on FreeBSDs (4.8-5.2) and x86-64 architectures (Linux and FreeBSD), the ability to multiply summed values, MySQL timeouts, simple value parsing (to get the numeric content out of quoted numbers, etc), graphic icons for most actions, support for a default external auth user (with regards to permissions), and cleaned up the gatherer build process output.

  • 0.17

    2004.09.13

    Minor Feature Enhancements; Added colorized gatherer output, checkbox support on multiple pages, the ability to disable users, fixed a potential SQL-injection bug, updated navigation on group pages, updated tutorials.

  • 0.16

    2004.06.10

    Minor Bugfixes and Feature Enhancements; fixed a user management bug and several bugs related to 'single view only' users not being able to see graphs, added the ability to ignore SNMP uptime checks for devices (permitting the monitoring of broken devices), added the ability to do an SNMP walk of an OID (useful for the Windows SNMP agent), enhanced group/device management, cleaned up autoconf (now supports FC2), and added experimental syslog and daemon support in the gatherer.

  • 0.15

    2004.05.20

    Minor Bugfixes and Feature Enhancements; fixes for various db errors (including the infamous one on snmp_cache_view.php), better cross-platform compilation, select all/none/invert checkbox support, support for choosing what graph to apply to an interface, better support for php < 4.2.0, and some security fixes for single-view-only users.

  • 0.14

    2004.03.10

    Minor Bugfixes and Feature Enhancements; escaping issues in template dereferencing, broken links on various pages, security issues regarding manual SNMP recaching, broken duplication on non-cutting-edge MySQL, more parameter substitution in SQL tests, better date parsing for advanced graph view, nav-bar and group navigation enhancements, advanced view capability for monitor-only graphs.

  • 0.13

    2003.12.19

    Minor Bugfixes and Feature Enhancements; slide show ordering, previous slide, resume slide show, better formatting of 'sums', errors on view editing, fixes to permissions checking, and an occassional segfault in the gatherer was fixed.

  • 0.12

    2003.12.15

    Major Feature Enhancents and Bugfixes; added SNMPv2 support, fixed a bug that would cause a device to be deleted from all groups, fixed session timeout when using external auth, added checkbox support to interface/disk cache pages, slide show enhancements, fixed permission issue where unauthorized users could view/edit test_* pages

  • 0.10

    2003.10.05

    Major bug fix; fixes a db error when trying to view monitors, a bug that would always set the width and height to zero when creating graphs, and makes conditions with 'rate of change' work. Many documentation upgrades.

  • 0.10pre2

    2003.09.15

    This release focuses on adding new features and sqaushing bugs. In addition, there is now an 'updater.php' that is required to be run between versions. A minor change needs to be made to everyone's 'netmrg.xml' to add an 'externalauth' field inside the 'website' section.

  • 0.10pre1

    2003.07.28

    Initial publication

netmrg-0.20/share/doc/html/intro.html0000664000076400007640000000566111000015417017746 0ustar silfreedsilfreed Introduction

Chapter 1. Introduction

Welcome to NetMRG! NetMRG is a database-driven network monitoring and graphing tool for use on Linux systems. It offers an intuitive web-based configuration, customized monitoring capabilities for unusual situations, a fast multi-threaded polling application, and brilliant graphs rendered by RRDTOOL.

This document aims to guide you swiftly through the installation and configuration of NetMRG, as well as act as a reference for those with existing installations.

netmrg-0.20/share/doc/html/manpage.html0000664000076400007640000000523111000015417020214 0ustar silfreedsilfreed Manual Pages

I. Manual Pages

Table of Contents
netmrg-gatherer -- Gathers data from devices.
netmrg-0.20/share/doc/html/install.html0000664000076400007640000001535211000015417020257 0ustar silfreedsilfreed Installation Procedure

Chapter 5. Installation Procedure

  1. Untar to some directory like /tmp/ (it will untar into a 'netmrg' directory)

    cd /tmp
    wget http://www.netmrg.net/download/release/netmrg.tar.gz
    tar xzvf netmrg.tar.gz
    
  2. Now we need to compile and install the source. cd into the directory made by your tar command and type the following:

    ./configure
    make
    make install
    

    Note: If configure fails to locate the needed libraries they can be manually specified. Run ./configure --help for details on the necessary options.

  3. Setup the database

    Now we need to setup the database. Please change at least the password (netmrgpass below).

    mysqladmin create netmrg
    mysql -u root -p netmrg < share/netmrg.mysql
    mysql -u root -p
    > grant all on netmrg.* to netmrguser@localhost identified by 'netmrgpass';
    
  4. You need to modify your apache config in order to make your NetMRG installation live (commonly in /etc/httpd/conf/httpd.conf).

    The first is to alias /netmrg to the installed web directory (commonly /usr/local/var/www/netmrg/webfiles).

    Alias /netmrg "/usr/local/var/www/netmrg/webfiles"
    

    The easier way (if you're running Apache >= 1.3) is to just Include the conf file we've created anywhere in your file (near the bottom is fine).

    Include /usr/local/etc/netmrg.conf
    

    You will need to restart your Apache after making config changes. Telling it to reload its config should be good enough

    killall -HUP httpd
    
  5. Configure the Installation

    All of NetMRG's common configuration options are controlled by an XML file, normally located at /usr/local/etc/netmrg.xml. You should edit this file to make any necessary changes before continuing with installation.

    For most installations, you will at least need to edit netmrg.xml to reflect your database username and password.

  6. Setup Permissions

    NetMRG does not need superuser permissions to run, therefore we will setup a user for it.

    # useradd netmrg
    # chown netmrg:netmrg /usr/local/var/log/netmrg
    # chown netmrg:netmrg /usr/local/var/lib/netmrg/rrd
    
  7. Setup crontab

    You can setup the crontab entries in two places: either edit /etc/crontab, or run crontab -e as the netmrg user. For 'crontab -e', use an entry similar to this:

    */5 * * * * bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi"
    

    To edit the master crontab, edit /etc/crontab and add a line similar to this:

    */5 * * * * netmrg bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi"
    
  8. Point your web browser at your install, and start graphing things! The default login is admin and the default password is nimda. Point your web browser at the host you built this on (something similar to http://yourhost.com/netmrg/) and please change your password!

netmrg-0.20/share/doc/html/netmrg-logo-small.png0000664000076400007640000000334010173042724021776 0ustar silfreedsilfreed‰PNG  IHDR##Ù³YsBIT|dˆtEXtTitleMade with SodipodiŸô/'tEXtAuthorUnknownŒ! òzTXtDescriptionxœKT(ÈL.)-J_~êô ,/IDATxœ½˜}LÓGÇ¿í¯¥@éD´°*–Q l„b‡Hƒ4ØØhd†ˆáÅ-™Ë0’ý1ÿYfd[LdN‡bÜtS§dJÀùΛšQ•!vãUŽaúF…ÖÒÞþ¨òÖÑoÒäžçî¹ûÜs×»k)¸Óßß_®ð÷÷400ÐÀú”˜Y‹rW‘š™™ùAVVÖ&“i£F£ÙÁçó7 …Bßîîî&c/ ÌA111WšššÈT©T*²{÷nm ï‘Éd‡‚ƒƒÃ^:ŒX,V7êïï'GŽ! …Â2,“ÉÊ$Éj´9Y¼xqL^^Þ#w0S5::JÊÊÊHNNŽ-,,lD*•ÖÉåò­X/ {¼¶¶öYY¦Éf³¥RIvîÜI¢¢¢ÆV¬XÑž””T ¸îÆt™ÎÈÈÈ†%åv?“ºººPQQòòr‹F£Z´hѓɴ·²²Rõ,ñééég•‡4Y yØ3aêt:rúôi’žžn]¶l™víÚµ—RSS7¸LŒD"ùº´´ôÅA¬fBjÒ ¹‘ã´Úb±ªª*²}ûv’ð—S˜ÈÈÈV£Ñ8;€®3„œ %äf>!•)„!Ç}Ñw¸ ÓëõYt',œ€€€6›í~!¿ ŽþöC;дø÷7»oÜ´pÝ—þžµ´´ôªŒH$ÊHKKópôþîÜyhÜT®FLúÕuÀƒ«Îì<è[›;€òh`ìqÜp#ô—ÞÉÎÎ~àÃ`0²’““íÆÀ5 &Pߘl ¹ Üʈ Ð5W¡z{]k1@\\]f P!š¿†ÿ*7Ú¿k›1löQ°Î„¡X,–€ÇãÙ­æ}€E(ó€Gzàþ¯öNLê)pÀùx nÐ]êä‰,†Éòàmà\, kA{Ÿ¹SÛÉ …}‰jž {ÅppInŸ‘³™[Ç€ÖƒîAœi܈þq¾eíç7~€i™ár¹§(V1ÐwP}ØÆ'+‡n¹^‚Pϯ€˜‘X ’ˆ&9 2Ïù ®Ô5Djž”'2ÃápD+ã~°¾:^£/)®h›øÎOÁ‚U‰çL‚D¯%!¯ ÆOsOsûØOì‰eÒiuRMî.€b€@<ŸÂíK{a8wNÜœj?Y¦×É‚%> ìl¹K™¨z×ɋߨ =iXÍ{ÁÛ\Û¾ö»§`Äbqîg[6PÑ èˆçRøn9 ¾4œ^é…Ä@ ™èHòÆe™VùÏè#!AÝuÆÁ²Ã¿8ÀX­ÖMŸ¼§@m‚7J¤,x=ƒÍ.g!ˆmO h {ßfaÓ¾Õ¾ZæÏçä‰[HÇ÷Ñ,¬­? €Ì„ñær¹‹8¼)€ç9ýPæ³éØ#f“"Ø#fÁgÊa°r!…­K™úÐÆg€éìÚÀaL>UòÞdbXý”JeCC¡P¸¥¨¨Èú´—Á™n‹Sÿè8!V›½œY7FpjdÚ'⼑4ë­duõ(y§r”BÈþýûïðšÉÂ`³Ù[ׯ_ïbN“J[Âpê÷š²L_Dx ¼Ï í£Éìê·^£ãÂ*/tm•JÕ'¿¹èƒ!´°°ׯ_‡Íf{“[ûб-„9aGͧ#G`·)Ê¡cppmmm7ÅS:®Çã5VWWûíÛ·ÏO©T²(Š¢ñù|0γáNËýèðó Ãσ†\!"ßé;üرcÚâââ,Ƨv–™˜˜øsLLLojjªùäÉ“D«Õ>çÛÓµ222êŸ{† ¸III±±±-kÖ¬)**"½½½³"ñññ?Î f†Xr¹|«T*ýC&“ X›››Ÿ æðáæÀÀÀås3U4‰D²Z&“•ÅÇÇ÷äçç›ëêêˆÍfs “’’òÏ\ƒ8(888L&“’J¥m¹¹¹†‹/³Ù< D£Ñ¸¸¸ /f†ü¤Réθ¸¸úM›6©KJJlƒ=zÔ&‰6º œÛ¿.ŋ޽½³ÕjuhGGÇRWÿH¶æ¨—/=IEND®B`‚netmrg-0.20/share/doc/html/LICENSE.html0000664000076400007640000000556411000015417017677 0ustar silfreedsilfreed

This project is licensed under the terms of the MIT License.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

All product names are property of their respective owners. Such names are used for identification purposes only and are not indicative of endorsement by or of any company, organization, product, or platform.

netmrg-0.20/share/doc/html/contact.html0000664000076400007640000000606211000015417020242 0ustar silfreedsilfreed Contact Information

Chapter 7. Contact Information

We have great aspirations for what NetMRG could become, but as with all open-source software, such aspriations can only be achieved with the active participation of the open-source community. Please do your part and support software that you use by helping to answer support questions on forums and report bugs to developers. Thanks!

netmrg-0.20/share/doc/html/netmrgdoc.css0000664000076400007640000000231610140766676020443 0ustar silfreedsilfreedBODY { background-color : #FFFFFF; color : #000000; font-size : 1em; font-family : serif; } TABLE, TH, TR, TD { margin : 0; padding : 0; border : 0; } DIV, P, PRE, BLOCKQUOTE { margin : 0; padding : 0; margin-bottom : 0.5em; } IMG { border : 0; } .TITLEPAGE { background-image : url(netmrg-logo-medium.png); background-position : top right; background-repeat : no-repeat; } .TITLE { font-size : 2em; font-weight : bold; font-family : sans-serif; letter-spacing : 0.2em; } .NAVHEADER th { height : 35px; background-image : url(netmrg-logo-small.png); background-position : top right; background-repeat : no-repeat; font-size : 1em; font-weight : bold; font-family : sans-serif; letter-spacing : 0.2em; } .AUTHOR { font-size : 1em; font-weight : bold; margin : 0; } .FILENAME { color: #007A00; } .SCREEN { background-color : #E5E5E5; border : 1px dashed #D0D0D0; } .PROGRAMLISTING { background-color : #E5E5E5; border : 1px dashed #D0D0D0; } BLOCKQUOTE.NOTE { background-color : #F6FFBD; border-top : 1px dashed #FFE856; border-bottom : 1px dashed #FFE856; margin-left : 2em; margin-right : 2em; padding-left : 0.2em; padding-right : 0.2em; } BLOCKQUOTE.NOTE P{ padding : 0; } netmrg-0.20/share/doc/html/netmrg-logo-medium.png0000664000076400007640000001215410173042724022151 0ustar silfreedsilfreed‰PNG  IHDRddpâ•TsBIT|dˆtEXtTitleMade with SodipodiŸô/'tEXtAuthorUnknownŒ! òzTXtDescriptionxœKT(ÈL.)-J_~êô ,»IDATxœí{pS×Ç?÷¡+]KòC B <Ì+˜@âX&›.I¦õ$mÉ4 ´ÓÚÍlCw»0Ùl!}d'm= B²K[³»­ ¡@pC‚!Òà…àÆ&ƒØØ’%ýC–mIÖËÈ<>3KWçœ{îï{ïùû»÷œ£0ˆhš¶GQ”åGêç`îï&áɼ€„,Ën]×÷߯$µf7(«1eÊQPP TUt‹ˆ”””“À³ÀÌdVò†!%%åM@lÙ²E!DKK‹Øºu«X¹r¥°Z­½Ä1™LMªªn–Z2ë}½¢+Šâ’eY466о8N±k×.±fÍ‘““ÓKUUº®WÅ€-©GqQˆyóæõ#Gëׯ3fÌè%Ž$I‹Årø.06™tM£iÚk€Ø¸qcD‚R__/ÊÊÊÄâÅ‹…¦i½²X,§eYþ0’xˆ×²ÑhlDMMMÔ‚ÒÞÞ.¶mÛ&Š‹‹…ÍfëëwZŒFã`)`Jæuæbܸqq‰Ñ·Û-ªªªDii©ÈÍÍíëwœ‹å àq`X2~È!IÒF@”––&T¾?~\lذAäçç Y–{ùÔÔÔ£ÀÓÀø¤c(’’ò) ªªªU@Î;'6oÞ,ŠŠŠ„®ë}ýNÁ`ø 0“i›d ›Í&Ün÷U$»Ý.*++ŪU«DVVV_¿Óf6›¯¨'ÓPW‹@'EŒ¾x½^Q]]-Ö®]+&MšÔ×ï¸ÒÒÒöâ‹(ŒH¦Ñ ³Ù|åååÉÖ"(µµµâ…^èÊ‘$É›žžþ¡¢(k;’kÅÄa“$É£išhooO¶í¤¹¹9d(Çjµ6èºþ"°P’jÕ8(Ä¢E‹’më¨ñ‡rV¯^Ý/”c2™.¥¥¥•æd8*t]ÿ# ÊÊÊ’m߸ñ‡ròòòúú.›Í¶ø02™öMUU êêê’mÏ„RWW2”“‘‘qBÓ´w&ÕúAX ˆ¼¼¼dÛoPiooåååAC9V«õ|jjêK@ &Q PUõe@¬[·.Ù6»jøC9%%%ýB9&“Éž™™Y¬¬W]“ÉtGŽI¶’†?”3wîÜ^¡EQÜÇ?¤ªê`ÔÕÐ#£FJ¶M¯'ê,áB96›­Öl6?L,AÖâ©§žk$¯Gˆ·âø/â*Æn·‹ŠŠŠ ¡«ÕÚœ™™¹ø"`Hˆf³ù ÞxãÄb(àq ñÖ?ñš"ÄŽ»…ÞÄëñˆêêjñÌ3Ïô åF‡ÅbùM¼OÝr€:‹ÅBSSF£1^}“Û{‚†]¾ïŠæo±_Nø®>ùä*++Ù´i'OžD×õ]ñ†£—,^¼øÚÃãgKèß]m°{I'œÚ2(ÕÉÍÍ¥¤¤„Ñ£Gàp8¶Å%ˆÙl~ ¨¨(Õ» üõYøÃdxs!¼W­öüæ8ëÛ~nÿ|Áç»úoOíííTUU¯éÚO“e•e¹U’$¥±±‘ÌÌÌ„TpÐðvAåÌÞ"¨:¤N€ôIÐz Z‡Î?j)<°=áÕ*//ç‘GÁl6ÐÙÙ9=ž;Ê%^¯WY°`ÁРæçÐúQïmn´|àûˆ  é0 ›•ÐjUVVÐÙÙù_Ç#M£Ñø%€+V$¤ba9ó&ÔUÄQ€€¿móýg+{>Ž:ôÇív³sçNÿ×Jˆ=æ¢!–ÂUðöz¨^ žË`Ì€¬{¢/£ö7Ð|4þº\Ø—>knüeïü©œÖÖVt]op85û²ÀårY&NœÈøñƒøb‡×o} :>õ9Ý·ƒ–¿F_Ní«>/öF_Ç ÇžüJv]¤âåïø>º\Ûü›cDQ”!‚«££:?‹e>ª¾ þPÞg°ïaßY)g÷úzI‰âl\>ß{Û™ðúl8²ª¿ o…/ÃÛ{VðúÁ&<Ïý?Å$ˆ¦i+!Aö?NLm÷ûë¡®²ÿööS°çApœ‹¬œã/‚»3úý‡¢³ÎW7€ŽÓ°g9ì[ésø°ŸósÓáÐeT=Êñ£oóɰ˜p¥¯‹ “GöðáÃÉÏϪý”ïì<·¯nŸýþï B43?òÂÕ¾œ‹Çáüèö { ú)Ø>ê·ûîñ‰Ôv²Þ÷¾uTv·¼ƒ²ðøŽE"€¥K—"Ëa²~._á…·À¹·#+ýR-~:ü5øÎÀ=Ë¡ëRè4ü8›#Ûo4´Ÿ‚/ûüZ(:þ{ŠÀþy϶O§^á¡ò}ߦÖK®ßf‹Z³Ùü( Ð\µƒsU=ß|wÆ}Ϥ¾tu@ÕW =BѸß×vÿåi_Þ@g¡1“`°hÿv/×E¸xÿ\m4¶Á¡Ó *’Þ ÌízpÖd2IMMM˜Í!^ÂØSõ¯÷ßžû¸ç×ÁóœÝç3l¬ÝÓ´Û!gL_ ø&œÜ[Y‰&k¾/&Öäë ¼ò6<ñŒÌ4=Ûìì5¤/Úûe€´páÂÐb\8ú̬«€S¯Áø¯öl8ò œúÏþ½—hh;éû«ß£ ¡aoìe%šÆwz}õû³ÍÎWú&J”””•v»=|sõþúÐζ«>ÜÙ÷ƒ9ÚNÀÕÐøgŸ¯I~a†(ìî ™õkF¢Dw: %IbùòåÁSœÝï†/¥ícx÷ ¸u œ(‹Ü_\'ì©GŒ´ζ8ëûþ x<ìY³ÈÎΞâØp‡éõøixË×ö8¢Øýõ¿wÕÔæ ú%â^–¦iA˜`bý8?ÀÕáG¸oH1„€×»Ë]þ7XšH‘%IZaº»ýtàní Î{§¡±lVµx?XšH›¬9N§3}̘1L:µ÷/þ›¤óÕñÕöÀß»^ñß¡ÒD$ˆ$I !(ZV§^…ó}w¢ó=—Qßëž ÿÝy§çw¡ÒD$ˆ®ëÛívŠ&4À;_OLín0NŸ‡ã  k²Ûáòî •.’k·ÛoKKµrof˜æMÂâo®lVõÀ*]$‚,™‘†Áõù@io¿ Ÿ7»úÝ2  f³ù€¢I­‰¨× ÉE;ìÿd ì —v Alv»}¶*KNJàCžŒÇÀí…œáÆZ ìs…œz¡B‘©ñýÝé€?<,B|ö} !K}ž~ð³’_ ¯9Õ¯÷çàyâË/ÛºŸBŸmvþŠ+ˆ)%åáËv; Ù ø•:§{'} ¬Ò„¨èÀùÀgt^©;UϦ¾R®Aš>¿HR°4a¶I=ú¥•zö ¼.^ø%àÂåáAŠp¿~4E3^ò¸œÿ~ ²n¨¬›ãÃ}°¡cú°FçŦ[J·Üçq95nxSŒx8²W祭‘$)ˆªª0kY"ªuãrÔש]Îÿ‰$yHAdÍô3 ,ä.›Ì¢[®Ù º ©ÅœæÞ‹$K(Aò\öŽ R‡Cnø—‹Ç[$~·‘í÷šøÒ(寛ÿ(ÝÍ•dNû¾9Œ$”ý|=föï~e‚—fcQ0ÈåóMAÜçë6Gš%¨ zší1f„n®Røádûoé±”,I¼:×Ä“ã Xâ4à艿¥°ý^šY4òk[ϧï#4/°;ÒlÁÌ–ãhk¹Íh21{áý¼ÛÖÿEP øÚX•5‚ÏyüâL#é(;ÕEsÈ0ZðÊÜ=Bæþ,…ïÜ®‘jè¹ÔÊf9ÔäàŒ#Ž!W“#>g®dO¨uöQÄGƒvÅÀÒ¥……ìüç¯qÙ µ^:Ý= –Ü¢ðÛ»ÃOÈv_–ŠA†÷š=\Žð…’{FȼµP§ KŨôn÷,‰ó—ï6%èí”A`¢UâÉq\^8»õ9ĹOðÍè¼ñÓ»~MVJJÊ•qƒª,ñüt#;îÕ™có%ž.ó‡{"›•µd¢ÆŠQ‘µ]·˜à§yFä0>ë_§jLOºÝ†GǨ<7ÍÈŸò½(5öùßóŸ†x308}Îzùòå»%IbÙ²žû™6…êE:¥·«TÜc¤Dîµ>ÓÈlÛÀF|x´ÊL[x?a%¾7Ñ€ij2=]æ“}MøÞ=»ér91§¤|4FSNßC[âõzջ¬¬¬Þ %‰ŸÍ01Ú5¬‰ç¦j 3jzV†Ì§G6¬ºø6÷ŒZ^¾>VÅ ûNԾ㣡—uýã=LmÑH•GGoºÒTX7Eëç3Âñ“é#†Ð°øÙ™2ßšà›Ãëõ²cÇÿOA¸„'PA7ø³Fæ ëuÞª°ìÖèúÈS3–‡ÉcÓ®ÞD‰F¾3Á€Ôíûª««¹pẮ75Ñ–h¡.—Ë’››ËäÉ“TÝ ²Ä/gÉèÜn•xiVlÓ¶ÿ4ÏÈDkÏUeÓ`Á0™ïÞn`÷}&ædÆïhÐ_å“yô =óÆø›«ÀqƒÑpå4SåAÇú½ÝgSx"×ÀsÇ»P%(h M‹í¶>]“øêXÛ?w3Ë&óÕ±¦eô\OŽmu⌣—<;SfÅ(•²]œ r'aQàŸ&÷¾ó 8n0®XC×õÏGö¾}û(((ˆ¥¬ˆBpÿ[4YâÍûwré…{íì;›"F~5ÛÈcc jòð­ÃN·ö.«p¤ÂŽ‚žc8uê&L@Ó´—Ë•NÀPµHñ_“GvFFóçÏé"E’$^kdÓœÁ_Ùèé;4¬1:“üa2õ5Ew SøóuÎQ®4a6 ~4-øÕ!IÒbz)(,,DU?Š7Ƭ0Æ<øn·0[eA ]d‹ÿxGoc§¨¿Ÿ¯óãéÙ&¸?KéÕDTTøÆ¨;‘=û† ¾qƒ×ά>Q°îNƒÍZ¢ˆ©-¡ðwÙÁOÌoß®±0K!µÏüoÍÍÍ8pY–=^¯÷Í ™#@²:;;§ –,Yk9C–9ÃfE~•dàÙ)á›ÓÉé 9}®ð;vàñxÐuý ‚A2Á‘é7XPP@jjj¬å i6LÓaïzþ…Y™Ñ7swçåQg@Ñu}ƒÛíg0èêêbĈØl××ju6£ÌGm^þz1|+ͯÌ1‘Ý=ŒÓéäÉ'ŸÄår<´ÇZWYQ”f£ÑxùäÉ“”––2nÜ8&OžÌÚµk9xð ^ïÐ wGÃóÓ4¾`Ïs÷°Ø®Ž}ûöÑÑÑÙl>‰oÍߘ‘;::¾ât:S233_µZ­-555lܸ‘üü|²³³yâ‰'¨¬¬Äá¸v‡¡ÐeVÜÚØVþåÎØºâñûê”™f6›WÆG[ZZ®L¥ë:<ðEEE,[¶¬_Dx¨sÙ#øÓ]¼ÛäåãK^j/y¯<Ñ\|‹ójNNgΜ˜Aˆ¡j‰d”ªªk†~HQ7=«?‹¹sçŠ 6ˆãÇ'd^Û«Mg—WüöS—(~×!^ˆmͬ#GŽøç{cփر+333+L&“Ý/ rssEII‰¨ªªJÚ‚`É`ݺuþµE^N† ¨@AjjêKV«õ<½ç7ÅÅÅ¢¼¼üšXþ(}YœL1‚q§¦i?ÌÈÈ8A€8š¦‰Å‹‹²²²ër±ºW¸fˆ/;>ø†ÍfÛ¯ªjååå‰õë׋£G&ÛžqSVV&ѽÜÓ5ƒx(--­Üd2]"@œœœ±zõj±k×.át:“mߨY´h‘ÿXŠ“iàxP€º®¿hµZè½tƒX¹r¥Øºu«hnnN¶­¤½½]hš&$Iò×MhãEQÖ¦§§(I’—žÕÐDAAxá…Dmmm²m”òòrˆîÅ4¯KF«ÒÒÒöªªê"àê™4i’X»v­¨®®^obÖòˆ—ââbýJ’i´«…™Íæ_›L¦6ÄÉÊÊ«V­•••Ân·'E ·Û¸J[b¦¹¾†yƒá'‹¥Žqt]EEEbóæÍâܹsWMªª*ˆî¥ÊoxÆO§¦¦ív¨WB9ùùùW%”SZZê_ÔxcrM1ôjA6nÜè/çµdàµÎX໋åP ßÄŒ3¢ åÌ›7ÏŸ÷ú{E'IØ€b]×+ü+\ûÿrrrÄš5kB†r…,ËBQ¾®ùMŒ,QUu“Édj"D(§¥¥E!Ä–-[üÝݘ߻ºItÌžMII9I€8þPΔ)SüÛV%³’7*c€o뺾_–å+®ñM0h/$pˆÿuMPØ=™t†Ëåúâ`íèÿâ›7ÞHœ¿IEND®B`‚netmrg-0.20/share/doc/html/satisfyreq.html0000664000076400007640000001602111000015417020775 0ustar silfreedsilfreed Satisfying Requirements

Chapter 4. Satisfying Requirements

Specific instructions to satisfy dependencies for certain platforms are presented below. They should be used more as suggestions, not necessarily step-by-step instructions. You may need to do more than what is listed, or much less, depending on the options you selected when installing your operating system.

  • Red Hat Linux

    • In order to satisfy the libstdc++ requirement, Redhat 8.0 or above is required. NetMRG may not be stable on older versions of libstdc++.

    • Install the following RPMs from your Red Hat installation media:

      • httpd

      • php

      • php-mysql

      • mysql

      • mysql-server

      • mysql-devel

      • libxml2

      • libxml2-devel

      • net-snmp

      • net-snmp-devel

      • net-snmp-utils

    • Installing RRDTOOL

    • Installing precompiled NetMRG RPM

      Download the latest NetMRG RPM and install it as follows:

      $ rpm -Uvh netmrg-0.10.rpm
      

      You will still have to perform the following tasks listed in the Install Instructions:

      • Setup the Database

      • Configure Apache

      • Configure the Installation

      • Setup Crontab

  • FreeBSD (4.8)

    • Install the following ports:

      • www/apache13

      • rrdtool

      • net-snmp

      • libxml2

      • mod_php4 (specify MySQL support)

      • lang/gcc32

    • Run configure, specifying gcc32:

      ./configure 'LDFLAGS=-L/usr/local/gcc3/lib' 'CPPFLAGS=-I/usr/local/gcc3/include' 'CXX=g++32'
      
netmrg-0.20/share/doc/html/reference.html0000664000076400007640000000472011000015417020544 0ustar silfreedsilfreed Reference

III. Reference

Table of Contents
I. Manual Pages
netmrg-0.20/share/doc/netmrg.dsl0000664000076400007640000002560410140766676017010 0ustar silfreedsilfreed ]]> ]]> ]]> ]> ; Page (define %two-side% #f) (define %paper-type% "USletter") (define %page-width% (case %paper-type% (("A4") 210mm) (("USletter") 8.5in) (("USlandscape") 11in))) (define %page-height% (case %paper-type% (("A4") 297mm) (("USletter") 11in) (("USlandscape") 8.5in))) ; TOC (define %section-autolabel% #t) (define %label-preface-sections% #f) ; Links (define %show-ulinks% #t) (define %footnote-ulinks% #t) ; Misc (define tex-backend #t) ; Formatting (define %line-spacing-factor% 1.1) (define %indent-programlisting-lines% #f) (define %indent-screen-lines% #f) ; Book (define %generate-book-titlepage% #t) (define %generate-book-titlepage-on-separate-page% #f) (define %generate-book-toc% #t) ; Part (define %generate-part-toc% #f) (define %generate-part-toc-on-titlepage% #t) (define %generate-part-titlepage% #f) (define %generate-partintro-on-titlepage% #t) ; Chapter (define %chapter-autolabel% #t) (define %chap-app-running-head-autolabel% #t) ; Article (define %generate-article-titlepage% #t) (define %generate-article-toc% #t) (define %generate-article-titlepage-on-separate-page% #t) (define %generate-article-toc-on-titlepage% #t) (define %article-page-number-restart% #f) ; Styles (element application ($mono-seq$)) (element filename ($mono-seq$)) (element function ($mono-seq$)) (element guibutton ($bold-seq$)) (element guiicon ($bold-seq$)) (element guilabel ($italic-seq$)) (element guimenu ($bold-seq$)) (element guimenuitem ($bold-seq$)) (element hardware ($bold-mono-seq$)) (element keycap ($bold-seq$)) (element literal ($mono-seq$)) (element parameter ($italic-mono-seq$)) (element prompt ($mono-seq$)) (element symbol ($charseq$)) (element emphasis ($italic-seq$)) (element question ($bold-seq$)) (define para-style (style font-size: %bf-size% font-weight: 'medium font-posture: 'upright font-family-name: %body-font-family% line-spacing: (* %bf-size% %line-spacing-factor%))) (define %bf-size% (case %visual-acuity% (("tiny") 8pt) (("normal") 10pt) (("presbyopic") 12pt) (("large-type") 24pt))) (define (toc-depth nd) (if (string=? (gi nd) (normalize "book")) 3 (if (string=? (gi nd) (normalize "appendix")) 0 1))) (define-unit em %bf-size%) ; Titles (define ($object-titles-after$) (list (normalize "figure"))) ; Fonts (define %visual-acuity% "normal") (define %title-font-family% "Helvetica") (define %body-font-family% "Palatino") (define %mono-font-family% "Courier New") (define %hsize-bump-factor% 1.1) ; Margins (define %left-right-margin% 6pi) (define %header-margin% 1pi) (define %footer-margin% 4pi) (define %body-start-indent% 0pi) (define %left-margin% 4pi) (define %right-margin% 4pi) (define %top-margin% (if (equal? %visual-acuity% "large-type") 3pi 3pi)) (define %bottom-margin% (if (equal? %visual-acuity% "large-type") 2pi 2pi)) (define %text-width% (- %page-width% (+ %left-margin% %right-margin%))) (define %body-width% (- %text-width% %body-start-indent%)) (define %para-sep% (/ %bf-size% 2.0)) (define %block-sep% (* %para-sep% 2.0)) (define %block-start-indent% 0pt) (define %admon-graphics% #f) ;;Where are the admon graphics? (define %admon-graphics-path% "../images/") ; Quadding (define %default-quadding% 'justify) (define %component-title-quadding% 'start) (define %section-title-quadding% 'start) (define %section-subtitle-quadding% 'start) (define %article-title-quadding% 'center) (define %article-subtitle-quadding% 'center) (define %division-subtitle-quadding% 'start) (define %component-subtitle-quadding% 'start) ; Functions (define (OLSTEP) (case (modulo (length (hierarchical-number-recursive "ORDEREDLIST")) 4) ((1) 1.2em) ((2) 1.2em) ((3) 1.6em) ((0) 1.4em))) (define (ILSTEP) 1.0em) (define (PROCSTEP ilvl) (if (> ilvl 1) 1.8em 1.4em)) (define (PROCWID ilvl) (if (> ilvl 1) 1.8em 1.4em)) (define ($comptitle$) (make paragraph font-family-name: %title-font-family% font-weight: 'bold font-size: (HSIZE 2) line-spacing: (* (HSIZE 2) %line-spacing-factor%) space-before: (* (HSIZE 2) %head-before-factor%) space-after: (* (HSIZE 2) %head-after-factor%) start-indent: 0pt first-line-start-indent: 0pt quadding: 'start keep-with-next?: #t (process-children-trim))) ; Ignore (element TITLEABBREV (empty-sosofo)) (element SUBTITLE (empty-sosofo)) (element SETINFO (empty-sosofo)) (element BOOKINFO (empty-sosofo)) (element BIBLIOENTRY (empty-sosofo)) (element BIBLIOMISC (empty-sosofo)) (element BOOKBIBLIO (empty-sosofo)) (element SERIESINFO (empty-sosofo)) (element DOCINFO (empty-sosofo)) (element ARTHEADER (empty-sosofo)) (define ($peril$) (let* ((title (select-elements (children (current-node)) (normalize "title"))) (has-title (not (node-list-empty? title))) (adm-title (if has-title (make sequence (with-mode title-sosofo-mode (process-node-list (node-list-first title)))) (literal (gentext-element-name (current-node))))) (hs (HSIZE 2))) (if %admon-graphics% ($graphical-admonition$) (make display-group space-before: %block-sep% space-after: %block-sep% font-family-name: %admon-font-family% font-size: (- %bf-size% 1pt) font-weight: 'medium font-posture: 'upright line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%) (make box display?: #t box-type: 'border line-thickness: .5pt start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt) end-indent: (inherited-end-indent) (make paragraph space-before: %para-sep% space-after: %para-sep% start-indent: 1em end-indent: 1em font-family-name: %title-font-family% font-weight: 'bold font-size: hs line-spacing: (* hs %line-spacing-factor%) quadding: 'center keep-with-next?: #t adm-title) (process-children)))))) ;; Norm's stylesheets are smart about working out what sort of ;; object to display. But this bites us. Since we know that the ;; first item is going to be displayable, always use that. (define (find-displayable-object objlist notlist extlist) (let loop ((nl objlist)) (if (node-list-empty? nl) (empty-node-list) (let* ((objdata (node-list-filter-by-gi (children (node-list-first nl)) (list (normalize "videodata") (normalize "audiodata") (normalize "imagedata")))) (filename (data-filename objdata)) (extension (file-extension filename)) (notation (attribute-string (normalize "format") objdata))) (node-list-first nl))))) ;; Including bitmaps in the PS and PDF output tends to scale them ;; horribly. The solution is to scale them down by 50%. ;; ;; You could do this with 'imagedata scale="50"' in the source, ;; but that will affect all the output formats that we use (because ;; there is only one 'imagedata' per image). ;; ;; Solution is to have the authors include the "FORMAT" attribute, ;; set to PNG or EPS as appropriate, but to omit the extension. ;; If we're using the tex-backend, and the FORMAT is PNG, and the ;; author hasn't already set a scale, then set scale to 0.5. ;; Otherwise, use the supplied scale, or 1, as appropriate. (define ($graphic$ fileref #!optional (display #f) (format #f) (scale #f) (align #f)) (let* ((graphic-format (if format format "")) (graphic-scale (if scale (/ (string->number scale) 100) (if (and tex-backend (equal? graphic-format "PNG")) 0.5 1))) (graphic-align (cond ((equal? align (normalize "center")) 'center) ((equal? align (normalize "right")) 'end) (else 'start)))) (make external-graphic entity-system-id: (graphic-file fileref) notation-system-id: graphic-format scale: graphic-scale display?: display display-alignment: graphic-align))) ; HTML (define %html-pubid% "-//W3C//DTD HTML 4.01//EN") (define %html-ext% ".html") (define %root-filename% "index") (define %stylesheet% "netmrgdoc.css") (define %use-id-as-filename% #t) ; Book (define %generate-book-toc% #t) (define %generate-book-titlepage% #t) ; Part (define %generate-part-toc% #t) (define %generate-part-toc-on-titlepage% #t) (define %generate-part-titlepage% #t) (define %generate-partintro-on-titlepage% #t) ; Navigation (define %header-navigation% #t) (define %footer-navigation% #t) (define %gentext-nav-use-tables% #t) (define %gentext-nav-tblwidth% "100%") ; Misc (define %generate-legalnotice-link% #t) (define %graphic-default-extension% "png") (define %para-autolabel% #t) (define (toc-depth nd) (if (string=? (gi nd) (normalize "book")) 3 (if (string=? (gi nd) (normalize "appendix")) 0 1))) (define ($generate-book-lot-list$) (list (normalize "equation"))) (define %body-attr% (list (list "BGCOLOR" "#FFFFFF") (list "TEXT" "#000000") (list "LINK" "#0000FF") (list "VLINK" "#840084") (list "ALINK" "#0000FF"))) ; Styles (element emphasis ($bold-seq$)) ; HTML (define %html-pubid% "-//W3C//DTD HTML 4.01//EN") (define %html-ext% ".html") (define %root-filename% "index") (define %stylesheet% "manual.css") (define %use-id-as-filename% #t) ; Book (define %generate-book-toc% #t) (define %generate-book-titlepage% #t) ; Part (define %generate-part-toc% #f) (define %generate-part-toc-on-titlepage% #f) (define %generate-part-titlepage% #f) (define %generate-partintro-on-titlepage% #f) ; Navigation (define %header-navigation% #f) (define %footer-navigation% #f) (define %gentext-nav-use-tables% #f) (define %gentext-nav-tblwidth% "100%") ; Misc (define %generate-legalnotice-link% #t) (define %graphic-default-extension% "png") (define %para-autolabel% #t) (define (toc-depth nd) (if (string=? (gi nd) (normalize "book")) 3 (if (string=? (gi nd) (normalize "appendix")) 0 1))) (define ($generate-book-lot-list$) (list (normalize "equation"))) (define %body-attr% (list (list "BGCOLOR" "#FFFFFF") (list "TEXT" "#000000") (list "LINK" "#0000FF") (list "VLINK" "#840084") (list "ALINK" "#0000FF"))) ; Styles (element emphasis ($bold-seq$)) netmrg-0.20/share/doc/LICENSE0000664000076400007640000004361010367731540016003 0ustar silfreedsilfreedCopyright (c) 2001-2006 Brady Alleman Douglas E. Warner Kevin Bonner This project is licensed under the terms of the GPL, Version 2. Other licensing arrangements may be available upon request. Please contact licensing@netmrg.net. GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. netmrg-0.20/share/doc/txt/0000775000076400007640000000000011000016355015572 5ustar silfreedsilfreednetmrg-0.20/share/doc/txt/netmrg.txt0000664000076400007640000004533411000015417017636 0ustar silfreedsilfreedThe NetMRG Reference Brady Alleman Douglas E. Warner Copyright © 2003-2007 Brady Alleman and Douglas E. Warner This project is licensed under the terms of the MIT License. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. All product names are property of their respective owners. Such names are used for identification purposes only and are not indicative of endorsement by or of any company, organization, product, or platform. __________________________________________________________ Table of Contents I. Overview 1. Introduction 2. Revision History II. Installation 3. Software Requirements 4. Satisfying Requirements 5. Installation Procedure 6. Upgrade Procedure III. Reference I. Manual Pages netmrg-gatherer -- Gathers data from devices. 7. Contact Information I. Overview Table of Contents 1. Introduction 2. Revision History __________________________________________________________ Chapter 1. Introduction Welcome to NetMRG! NetMRG is a database-driven network monitoring and graphing tool for use on Linux systems. It offers an intuitive web-based configuration, customized monitoring capabilities for unusual situations, a fast multi-threaded polling application, and brilliant graphs rendered by RRDTOOL. This document aims to guide you swiftly through the installation and configuration of NetMRG, as well as act as a reference for those with existing installations. __________________________________________________________ Chapter 2. Revision History * 0.20 2008.04.11 Major feature enhancements and bug fixes; Fixed compilation under GCC 4.3; restructuring of view pages to show graph titles (for easier in-page searching) and icons for graph actions; fixed mysql 5 compatibility; added device properties (keeps track of things like model #, serial #, etc); added ability to chain interfaces to travel between them; added ajax monitor selection on graphs. * 0.19 2006.02.03 Major Feature Enhancements and Bug Fixes; Major Web Interface redesign to give more room for graphs and ease overall use. Security enhancements behind the scenes to ensure correct permissions checking. Added a search interface that will search groups, devices, sub devies, and sub device parameters. RRDtool 1.2 support (including graph smoothing); Depricated use of netmrg_cron.sh in favor of using netmrg-gatherer; migrated bulk of docs to wiki; numerous other bugfixes and enhancements. * 0.18.2 2004.11.09 Minor Bug Fixes; Fixed some escaping problems on the interface cache page, disabled the 'quickprint' Net-SNMP option for better compatibility, fixed the snmp-failure test, fixed an SVO-user view issue, and added failover for duplicate ifNames when adding interfaces. * 0.18.1 2004.11.01 Minor Bug Fixes; Fixed a small bug where the gatherer would not register negative values. * 0.18 2004.10.25 Major Bug Fixes; Fixed an issue preventing form submissions on some browsers, fixed PHP string escaping problems, fixed inability to create inverted stacked graphs, and fixed parameter substituion and documentation regarding notifications and responses. Added better support on FreeBSDs (4.8-5.2) and x86-64 architectures (Linux and FreeBSD), the ability to multiply summed values, MySQL timeouts, simple value parsing (to get the numeric content out of quoted numbers, etc), graphic icons for most actions, support for a default external auth user (with regards to permissions), and cleaned up the gatherer build process output. * 0.17 2004.09.13 Minor Feature Enhancements; Added colorized gatherer output, checkbox support on multiple pages, the ability to disable users, fixed a potential SQL-injection bug, updated navigation on group pages, updated tutorials. * 0.16 2004.06.10 Minor Bugfixes and Feature Enhancements; fixed a user management bug and several bugs related to 'single view only' users not being able to see graphs, added the ability to ignore SNMP uptime checks for devices (permitting the monitoring of broken devices), added the ability to do an SNMP walk of an OID (useful for the Windows SNMP agent), enhanced group/device management, cleaned up autoconf (now supports FC2), and added experimental syslog and daemon support in the gatherer. * 0.15 2004.05.20 Minor Bugfixes and Feature Enhancements; fixes for various db errors (including the infamous one on snmp_cache_view.php), better cross-platform compilation, select all/none/invert checkbox support, support for choosing what graph to apply to an interface, better support for php < 4.2.0, and some security fixes for single-view-only users. * 0.14 2004.03.10 Minor Bugfixes and Feature Enhancements; escaping issues in template dereferencing, broken links on various pages, security issues regarding manual SNMP recaching, broken duplication on non-cutting-edge MySQL, more parameter substitution in SQL tests, better date parsing for advanced graph view, nav-bar and group navigation enhancements, advanced view capability for monitor-only graphs. * 0.13 2003.12.19 Minor Bugfixes and Feature Enhancements; slide show ordering, previous slide, resume slide show, better formatting of 'sums', errors on view editing, fixes to permissions checking, and an occassional segfault in the gatherer was fixed. * 0.12 2003.12.15 Major Feature Enhancents and Bugfixes; added SNMPv2 support, fixed a bug that would cause a device to be deleted from all groups, fixed session timeout when using external auth, added checkbox support to interface/disk cache pages, slide show enhancements, fixed permission issue where unauthorized users could view/edit test_* pages * 0.10 2003.10.05 Major bug fix; fixes a db error when trying to view monitors, a bug that would always set the width and height to zero when creating graphs, and makes conditions with 'rate of change' work. Many documentation upgrades. * 0.10pre2 2003.09.15 This release focuses on adding new features and sqaushing bugs. In addition, there is now an 'updater.php' that is required to be run between versions. A minor change needs to be made to everyone's 'netmrg.xml' to add an 'externalauth' field inside the 'website' section. * 0.10pre1 2003.07.28 Initial publication II. Installation Table of Contents 3. Software Requirements 4. Satisfying Requirements 5. Installation Procedure 6. Upgrade Procedure __________________________________________________________ Chapter 3. Software Requirements NetMRG Requires the following packages for compilation. * PHP, Version >= 4.1 * MySQL, Version >= 3.23 * RRDTOOL, Version >= 1.0.28 * Libxml2, Version >= 2.30 * Libstdc++, Version >= 3.2 Versions earlier than this may compile just fine, but may experience runtime issues. Specifically, we experienced software crashes on an SMP machine running version 2.96 that were resolved by upgrading to 3.2. * NET/UCD-SNMP, Version >= 4.2.2 __________________________________________________________ Chapter 4. Satisfying Requirements Specific instructions to satisfy dependencies for certain platforms are presented below. They should be used more as suggestions, not necessarily step-by-step instructions. You may need to do more than what is listed, or much less, depending on the options you selected when installing your operating system. * Red Hat Linux + In order to satisfy the libstdc++ requirement, Redhat 8.0 or above is required. NetMRG may not be stable on older versions of libstdc++. + Install the following RPMs from your Red Hat installation media: o httpd o php o php-mysql o mysql o mysql-server o mysql-devel o libxml2 o libxml2-devel o net-snmp o net-snmp-devel o net-snmp-utils + Installing RRDTOOL o Download an RRDTOOL RPM from http://www.freshrpms.net/ o OR Download the RRDTOOL source from http://www.rrdtool.org/ and compile it. + Installing precompiled NetMRG RPM Download the latest NetMRG RPM and install it as follows: $ rpm -Uvh netmrg-0.10.rpm You will still have to perform the following tasks listed in the Install Instructions: o Setup the Database o Configure Apache o Configure the Installation o Setup Crontab * FreeBSD (4.8) + Install the following ports: o www/apache13 o rrdtool o net-snmp o libxml2 o mod_php4 (specify MySQL support) o lang/gcc32 + Run configure, specifying gcc32: ./configure 'LDFLAGS=-L/usr/local/gcc3/lib' 'CPPFLAGS=-I/usr/local/gcc3 /include' 'CXX=g++32' __________________________________________________________ Chapter 5. Installation Procedure 1. Untar to some directory like /tmp/ (it will untar into a 'netmrg' directory) cd /tmp wget http://www.netmrg.net/download/release/netmrg.tar.gz tar xzvf netmrg.tar.gz 2. Now we need to compile and install the source. cd into the directory made by your tar command and type the following: ./configure make make install Note: If configure fails to locate the needed libraries they can be manually specified. Run ./configure --help for details on the necessary options. 3. Setup the database Now we need to setup the database. Please change at least the password (netmrgpass below). mysqladmin create netmrg mysql -u root -p netmrg < share/netmrg.mysql mysql -u root -p > grant all on netmrg.* to netmrguser@localhost identified by 'netmrgpa ss'; 4. You need to modify your apache config in order to make your NetMRG installation live (commonly in /etc/httpd/conf/httpd.conf). The first is to alias /netmrg to the installed web directory (commonly /usr/local/var/www/netmrg/webfiles). Alias /netmrg "/usr/local/var/www/netmrg/webfiles" The easier way (if you're running Apache >= 1.3) is to just Include the conf file we've created anywhere in your file (near the bottom is fine). Include /usr/local/etc/netmrg.conf You will need to restart your Apache after making config changes. Telling it to reload its config should be good enough killall -HUP httpd 5. Configure the Installation All of NetMRG's common configuration options are controlled by an XML file, normally located at /usr/local/etc/netmrg.xml. You should edit this file to make any necessary changes before continuing with installation. For most installations, you will at least need to edit netmrg.xml to reflect your database username and password. 6. Setup Permissions NetMRG does not need superuser permissions to run, therefore we will setup a user for it. # useradd netmrg # chown netmrg:netmrg /usr/local/var/log/netmrg # chown netmrg:netmrg /usr/local/var/lib/netmrg/rrd 7. Setup crontab You can setup the crontab entries in two places: either edit /etc/crontab, or run crontab -e as the netmrg user. For 'crontab -e', use an entry similar to this: */5 * * * * bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" To edit the master crontab, edit /etc/crontab and add a line similar to this: */5 * * * * netmrg bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ] ; then /usr/local/bin/netmrg-gatherer; fi" 8. Point your web browser at your install, and start graphing things! The default login is admin and the default password is nimda. Point your web browser at the host you built this on (something similar to http://yourhost.com/netmrg/) and please change your password! __________________________________________________________ Chapter 6. Upgrade Procedure After doing a 'make install' as described in the chapter on Installing NetMRG, the next step is to run the web-based updater. This is accomplished by logging into NetMRG with administrator privileges, and following the prompts. NetMRG's web interface will not operate normally and the gatherer will not run until the web-based upgrade is performed. Non-administrator users will only receive a message directing them to contact their NetMRG administrator. If you need to perform an upgrade, the updater will prompt you to apply all updates. Clicking this link will perform all necessary updates for this release. If for some reason an update fails, or you would like to re-apply an update for any reason, you can goto the updater and goto View all available updates. This will present you a list of the updates that are available and their status (applied, not applied, or error). If you have problems updating from one version to the next, you can force individual updates that fail so that they're considered 'applied'. Once all updates are applied for a particular version, the database will be automatically updated to the latest version that has all updates applied. III. Reference Table of Contents I. Manual Pages I. Manual Pages Table of Contents netmrg-gatherer -- Gathers data from devices. netmrg-gatherer Name netmrg-gatherer -- Gathers data from devices. Synopsis netmrg-gatherer [OPTIONS] Description netmrg-gatherer performs tests on all enabled hosts in NetMRG. It will store results in RRD files using RRDTOOL(1) and perform actions in response to events. Global Options -h Displays usage information and exits. -v Displays software version and exits. Operating Options -t num threads Run no more than the specified number of threads simultaneously. -X Become a daemon. -M mode Mode of operation. This option controls the manner in which the gatherer operates. The modes currently supported are "once" (the default, best used manually or via cron) which runs all tests once then exits, and "wait" (best used when daemonized) which will run all tests, wait for the gatherer interval to expire, and then repeat. Note: To run netmrg-gatherer daemonized, the recommended set of options at this point is "-X -S -M wait" which will daemonize, repeat the gather cycle on each interval, and write output to syslog. Logging, Debugging and Verbosity Options -S Syslog. Logs messages to syslog instead of stdout. -b Bland. Disables color output. By default, netmrg-gatherer will display color output when connected to a terminal, but will use bland output when its output is written to a file. This option should only be needed when the detection mechanism has failed, or the user doesn't want to see colors when running the program by hand. -a All. Displays all log messages. -m Most. Displays more messages than default. -q Quiet. Silences all output. -l level mask Only outputs messages that match the specified level mask. -c component mask Only outputs messages that match the specified component mask. -s Safe. Tries to keep sensitive information out of the displayed messages. Configuration File Options -C config file Uses the specified XML configuration file. -K config file Parses the specified XML configuration file and exits. Database Options -H host Uses the specified host name for connecting to the database. -D database Uses the specified database name. -u user name Uses the specified user name for connecting to the database. -p [password] Uses the specified password for connecting to the database. If no password is specified, the user is prompted to enter one. Recaching Options -i device id Performs an interface recache on the specified device. -d device id Performs a disk recache on the specified device. Note: Recaching options are intended for use by the web interface. These options should not be generally used by end users. __________________________________________________________ Chapter 7. Contact Information We have great aspirations for what NetMRG could become, but as with all open-source software, such aspriations can only be achieved with the active participation of the open-source community. Please do your part and support software that you use by helping to answer support questions on forums and report bugs to developers. Thanks! * Main Website - http://www.netmrg.net/ * Online Docs- http://wiki.netmrg.net/ * Support Forum - http://lists.netmrg.net/ * Bug Reporting and Tracking - http://bugs.netmrg.net/ netmrg-0.20/share/doc/txt/RELEASE-NOTES0000664000076400007640000001312311000015417017461 0ustar silfreedsilfreed Chapter 2. Revision History * 0.20 2008.04.11 Major feature enhancements and bug fixes; Fixed compilation under GCC 4.3; restructuring of view pages to show graph titles (for easier in-page searching) and icons for graph actions; fixed mysql 5 compatibility; added device properties (keeps track of things like model #, serial #, etc); added ability to chain interfaces to travel between them; added ajax monitor selection on graphs. * 0.19 2006.02.03 Major Feature Enhancements and Bug Fixes; Major Web Interface redesign to give more room for graphs and ease overall use. Security enhancements behind the scenes to ensure correct permissions checking. Added a search interface that will search groups, devices, sub devies, and sub device parameters. RRDtool 1.2 support (including graph smoothing); Depricated use of netmrg_cron.sh in favor of using netmrg-gatherer; migrated bulk of docs to wiki; numerous other bugfixes and enhancements. * 0.18.2 2004.11.09 Minor Bug Fixes; Fixed some escaping problems on the interface cache page, disabled the 'quickprint' Net-SNMP option for better compatibility, fixed the snmp-failure test, fixed an SVO-user view issue, and added failover for duplicate ifNames when adding interfaces. * 0.18.1 2004.11.01 Minor Bug Fixes; Fixed a small bug where the gatherer would not register negative values. * 0.18 2004.10.25 Major Bug Fixes; Fixed an issue preventing form submissions on some browsers, fixed PHP string escaping problems, fixed inability to create inverted stacked graphs, and fixed parameter substituion and documentation regarding notifications and responses. Added better support on FreeBSDs (4.8-5.2) and x86-64 architectures (Linux and FreeBSD), the ability to multiply summed values, MySQL timeouts, simple value parsing (to get the numeric content out of quoted numbers, etc), graphic icons for most actions, support for a default external auth user (with regards to permissions), and cleaned up the gatherer build process output. * 0.17 2004.09.13 Minor Feature Enhancements; Added colorized gatherer output, checkbox support on multiple pages, the ability to disable users, fixed a potential SQL-injection bug, updated navigation on group pages, updated tutorials. * 0.16 2004.06.10 Minor Bugfixes and Feature Enhancements; fixed a user management bug and several bugs related to 'single view only' users not being able to see graphs, added the ability to ignore SNMP uptime checks for devices (permitting the monitoring of broken devices), added the ability to do an SNMP walk of an OID (useful for the Windows SNMP agent), enhanced group/device management, cleaned up autoconf (now supports FC2), and added experimental syslog and daemon support in the gatherer. * 0.15 2004.05.20 Minor Bugfixes and Feature Enhancements; fixes for various db errors (including the infamous one on snmp_cache_view.php), better cross-platform compilation, select all/none/invert checkbox support, support for choosing what graph to apply to an interface, better support for php < 4.2.0, and some security fixes for single-view-only users. * 0.14 2004.03.10 Minor Bugfixes and Feature Enhancements; escaping issues in template dereferencing, broken links on various pages, security issues regarding manual SNMP recaching, broken duplication on non-cutting-edge MySQL, more parameter substitution in SQL tests, better date parsing for advanced graph view, nav-bar and group navigation enhancements, advanced view capability for monitor-only graphs. * 0.13 2003.12.19 Minor Bugfixes and Feature Enhancements; slide show ordering, previous slide, resume slide show, better formatting of 'sums', errors on view editing, fixes to permissions checking, and an occassional segfault in the gatherer was fixed. * 0.12 2003.12.15 Major Feature Enhancents and Bugfixes; added SNMPv2 support, fixed a bug that would cause a device to be deleted from all groups, fixed session timeout when using external auth, added checkbox support to interface/disk cache pages, slide show enhancements, fixed permission issue where unauthorized users could view/edit test_* pages * 0.10 2003.10.05 Major bug fix; fixes a db error when trying to view monitors, a bug that would always set the width and height to zero when creating graphs, and makes conditions with 'rate of change' work. Many documentation upgrades. * 0.10pre2 2003.09.15 This release focuses on adding new features and sqaushing bugs. In addition, there is now an 'updater.php' that is required to be run between versions. A minor change needs to be made to everyone's 'netmrg.xml' to add an 'externalauth' field inside the 'website' section. * 0.10pre1 2003.07.28 Initial publication References Visible links . file:///home/silfreed/src/netmrg/share/doc/txt/index.html . file:///home/silfreed/src/netmrg/share/doc/txt/overview.html . file:///home/silfreed/src/netmrg/share/doc/txt/intro.html . file:///home/silfreed/src/netmrg/share/doc/txt/installation.html netmrg-0.20/share/doc/txt/INSTALL0000664000076400007640000000641511000015417016627 0ustar silfreedsilfreed Chapter 5. Installation Procedure 1. Untar to some directory like /tmp/ (it will untar into a 'netmrg' directory) cd /tmp wget http://www.netmrg.net/download/release/netmrg.tar.gz tar xzvf netmrg.tar.gz 2. Now we need to compile and install the source. cd into the directory made by your tar command and type the following: ./configure make make install Note: If configure fails to locate the needed libraries they can be manually specified. Run ./configure --help for details on the necessary options. 3. Setup the database Now we need to setup the database. Please change at least the password (netmrgpass below). mysqladmin create netmrg mysql -u root -p netmrg < share/netmrg.mysql mysql -u root -p > grant all on netmrg.* to netmrguser@localhost identified by 'netmrgpass'; 4. You need to modify your apache config in order to make your NetMRG installation live (commonly in /etc/httpd/conf/httpd.conf). The first is to alias /netmrg to the installed web directory (commonly /usr/local/var/www/netmrg/webfiles). Alias /netmrg "/usr/local/var/www/netmrg/webfiles" The easier way (if you're running Apache >= 1.3) is to just Include the conf file we've created anywhere in your file (near the bottom is fine). Include /usr/local/etc/netmrg.conf You will need to restart your Apache after making config changes. Telling it to reload its config should be good enough killall -HUP httpd 5. Configure the Installation All of NetMRG's common configuration options are controlled by an XML file, normally located at /usr/local/etc/netmrg.xml. You should edit this file to make any necessary changes before continuing with installation. For most installations, you will at least need to edit netmrg.xml to reflect your database username and password. 6. Setup Permissions NetMRG does not need superuser permissions to run, therefore we will setup a user for it. # useradd netmrg # chown netmrg:netmrg /usr/local/var/log/netmrg # chown netmrg:netmrg /usr/local/var/lib/netmrg/rrd 7. Setup crontab You can setup the crontab entries in two places: either edit /etc/crontab, or run crontab -e as the netmrg user. For 'crontab -e', use an entry similar to this: */5 * * * * bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" To edit the master crontab, edit /etc/crontab and add a line similar to this: */5 * * * * netmrg bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" 8. Point your web browser at your install, and start graphing things! The default login is admin and the default password is nimda. Point your web browser at the host you built this on (something similar to http://yourhost.com/netmrg/) and please change your password! References Visible links . file:///home/silfreed/src/netmrg/share/doc/txt/index.html . file:///home/silfreed/src/netmrg/share/doc/txt/installation.html . file:///home/silfreed/src/netmrg/share/doc/txt/satisfyreq.html . file:///home/silfreed/src/netmrg/share/doc/txt/upgrade.html netmrg-0.20/share/doc/txt/UPGRADE0000664000076400007640000000305311000015417016603 0ustar silfreedsilfreed Chapter 6. Upgrade Procedure After doing a 'make install' as described in the chapter on Installing NetMRG, the next step is to run the web-based updater. This is accomplished by logging into NetMRG with administrator privileges, and following the prompts. NetMRG's web interface will not operate normally and the gatherer will not run until the web-based upgrade is performed. Non-administrator users will only receive a message directing them to contact their NetMRG administrator. If you need to perform an upgrade, the updater will prompt you to apply all updates. Clicking this link will perform all necessary updates for this release. If for some reason an update fails, or you would like to re-apply an update for any reason, you can goto the updater and goto View all available updates. This will present you a list of the updates that are available and their status (applied, not applied, or error). If you have problems updating from one version to the next, you can force individual updates that fail so that they're considered 'applied'. Once all updates are applied for a particular version, the database will be automatically updated to the latest version that has all updates applied. References Visible links . file:///home/silfreed/src/netmrg/share/doc/txt/index.html . file:///home/silfreed/src/netmrg/share/doc/txt/installation.html . file:///home/silfreed/src/netmrg/share/doc/txt/install.html . file:///home/silfreed/src/netmrg/share/doc/txt/reference.html netmrg-0.20/share/netmrg.mysql0000664000076400007640000015542611000004700016575 0ustar silfreedsilfreed-- MySQL dump 10.11 -- -- Host: localhost Database: netmrg -- ------------------------------------------------------ -- Server version 5.0.45 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `conditions` -- DROP TABLE IF EXISTS `conditions`; CREATE TABLE `conditions` ( `id` int(11) NOT NULL auto_increment, `event_id` int(11) NOT NULL default '0', `value` bigint(20) NOT NULL default '0', `condition` smallint(6) NOT NULL default '0', `logic_condition` smallint(6) NOT NULL default '0', `value_type` smallint(6) NOT NULL default '0', PRIMARY KEY (`id`), KEY `event_id` (`event_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `conditions` -- LOCK TABLES `conditions` WRITE; /*!40000 ALTER TABLE `conditions` DISABLE KEYS */; /*!40000 ALTER TABLE `conditions` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `data_types` -- DROP TABLE IF EXISTS `data_types`; CREATE TABLE `data_types` ( `id` tinyint(4) NOT NULL auto_increment, `rrd_type` varchar(50) NOT NULL default '', `name` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -- -- Dumping data for table `data_types` -- LOCK TABLES `data_types` WRITE; /*!40000 ALTER TABLE `data_types` DISABLE KEYS */; INSERT INTO `data_types` (`id`, `rrd_type`, `name`) VALUES (1,'GAUGE','Gauge'); INSERT INTO `data_types` (`id`, `rrd_type`, `name`) VALUES (2,'COUNTER','Counter'); INSERT INTO `data_types` (`id`, `rrd_type`, `name`) VALUES (3,'DERIVE','Derive (a counter without overflow protection)'); INSERT INTO `data_types` (`id`, `rrd_type`, `name`) VALUES (4,'ABSOLUTE','Absolute (a counter reset when read)'); INSERT INTO `data_types` (`id`, `rrd_type`, `name`) VALUES (-1,'','Not Graphed'); /*!40000 ALTER TABLE `data_types` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `dev_parents` -- DROP TABLE IF EXISTS `dev_parents`; CREATE TABLE `dev_parents` ( `grp_id` int(11) NOT NULL default '0', `dev_id` int(11) NOT NULL default '0', KEY `grp_id` (`grp_id`,`dev_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `dev_parents` -- LOCK TABLES `dev_parents` WRITE; /*!40000 ALTER TABLE `dev_parents` DISABLE KEYS */; INSERT INTO `dev_parents` (`grp_id`, `dev_id`) VALUES (1,1); /*!40000 ALTER TABLE `dev_parents` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `dev_prop_vals` -- DROP TABLE IF EXISTS `dev_prop_vals`; CREATE TABLE `dev_prop_vals` ( `dev_id` int(11) NOT NULL, `prop_id` int(11) NOT NULL, `value` varchar(250) NOT NULL, PRIMARY KEY (`dev_id`,`prop_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `dev_prop_vals` -- LOCK TABLES `dev_prop_vals` WRITE; /*!40000 ALTER TABLE `dev_prop_vals` DISABLE KEYS */; /*!40000 ALTER TABLE `dev_prop_vals` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `dev_props` -- DROP TABLE IF EXISTS `dev_props`; CREATE TABLE `dev_props` ( `id` int(11) NOT NULL auto_increment, `dev_type_id` int(11) NOT NULL, `name` varchar(200) NOT NULL, `test_type` tinyint(4) NOT NULL, `test_id` int(11) NOT NULL, `test_params` varchar(150) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=latin1; -- -- Dumping data for table `dev_props` -- LOCK TABLES `dev_props` WRITE; /*!40000 ALTER TABLE `dev_props` DISABLE KEYS */; INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (1,9,'Chassis ID',2,47,'enterprises.9.3.6.3.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (5,10,'Model',2,47,'mib-2.47.1.1.1.1.13.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (3,9,'Firmware',1,1,'old-cisco-dev-props.php %ip% %snmp_read_community% version'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (4,9,'Model',1,1,'old-cisco-dev-props.php %ip% %snmp_read_community% model'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (6,10,'Serial',2,47,'mib-2.47.1.1.1.1.11.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (7,10,'Firmware',2,47,'mib-2.47.1.1.1.1.9.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (8,10,'Chassis ID',2,47,'enterprises.9.3.6.3.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (9,11,'Model',2,47,'enterprises.9.5.1.2.16.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (10,11,'Serial',2,47,'enterprises.9.5.1.2.19.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (11,11,'Firmware',2,47,'enterprises.9.5.1.3.1.1.19.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (12,11,'Chassis ID',2,47,'enterprises.9.3.6.3.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (13,12,'Model',2,47,'mib-2.47.1.1.1.1.13.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (14,12,'Radio',2,47,'iso.2.840.10036.3.1.2.1.3.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (15,12,'Radio Firmware',2,47,'iso.2.840.10036.3.1.2.1.4.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (16,12,'Serial',2,47,'mib-2.47.1.1.1.1.11.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (17,12,'Chassis ID',2,47,'enterprises.9.3.6.3.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (20,13,'Model',2,47,'enterprises.318.1.1.1.1.1.1.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (19,12,'Firmware',1,1,'old-cisco-dev-props.php %ip% %snmp_read_community% version'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (21,13,'Serial',2,47,'enterprises.318.1.1.1.1.2.3.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (22,13,'Chassis ID',2,47,'sysName.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (23,13,'Location',2,47,'sysLocation.0'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (24,13,'Firmware',2,47,'enterprises.318.1.4.2.4.1.4.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (25,13,'Card Serial',2,47,'enterprises.318.1.4.2.4.1.2.1'); INSERT INTO `dev_props` (`id`, `dev_type_id`, `name`, `test_type`, `test_id`, `test_params`) VALUES (26,12,'Location',2,47,'sysLocation.0'); /*!40000 ALTER TABLE `dev_props` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `dev_types` -- DROP TABLE IF EXISTS `dev_types`; CREATE TABLE `dev_types` ( `id` int(11) NOT NULL auto_increment, `name` varchar(200) NOT NULL default '', `comment` varchar(250) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1; -- -- Dumping data for table `dev_types` -- LOCK TABLES `dev_types` WRITE; /*!40000 ALTER TABLE `dev_types` DISABLE KEYS */; INSERT INTO `dev_types` (`id`, `name`, `comment`) VALUES (8,'Linux Box',''); INSERT INTO `dev_types` (`id`, `name`, `comment`) VALUES (9,'Cisco 2900XL and 3500XL (old IOS)',''); INSERT INTO `dev_types` (`id`, `name`, `comment`) VALUES (10,'Cisco Catalyst 2900XL, 3500XL, 2950, 3550',''); INSERT INTO `dev_types` (`id`, `name`, `comment`) VALUES (11,'Cisco Catalyst 3560, 3750',''); INSERT INTO `dev_types` (`id`, `name`, `comment`) VALUES (12,'Cisco AP1200',''); INSERT INTO `dev_types` (`id`, `name`, `comment`) VALUES (13,'SmartUPS',''); /*!40000 ALTER TABLE `dev_types` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `devices` -- DROP TABLE IF EXISTS `devices`; CREATE TABLE `devices` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', `ip` varchar(50) NOT NULL default '', `snmp_read_community` varchar(200) NOT NULL default '', `dev_type` int(11) NOT NULL default '0', `snmp_recache_method` smallint(6) NOT NULL default '0', `disabled` tinyint(4) NOT NULL default '0', `snmp_avoided` tinyint(4) NOT NULL default '0', `snmp_uptime` bigint(20) default '0', `snmp_ifnumber` int(11) NOT NULL default '0', `snmp_version` tinyint(4) NOT NULL default '1', `snmp_timeout` int(10) unsigned NOT NULL default '1000000', `snmp_retries` tinyint(3) unsigned NOT NULL default '3', `snmp_port` smallint(5) unsigned NOT NULL default '161', `status` smallint(6) NOT NULL default '0', `no_snmp_uptime_check` tinyint(4) NOT NULL default '0', `unknowns_on_snmp_restart` tinyint(4) NOT NULL default '1', PRIMARY KEY (`id`), KEY `disabled` (`disabled`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- -- Dumping data for table `devices` -- LOCK TABLES `devices` WRITE; /*!40000 ALTER TABLE `devices` DISABLE KEYS */; INSERT INTO `devices` (`id`, `name`, `ip`, `snmp_read_community`, `dev_type`, `snmp_recache_method`, `disabled`, `snmp_avoided`, `snmp_uptime`, `snmp_ifnumber`, `snmp_version`, `snmp_timeout`, `snmp_retries`, `snmp_port`, `status`, `no_snmp_uptime_check`, `unknowns_on_snmp_restart`) VALUES (1,'Template Linux Box','127.0.0.1','',8,1,1,0,0,0,0,1000000,3,161,0,0,1); /*!40000 ALTER TABLE `devices` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `event_log` -- DROP TABLE IF EXISTS `event_log`; CREATE TABLE `event_log` ( `id` bigint(20) NOT NULL auto_increment, `event_id` int(11) NOT NULL default '0', `date` bigint(20) NOT NULL default '0', `time_since_last_change` bigint(20) NOT NULL default '0', PRIMARY KEY (`id`), KEY `event_id` (`event_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `event_log` -- LOCK TABLES `event_log` WRITE; /*!40000 ALTER TABLE `event_log` DISABLE KEYS */; /*!40000 ALTER TABLE `event_log` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `events` -- DROP TABLE IF EXISTS `events`; CREATE TABLE `events` ( `id` int(11) NOT NULL auto_increment, `mon_id` int(11) NOT NULL default '0', `trigger_type` tinyint(4) NOT NULL default '2', `last_status` int(11) NOT NULL default '0', `situation` int(11) NOT NULL default '0', `name` varchar(100) NOT NULL default '', `last_triggered` bigint(20) NOT NULL default '0', PRIMARY KEY (`id`), KEY `monid_trigger` (`mon_id`,`trigger_type`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `events` -- LOCK TABLES `events` WRITE; /*!40000 ALTER TABLE `events` DISABLE KEYS */; /*!40000 ALTER TABLE `events` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `graph_ds` -- DROP TABLE IF EXISTS `graph_ds`; CREATE TABLE `graph_ds` ( `id` int(11) NOT NULL auto_increment, `mon_id` int(11) NOT NULL default '0', `color` varchar(10) NOT NULL default '', `type` tinyint(2) NOT NULL default '0', `graph_id` int(11) NOT NULL default '0', `label` varchar(100) NOT NULL default '', `alignment` tinyint(2) NOT NULL default '1', `stats` set('CURRENT','AVERAGE','MAXIMUM','SUMS','INTEGER','MULTSUM') NOT NULL default 'CURRENT,AVERAGE,MAXIMUM', `position` int(11) NOT NULL default '0', `multiplier` varchar(100) NOT NULL default '1', `start_time` varchar(20) NOT NULL default '', `end_time` varchar(20) NOT NULL default '', `cf` tinyint(4) NOT NULL default '1', PRIMARY KEY (`id`), KEY `graph_id` (`graph_id`) ) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=latin1; -- -- Dumping data for table `graph_ds` -- LOCK TABLES `graph_ds` WRITE; /*!40000 ALTER TABLE `graph_ds` DISABLE KEYS */; INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (1,2,'#FF6600',4,1,'System',1,'CURRENT,AVERAGE,MAXIMUM',1,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (2,1,'#3366FF',5,1,'User',1,'CURRENT,AVERAGE,MAXIMUM',2,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (3,3,'#00CC66',5,1,'Nice',1,'CURRENT,AVERAGE,MAXIMUM',3,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (4,-2,'#000000',1,1,'Total',1,'CURRENT,AVERAGE,MAXIMUM',4,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (5,4,'#FF9900',4,2,'1 Minute',1,'CURRENT,AVERAGE,MAXIMUM',1,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (6,5,'#330066',2,2,'5 Minute',1,'CURRENT,AVERAGE,MAXIMUM',2,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (7,6,'#990000',2,2,'15 Minute',1,'CURRENT,AVERAGE,MAXIMUM',3,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (8,7,'#330066',4,3,'TCP Connections',1,'CURRENT,AVERAGE,MAXIMUM',1,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (9,8,'#330066',4,4,'Users',1,'CURRENT,AVERAGE,MAXIMUM',1,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (10,9,'#330066',4,5,'Processes',1,'CURRENT,AVERAGE,MAXIMUM',1,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (11,11,'#CC3300',4,6,'Swap',1,'CURRENT,AVERAGE,MAXIMUM',1,'1024','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (12,10,'#FF9933',5,6,'RAM',1,'CURRENT,AVERAGE,MAXIMUM',2,'1024','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (13,-2,'#000000',1,6,'Total',1,'CURRENT,AVERAGE,MAXIMUM',3,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (14,12,'#00CC00',4,7,'Inbound',1,'CURRENT,AVERAGE,MAXIMUM',1,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (15,13,'#0000CC',2,7,'Outbound',1,'CURRENT,AVERAGE,MAXIMUM',2,'1','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (16,16,'#333399',4,8,'Used',1,'CURRENT,AVERAGE,MAXIMUM',1,'1024','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (17,15,'#3399FF',5,8,'Available',1,'CURRENT,AVERAGE,MAXIMUM',2,'1024','','',1); INSERT INTO `graph_ds` (`id`, `mon_id`, `color`, `type`, `graph_id`, `label`, `alignment`, `stats`, `position`, `multiplier`, `start_time`, `end_time`, `cf`) VALUES (18,-2,'#000000',1,8,'Total',1,'CURRENT,AVERAGE,MAXIMUM',3,'1','','',1); /*!40000 ALTER TABLE `graph_ds` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `graphs` -- DROP TABLE IF EXISTS `graphs`; CREATE TABLE `graphs` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `title` varchar(100) NOT NULL default '', `comment` varchar(255) NOT NULL default '', `width` smallint(4) NOT NULL default '0', `height` smallint(4) NOT NULL default '0', `vert_label` varchar(100) NOT NULL default '', `type` enum('custom','template') NOT NULL default 'custom', `options` set('nolegend','logarithmic') NOT NULL default '', `base` int(11) NOT NULL default '1000', `max` int(11) default NULL, `min` int(11) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; -- -- Dumping data for table `graphs` -- LOCK TABLES `graphs` WRITE; /*!40000 ALTER TABLE `graphs` DISABLE KEYS */; INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (1,'Linux Box - CPU Utilization','%dev_name% - CPU Utilization','',575,100,'% Usage','template','',1000,NULL,NULL); INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (2,'Linux Box - Load Average','%dev_name% - Load Average','',575,100,'run queue size','template','',1000,NULL,NULL); INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (3,'Linux Box - TCP Connections','%dev_name% - TCP Connections','',575,100,'Connections','template','',1000,NULL,NULL); INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (4,'Linux Box - Logged In Users','%dev_name% - Logged In Users','',575,100,'Users','template','',1000,NULL,NULL); INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (5,'Linux Box - System Processes','%dev_name% - System Processes','',575,100,'Processes','template','',1000,NULL,NULL); INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (6,'Linux Box - Available Memory','%dev_name% - Available Memory','',575,100,'Bytes','template','',1024,NULL,NULL); INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (7,'Linux Box - LAN Traffic','%dev_name% - %ifDescr%','Interface: %ifDescr%%n IP: %ifIP%',575,100,'bytes / sec','template','',1000,NULL,NULL); INSERT INTO `graphs` (`id`, `name`, `title`, `comment`, `width`, `height`, `vert_label`, `type`, `options`, `base`, `max`, `min`) VALUES (8,'Linux Box - Disk Utilization','%dev_name% - %dskPath%','',575,100,'Bytes','template','',1024,NULL,NULL); /*!40000 ALTER TABLE `graphs` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `groups` -- DROP TABLE IF EXISTS `groups`; CREATE TABLE `groups` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `comment` varchar(200) NOT NULL default '', `parent_id` int(11) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; -- -- Dumping data for table `groups` -- LOCK TABLES `groups` WRITE; /*!40000 ALTER TABLE `groups` DISABLE KEYS */; INSERT INTO `groups` (`id`, `name`, `comment`, `parent_id`) VALUES (1,'Template Group','',0); /*!40000 ALTER TABLE `groups` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `log` -- DROP TABLE IF EXISTS `log`; CREATE TABLE `log` ( `id` bigint(20) NOT NULL auto_increment, `date` datetime NOT NULL default '0000-00-00 00:00:00', `dev_id` int(11) default NULL, `subdev_id` int(11) default NULL, `mon_id` int(11) default NULL, `level` int(11) NOT NULL default '0', `component` int(11) NOT NULL default '0', `message` varchar(200) NOT NULL default '', PRIMARY KEY (`id`), KEY `date` (`date`), KEY `dev_id` (`dev_id`), KEY `subdev_id` (`subdev_id`), KEY `mon_id` (`mon_id`) ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; -- -- Dumping data for table `log` -- LOCK TABLES `log` WRITE; /*!40000 ALTER TABLE `log` DISABLE KEYS */; INSERT INTO `log` (`id`, `date`, `dev_id`, `subdev_id`, `mon_id`, `level`, `component`, `message`) VALUES (1,'2007-03-21 21:08:42',2,NULL,NULL,32,4,'Device has returned from SNMP-death.'); INSERT INTO `log` (`id`, `date`, `dev_id`, `subdev_id`, `mon_id`, `level`, `component`, `message`) VALUES (2,'2007-03-21 21:08:42',2,NULL,NULL,32,4,'Using unknowns for non-gauge values.'); INSERT INTO `log` (`id`, `date`, `dev_id`, `subdev_id`, `mon_id`, `level`, `component`, `message`) VALUES (3,'2007-03-21 21:08:42',2,NULL,NULL,32,256,'Number of interfaces changed from 0 to 11'); INSERT INTO `log` (`id`, `date`, `dev_id`, `subdev_id`, `mon_id`, `level`, `component`, `message`) VALUES (4,'2007-03-21 21:08:42',2,NULL,NULL,32,256,'Performing SNMP Recache.'); INSERT INTO `log` (`id`, `date`, `dev_id`, `subdev_id`, `mon_id`, `level`, `component`, `message`) VALUES (5,'2007-03-21 21:08:59',2,NULL,NULL,32,16,'read() provided 0 bytes.'); INSERT INTO `log` (`id`, `date`, `dev_id`, `subdev_id`, `mon_id`, `level`, `component`, `message`) VALUES (6,'2007-03-21 21:08:59',2,NULL,NULL,32,16,'read() provided 0 bytes.'); /*!40000 ALTER TABLE `log` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `monitors` -- DROP TABLE IF EXISTS `monitors`; CREATE TABLE `monitors` ( `id` int(11) NOT NULL auto_increment, `sub_dev_id` int(11) NOT NULL default '0', `data_type` tinyint(4) NOT NULL default '0', `min_val` bigint(20) default NULL, `max_val` bigint(20) default NULL, `tuned` tinyint(4) NOT NULL default '0', `test_type` tinyint(4) NOT NULL default '0', `test_id` int(11) NOT NULL default '0', `test_params` varchar(150) NOT NULL default '', `last_val` bigint(20) default NULL, `delta_val` bigint(20) default NULL, `last_time` datetime default NULL, `delta_time` bigint(20) default NULL, `status` smallint(6) NOT NULL default '0', PRIMARY KEY (`id`), KEY `sub_dev_id` (`sub_dev_id`), KEY `template_index` (`sub_dev_id`,`test_id`,`test_type`,`test_params`) ) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=latin1; -- -- Dumping data for table `monitors` -- LOCK TABLES `monitors` WRITE; /*!40000 ALTER TABLE `monitors` DISABLE KEYS */; INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (1,1,2,0,405,0,2,5,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (2,1,2,0,405,0,2,7,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (3,1,2,0,405,0,2,8,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (4,1,1,NULL,NULL,0,2,9,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (5,1,1,NULL,NULL,0,2,10,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (6,1,1,NULL,NULL,0,2,11,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (7,1,1,NULL,NULL,0,2,18,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (8,1,1,NULL,NULL,0,2,3,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (9,1,1,NULL,NULL,0,2,2,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (10,1,1,NULL,NULL,0,2,13,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (11,1,1,NULL,NULL,0,2,12,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (12,2,2,0,10000000,0,2,39,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (13,2,2,0,100000000,0,2,38,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (14,2,2,0,100000000,0,2,40,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (15,3,1,NULL,NULL,0,2,43,'',NULL,NULL,NULL,NULL,0); INSERT INTO `monitors` (`id`, `sub_dev_id`, `data_type`, `min_val`, `max_val`, `tuned`, `test_type`, `test_id`, `test_params`, `last_val`, `delta_val`, `last_time`, `delta_time`, `status`) VALUES (16,3,1,NULL,NULL,0,2,44,'',NULL,NULL,NULL,NULL,0); /*!40000 ALTER TABLE `monitors` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `notifications` -- DROP TABLE IF EXISTS `notifications`; CREATE TABLE `notifications` ( `id` int(11) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `command` varchar(250) NOT NULL default '', `disabled` tinyint(4) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- -- Dumping data for table `notifications` -- LOCK TABLES `notifications` WRITE; /*!40000 ALTER TABLE `notifications` DISABLE KEYS */; INSERT INTO `notifications` (`id`, `name`, `command`, `disabled`) VALUES (1,'Broadcast message to linux users','wall \'%dev_name%: %event_name%\'',0); /*!40000 ALTER TABLE `notifications` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `responses` -- DROP TABLE IF EXISTS `responses`; CREATE TABLE `responses` ( `id` int(11) NOT NULL auto_increment, `event_id` int(11) NOT NULL default '0', `notification_id` int(11) NOT NULL default '0', `parameters` varchar(100) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `responses` -- LOCK TABLES `responses` WRITE; /*!40000 ALTER TABLE `responses` DISABLE KEYS */; /*!40000 ALTER TABLE `responses` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `snmp_disk_cache` -- DROP TABLE IF EXISTS `snmp_disk_cache`; CREATE TABLE `snmp_disk_cache` ( `dev_id` int(11) NOT NULL default '0', `disk_index` int(11) NOT NULL default '0', `disk_path` varchar(255) default NULL, `disk_device` varchar(255) default NULL, KEY `dev_id` (`dev_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `snmp_disk_cache` -- LOCK TABLES `snmp_disk_cache` WRITE; /*!40000 ALTER TABLE `snmp_disk_cache` DISABLE KEYS */; /*!40000 ALTER TABLE `snmp_disk_cache` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `snmp_interface_cache` -- DROP TABLE IF EXISTS `snmp_interface_cache`; CREATE TABLE `snmp_interface_cache` ( `dev_id` int(11) NOT NULL default '0', `ifIndex` int(11) NOT NULL default '0', `ifName` varchar(255) default NULL, `ifDescr` varchar(255) default NULL, `ifAlias` varchar(255) default NULL, `ifIP` varchar(15) default NULL, `ifMAC` varchar(30) default NULL, `ifType` smallint(6) NOT NULL default '0', `ifAdminStatus` smallint(6) NOT NULL default '0', `ifOperStatus` smallint(6) NOT NULL default '0', `ifSpeed` int(11) NOT NULL default '0', `nexthop` varchar(20) default NULL, `vlan` varchar(20) default NULL, `mode` tinyint(4) default NULL, KEY `ifIndex` (`dev_id`,`ifIndex`), KEY `ifName` (`dev_id`,`ifName`), KEY `ifDescr` (`dev_id`,`ifDescr`), KEY `ifAlias` (`dev_id`,`ifAlias`), KEY `ifIP` (`dev_id`,`ifIP`), KEY `ifMAC` (`dev_id`,`ifMAC`), KEY `dev_id` (`dev_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `snmp_interface_cache` -- LOCK TABLES `snmp_interface_cache` WRITE; /*!40000 ALTER TABLE `snmp_interface_cache` DISABLE KEYS */; /*!40000 ALTER TABLE `snmp_interface_cache` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `sub_dev_variables` -- DROP TABLE IF EXISTS `sub_dev_variables`; CREATE TABLE `sub_dev_variables` ( `sub_dev_id` int(11) NOT NULL default '0', `name` varchar(255) NOT NULL default '', `value` varchar(255) NOT NULL default '', `type` enum('static','dynamic') NOT NULL default 'static', KEY `id_type` (`sub_dev_id`,`type`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `sub_dev_variables` -- LOCK TABLES `sub_dev_variables` WRITE; /*!40000 ALTER TABLE `sub_dev_variables` DISABLE KEYS */; /*!40000 ALTER TABLE `sub_dev_variables` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `sub_devices` -- DROP TABLE IF EXISTS `sub_devices`; CREATE TABLE `sub_devices` ( `id` int(11) NOT NULL auto_increment, `dev_id` int(11) NOT NULL default '0', `type` int(11) NOT NULL default '0', `name` varchar(80) default NULL, `status` smallint(6) NOT NULL default '0', PRIMARY KEY (`id`), KEY `id_2` (`id`,`dev_id`,`type`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; -- -- Dumping data for table `sub_devices` -- LOCK TABLES `sub_devices` WRITE; /*!40000 ALTER TABLE `sub_devices` DISABLE KEYS */; INSERT INTO `sub_devices` (`id`, `dev_id`, `type`, `name`, `status`) VALUES (1,1,1,'System',0); INSERT INTO `sub_devices` (`id`, `dev_id`, `type`, `name`, `status`) VALUES (2,1,2,'Network Interface',0); INSERT INTO `sub_devices` (`id`, `dev_id`, `type`, `name`, `status`) VALUES (3,1,3,'Disk Drive',0); /*!40000 ALTER TABLE `sub_devices` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `tests_internal` -- DROP TABLE IF EXISTS `tests_internal`; CREATE TABLE `tests_internal` ( `id` tinyint(4) NOT NULL auto_increment, `name` varchar(200) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`), KEY `id_2` (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tests_internal` -- LOCK TABLES `tests_internal` WRITE; /*!40000 ALTER TABLE `tests_internal` DISABLE KEYS */; INSERT INTO `tests_internal` (`id`, `name`) VALUES (1,'Count Lines in File'); INSERT INTO `tests_internal` (`id`, `name`) VALUES (2,'Lucent TNT \"Good\" Modems (available modems minus suspect modems)'); INSERT INTO `tests_internal` (`id`, `name`) VALUES (3,'UCD CPU Load (user + system)'); INSERT INTO `tests_internal` (`id`, `name`) VALUES (4,'Windows Disk Usage (percent)'); INSERT INTO `tests_internal` (`id`, `name`) VALUES (5,'UCD Swap Usage (percent)'); INSERT INTO `tests_internal` (`id`, `name`) VALUES (6,'Read Value from File'); INSERT INTO `tests_internal` (`id`, `name`) VALUES (7,'SNMP Failure'); INSERT INTO `tests_internal` (`id`, `name`) VALUES (8,'Windows CPU Load'); /*!40000 ALTER TABLE `tests_internal` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `tests_script` -- DROP TABLE IF EXISTS `tests_script`; CREATE TABLE `tests_script` ( `id` int(11) NOT NULL auto_increment, `name` varchar(200) NOT NULL default '', `cmd` varchar(200) NOT NULL default '', `data_type` int(11) NOT NULL default '0', `dev_type` int(11) NOT NULL default '0', `priority` tinyint(4) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tests_script` -- LOCK TABLES `tests_script` WRITE; /*!40000 ALTER TABLE `tests_script` DISABLE KEYS */; INSERT INTO `tests_script` (`id`, `name`, `cmd`, `data_type`, `dev_type`, `priority`) VALUES (1,'Custom','%parameters%',2,9,0); INSERT INTO `tests_script` (`id`, `name`, `cmd`, `data_type`, `dev_type`, `priority`) VALUES (2,'Ping Latency','ping_time.pl %ip%',2,8,0); INSERT INTO `tests_script` (`id`, `name`, `cmd`, `data_type`, `dev_type`, `priority`) VALUES (3,'SNMP Diff','snmpdiff.php',2,8,0); INSERT INTO `tests_script` (`id`, `name`, `cmd`, `data_type`, `dev_type`, `priority`) VALUES (4,'Win2k SNMP CPU','win2kcpu.pl',2,8,0); INSERT INTO `tests_script` (`id`, `name`, `cmd`, `data_type`, `dev_type`, `priority`) VALUES (5,'Livingston Portmaster Active Modems','pmmodems.pl %snmp_read_community% %ip%',2,0,0); /*!40000 ALTER TABLE `tests_script` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `tests_snmp` -- DROP TABLE IF EXISTS `tests_snmp`; CREATE TABLE `tests_snmp` ( `id` int(11) NOT NULL auto_increment, `name` varchar(200) NOT NULL default '', `oid` varchar(250) NOT NULL default '', `dev_type` int(11) NOT NULL default '0', `type` tinyint(4) NOT NULL default '0', `subitem` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tests_snmp` -- LOCK TABLES `tests_snmp` WRITE; /*!40000 ALTER TABLE `tests_snmp` DISABLE KEYS */; INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (1,'TNT - Modems Online','.1.3.6.1.4.1.529.10.6.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (2,'Host - System Processes','.1.3.6.1.2.1.25.1.6.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (3,'Host - Logged in Users','.1.3.6.1.2.1.25.1.5.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (4,'Cisco - CPU Utilization','.1.3.6.1.4.1.9.2.1.58.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (5,'UCD - CPU Percent User','enterprises.ucdavis.systemStats.ssCpuRawUser.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (6,'UCD - CPU Percent Idle','enterprises.ucdavis.systemStats.ssCpuRawIdle.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (7,'UCD - CPU Percent System','enterprises.ucdavis.systemStats.ssCpuRawSystem.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (8,'UCD - CPU Percent Nice','enterprises.ucdavis.systemStats.ssCpuRawNice.0',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (9,'UCD - Load Average - 1 min','laLoad.1',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (10,'UCD - Load Average - 5 min','laLoad.2',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (11,'UCD - Load Average - 15 min','laLoad.3',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (12,'UCD - Available Swap','memAvailSwap.0',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (13,'UCD - Available Physical RAM','memAvailReal.0',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (19,'C5k - % Bandwidth','.1.3.6.1.4.1.9.5.1.1.8.0',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (18,'Open TCP Connections','tcp.tcpCurrEstab.0',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (21,'C7k Free Memory (Processor)','.1.3.6.1.4.1.9.9.48.1.1.1.6.1',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (22,'C7k Free Memory (Fast)','.1.3.6.1.4.1.9.9.48.1.1.1.6.5',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (23,'C7k Used Memory (Fast)','.1.3.6.1.4.1.9.9.48.1.1.1.5.5',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (24,'UCD - Executable 1','enterprises.ucdavis.extTable.extEntry.extOutput.1',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (25,'DNS - A Records','enterprises.ucdavis.extTable.extEntry.extOutput.1',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (26,'DNS - PTR Records','enterprises.ucdavis.extTable.extEntry.extOutput.2',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (27,'DNS - MX Records','enterprises.ucdavis.extTable.extEntry.extOutput.3',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (28,'DNS - CNAME Records','enterprises.ucdavis.extTable.extEntry.extOutput.4',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (29,'DNS - ANY Records','enterprises.ucdavis.extTable.extEntry.extOutput.5',2,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (30,'Cisco - RSP - Inlet Temperature (C)','enterprises.9.9.13.1.3.1.3.1',5,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (31,'Cisco - RSP - Hotpoint Temperature (C)','enterprises.9.9.13.1.3.1.3.2',5,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (32,'Cisco - RSP - Exhaust Temperature (C)','enterprises.9.9.13.1.3.1.3.3',5,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (33,'TNT - Dead Modems','.1.3.6.1.4.1.529.15.7.0',4,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (34,'TNT - Disabled Modems','.1.3.6.1.4.1.529.15.5.0',4,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (35,'TNT - Suspect Modems','.1.3.6.1.4.1.529.15.3.0',4,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (36,'TNT - Available Modems','.1.3.6.1.4.1.529.15.1.0',4,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (37,'TNT - Busy Modems','.1.3.6.1.4.1.529.15.9.0',4,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (38,'Interfaces - Bytes Out','ifOutOctets.%ifIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (39,'Interfaces - Bytes In','ifInOctets.%ifIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (40,'Interfaces - Errors In','ifInErrors.%ifIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (41,'TNT - Connected DS0s','.1.3.6.1.4.1.529.4.21.1.7.%ifIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (42,'Disk - Size (kB)','dskTotal.%dskIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (43,'Disk - Available (kB)','dskAvail.%dskIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (44,'Disk - Used (kB)','dskUsed.%dskIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (45,'Disk - Percent Used','dskPercent.%dskIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (46,'Disk - Percent Node Usage','dskPercentNode.%dskIndex%',8,0,0); INSERT INTO `tests_snmp` (`id`, `name`, `oid`, `dev_type`, `type`, `subitem`) VALUES (47,'Custom','%parameters%',8,0,0); /*!40000 ALTER TABLE `tests_snmp` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `tests_sql` -- DROP TABLE IF EXISTS `tests_sql`; CREATE TABLE `tests_sql` ( `id` int(11) NOT NULL auto_increment, `name` varchar(200) NOT NULL default '', `sub_dev_type` int(11) NOT NULL default '0', `host` varchar(50) NOT NULL default '', `user` varchar(50) NOT NULL default '', `password` varchar(50) NOT NULL default '', `query` varchar(255) NOT NULL default '', `column_num` tinyint(4) NOT NULL default '0', `timeout` int(11) NOT NULL default '10', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; -- -- Dumping data for table `tests_sql` -- LOCK TABLES `tests_sql` WRITE; /*!40000 ALTER TABLE `tests_sql` DISABLE KEYS */; INSERT INTO `tests_sql` (`id`, `name`, `sub_dev_type`, `host`, `user`, `password`, `query`, `column_num`, `timeout`) VALUES (1,'MySQL Questions',8,'localhost','root','sqlroot','show status like \"Questions\"',1,10); INSERT INTO `tests_sql` (`id`, `name`, `sub_dev_type`, `host`, `user`, `password`, `query`, `column_num`, `timeout`) VALUES (3,'NetMRG - Active Script Monitors',8,'localhost','netmrgread','netmrgread','select count(*) from netmrg.monitors, netmrg.sub_devices, netmrg.devices where monitors.sub_dev_id=sub_devices.id and sub_devices.dev_id=devices.id and devices.disabled = 0 and monitors.test_type=1',0,10); INSERT INTO `tests_sql` (`id`, `name`, `sub_dev_type`, `host`, `user`, `password`, `query`, `column_num`, `timeout`) VALUES (4,'NetMRG - Active SNMP Monitors',8,'localhost','netmrgread','netmrgread',' select count(*) from netmrg.monitors, netmrg.sub_devices, netmrg.devices where monitors.sub_dev_id=sub_devices.id and sub_devices.dev_id=devices.id and devices.disabled = 0 and monitors.test_type=2',0,10); INSERT INTO `tests_sql` (`id`, `name`, `sub_dev_type`, `host`, `user`, `password`, `query`, `column_num`, `timeout`) VALUES (5,'NetMRG - Active SQL Monitors',8,'localhost','netmrgread','netmrgread','select count(*) from netmrg.monitors, netmrg.sub_devices, netmrg.devices where monitors.sub_dev_id=sub_devices.id and sub_devices.dev_id=devices.id and devices.disabled = 0 and monitors.test_type=3',0,10); INSERT INTO `tests_sql` (`id`, `name`, `sub_dev_type`, `host`, `user`, `password`, `query`, `column_num`, `timeout`) VALUES (6,'NetMRG - Active Internal Monitors',8,'localhost','netmrgread','netmrgread','select count(*) from netmrg.monitors, netmrg.sub_devices, netmrg.devices where monitors.sub_dev_id=sub_devices.id and sub_devices.dev_id=devices.id and devices.disabled = 0 and monitors.test_type=4',0,10); /*!40000 ALTER TABLE `tests_sql` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `updates` -- DROP TABLE IF EXISTS `updates`; CREATE TABLE `updates` ( `update_version` varchar(16) NOT NULL default '', `name` varchar(160) NOT NULL default '', `version_applied_to` varchar(16) NOT NULL default '', `dateapplied` datetime NOT NULL default '0000-00-00 00:00:00' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `updates` -- LOCK TABLES `updates` WRITE; /*!40000 ALTER TABLE `updates` DISABLE KEYS */; INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','Graph Options','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','Graph Options2','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','Graph Item Times','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','Graph Item Times2','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','Graph Title','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','Graph Item Muliplier','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','SNMP ifSpeed','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.10pre2','Graph Title Fill-in','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.12','SNMP Version Support','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.12','SNMP Timeout','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.12','User Prefs','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.12','User Prefs Slideshow Default','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','SNMP Recache Method','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','SNMP Recache Method Default','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','SNMP Recache Method Default2','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','SNMP Recache Method Default3','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','SNMP Recache Drop','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','SNMP ifNumber Drop','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','Log Table','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','User Index Drop','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.14','User Unique Index','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.16','Device SNMP Uptime Check Option','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.16','SNMP Test Type','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.16','Graph Min/Max','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','Internal Test Name Lengthen','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','Script Test Name Lengthen','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','SQL Test Name Lengthen','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','New Internal Test - Lucent TNT Good Modems','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','New Internal Test - UCD CPU Load','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','New Internal Test - Windows Disk Usage','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','New Internal Test - UCD Swap Usage','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','New Internal Test - Read Value from File','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.17','User Disabled Support','pre-0.17','2004-10-25 20:59:06'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.18','Graph Multiply Sum Support','0.17','2004-10-25 20:59:35'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.18','New Internal Test - SNMP Failure','0.17','2004-10-25 20:59:35'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.18','SQL Test Timeout','0.17','2004-10-25 20:59:35'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.19','Increase size of monitors.type_id','0.19','2006-01-09 20:09:39'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.19','Increase size of view.pos','0.19','2006-01-09 20:09:42'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.19','Livingston Portmaster Modems Script Test','0.19','2006-01-09 20:09:54'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.19','Graph Min NULL Fix','0.19','2006-01-09 20:09:56'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.19','Graph Max NULL Fix','0.19','2006-01-09 20:09:59'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.20','Device Properties Table','0.19','2007-03-21 20:56:44'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.20','Device Properties Values Table','0.19','2007-03-21 20:56:44'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.20','SNMP Interface Cache New Fields','0.19','2007-03-21 20:56:44'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.20','Graph Item Consolidation Function Field','0.19','2007-03-21 20:56:45'); INSERT INTO `updates` (`update_version`, `name`, `version_applied_to`, `dateapplied`) VALUES ('0.20','Device Unknowns on SNMP Restart Field','0.19','2007-03-21 20:56:45'); /*!40000 ALTER TABLE `updates` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user` -- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11) NOT NULL auto_increment, `user` varchar(50) NOT NULL default '', `pass` varchar(50) NOT NULL default '', `permit` tinyint(4) NOT NULL default '0', `fullname` varchar(200) default NULL, `group_id` int(11) NOT NULL default '0', `disabled` tinyint(4) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `user` (`user`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- -- Dumping data for table `user` -- LOCK TABLES `user` WRITE; /*!40000 ALTER TABLE `user` DISABLE KEYS */; INSERT INTO `user` (`id`, `user`, `pass`, `permit`, `fullname`, `group_id`, `disabled`) VALUES (1,'admin','ee10c315eba2c75b403ea99136f5b48d',3,'Administrator',0,0); INSERT INTO `user` (`id`, `user`, `pass`, `permit`, `fullname`, `group_id`, `disabled`) VALUES (2,'NETMRG_DEFAULT_MAP','d41d8cd98f00b204e9800998ecf8427e',0,'Administrator',0,1); /*!40000 ALTER TABLE `user` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_prefs` -- DROP TABLE IF EXISTS `user_prefs`; CREATE TABLE `user_prefs` ( `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL default '0', `module` varchar(64) NOT NULL default '', `pref` varchar(64) NOT NULL default '', `value` varchar(64) NOT NULL default '', PRIMARY KEY (`id`), KEY `uid` (`uid`), KEY `uid_module_pref` (`uid`,`module`,`pref`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_prefs` -- LOCK TABLES `user_prefs` WRITE; /*!40000 ALTER TABLE `user_prefs` DISABLE KEYS */; INSERT INTO `user_prefs` (`id`, `uid`, `module`, `pref`, `value`) VALUES (1,1,'SlideShow','AutoScroll','1'); INSERT INTO `user_prefs` (`id`, `uid`, `module`, `pref`, `value`) VALUES (2,2,'SlideShow','AutoScroll','1'); /*!40000 ALTER TABLE `user_prefs` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `versioninfo` -- DROP TABLE IF EXISTS `versioninfo`; CREATE TABLE `versioninfo` ( `module` varchar(64) NOT NULL default '', `version` varchar(16) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `versioninfo` -- LOCK TABLES `versioninfo` WRITE; /*!40000 ALTER TABLE `versioninfo` DISABLE KEYS */; INSERT INTO `versioninfo` (`module`, `version`) VALUES ('Main','0.20'); /*!40000 ALTER TABLE `versioninfo` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `view` -- DROP TABLE IF EXISTS `view`; CREATE TABLE `view` ( `id` int(11) NOT NULL auto_increment, `object_id` int(11) NOT NULL default '0', `object_type` enum('group','device','subdevice') NOT NULL default 'group', `graph_id` int(11) NOT NULL default '0', `type` enum('graph','template','separator') NOT NULL default 'separator', `pos` int(11) NOT NULL default '0', `separator_text` varchar(100) NOT NULL default '', `subdev_id` int(11) NOT NULL default '0', PRIMARY KEY (`id`), KEY `VIEW_INDEX` (`object_id`,`object_type`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `view` -- LOCK TABLES `view` WRITE; /*!40000 ALTER TABLE `view` DISABLE KEYS */; /*!40000 ALTER TABLE `view` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2008-04-12 0:44:35 netmrg-0.20/README0000664000076400007640000004533411000015417013773 0ustar silfreedsilfreedThe NetMRG Reference Brady Alleman Douglas E. Warner Copyright © 2003-2007 Brady Alleman and Douglas E. Warner This project is licensed under the terms of the MIT License. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. All product names are property of their respective owners. Such names are used for identification purposes only and are not indicative of endorsement by or of any company, organization, product, or platform. __________________________________________________________ Table of Contents I. Overview 1. Introduction 2. Revision History II. Installation 3. Software Requirements 4. Satisfying Requirements 5. Installation Procedure 6. Upgrade Procedure III. Reference I. Manual Pages netmrg-gatherer -- Gathers data from devices. 7. Contact Information I. Overview Table of Contents 1. Introduction 2. Revision History __________________________________________________________ Chapter 1. Introduction Welcome to NetMRG! NetMRG is a database-driven network monitoring and graphing tool for use on Linux systems. It offers an intuitive web-based configuration, customized monitoring capabilities for unusual situations, a fast multi-threaded polling application, and brilliant graphs rendered by RRDTOOL. This document aims to guide you swiftly through the installation and configuration of NetMRG, as well as act as a reference for those with existing installations. __________________________________________________________ Chapter 2. Revision History * 0.20 2008.04.11 Major feature enhancements and bug fixes; Fixed compilation under GCC 4.3; restructuring of view pages to show graph titles (for easier in-page searching) and icons for graph actions; fixed mysql 5 compatibility; added device properties (keeps track of things like model #, serial #, etc); added ability to chain interfaces to travel between them; added ajax monitor selection on graphs. * 0.19 2006.02.03 Major Feature Enhancements and Bug Fixes; Major Web Interface redesign to give more room for graphs and ease overall use. Security enhancements behind the scenes to ensure correct permissions checking. Added a search interface that will search groups, devices, sub devies, and sub device parameters. RRDtool 1.2 support (including graph smoothing); Depricated use of netmrg_cron.sh in favor of using netmrg-gatherer; migrated bulk of docs to wiki; numerous other bugfixes and enhancements. * 0.18.2 2004.11.09 Minor Bug Fixes; Fixed some escaping problems on the interface cache page, disabled the 'quickprint' Net-SNMP option for better compatibility, fixed the snmp-failure test, fixed an SVO-user view issue, and added failover for duplicate ifNames when adding interfaces. * 0.18.1 2004.11.01 Minor Bug Fixes; Fixed a small bug where the gatherer would not register negative values. * 0.18 2004.10.25 Major Bug Fixes; Fixed an issue preventing form submissions on some browsers, fixed PHP string escaping problems, fixed inability to create inverted stacked graphs, and fixed parameter substituion and documentation regarding notifications and responses. Added better support on FreeBSDs (4.8-5.2) and x86-64 architectures (Linux and FreeBSD), the ability to multiply summed values, MySQL timeouts, simple value parsing (to get the numeric content out of quoted numbers, etc), graphic icons for most actions, support for a default external auth user (with regards to permissions), and cleaned up the gatherer build process output. * 0.17 2004.09.13 Minor Feature Enhancements; Added colorized gatherer output, checkbox support on multiple pages, the ability to disable users, fixed a potential SQL-injection bug, updated navigation on group pages, updated tutorials. * 0.16 2004.06.10 Minor Bugfixes and Feature Enhancements; fixed a user management bug and several bugs related to 'single view only' users not being able to see graphs, added the ability to ignore SNMP uptime checks for devices (permitting the monitoring of broken devices), added the ability to do an SNMP walk of an OID (useful for the Windows SNMP agent), enhanced group/device management, cleaned up autoconf (now supports FC2), and added experimental syslog and daemon support in the gatherer. * 0.15 2004.05.20 Minor Bugfixes and Feature Enhancements; fixes for various db errors (including the infamous one on snmp_cache_view.php), better cross-platform compilation, select all/none/invert checkbox support, support for choosing what graph to apply to an interface, better support for php < 4.2.0, and some security fixes for single-view-only users. * 0.14 2004.03.10 Minor Bugfixes and Feature Enhancements; escaping issues in template dereferencing, broken links on various pages, security issues regarding manual SNMP recaching, broken duplication on non-cutting-edge MySQL, more parameter substitution in SQL tests, better date parsing for advanced graph view, nav-bar and group navigation enhancements, advanced view capability for monitor-only graphs. * 0.13 2003.12.19 Minor Bugfixes and Feature Enhancements; slide show ordering, previous slide, resume slide show, better formatting of 'sums', errors on view editing, fixes to permissions checking, and an occassional segfault in the gatherer was fixed. * 0.12 2003.12.15 Major Feature Enhancents and Bugfixes; added SNMPv2 support, fixed a bug that would cause a device to be deleted from all groups, fixed session timeout when using external auth, added checkbox support to interface/disk cache pages, slide show enhancements, fixed permission issue where unauthorized users could view/edit test_* pages * 0.10 2003.10.05 Major bug fix; fixes a db error when trying to view monitors, a bug that would always set the width and height to zero when creating graphs, and makes conditions with 'rate of change' work. Many documentation upgrades. * 0.10pre2 2003.09.15 This release focuses on adding new features and sqaushing bugs. In addition, there is now an 'updater.php' that is required to be run between versions. A minor change needs to be made to everyone's 'netmrg.xml' to add an 'externalauth' field inside the 'website' section. * 0.10pre1 2003.07.28 Initial publication II. Installation Table of Contents 3. Software Requirements 4. Satisfying Requirements 5. Installation Procedure 6. Upgrade Procedure __________________________________________________________ Chapter 3. Software Requirements NetMRG Requires the following packages for compilation. * PHP, Version >= 4.1 * MySQL, Version >= 3.23 * RRDTOOL, Version >= 1.0.28 * Libxml2, Version >= 2.30 * Libstdc++, Version >= 3.2 Versions earlier than this may compile just fine, but may experience runtime issues. Specifically, we experienced software crashes on an SMP machine running version 2.96 that were resolved by upgrading to 3.2. * NET/UCD-SNMP, Version >= 4.2.2 __________________________________________________________ Chapter 4. Satisfying Requirements Specific instructions to satisfy dependencies for certain platforms are presented below. They should be used more as suggestions, not necessarily step-by-step instructions. You may need to do more than what is listed, or much less, depending on the options you selected when installing your operating system. * Red Hat Linux + In order to satisfy the libstdc++ requirement, Redhat 8.0 or above is required. NetMRG may not be stable on older versions of libstdc++. + Install the following RPMs from your Red Hat installation media: o httpd o php o php-mysql o mysql o mysql-server o mysql-devel o libxml2 o libxml2-devel o net-snmp o net-snmp-devel o net-snmp-utils + Installing RRDTOOL o Download an RRDTOOL RPM from http://www.freshrpms.net/ o OR Download the RRDTOOL source from http://www.rrdtool.org/ and compile it. + Installing precompiled NetMRG RPM Download the latest NetMRG RPM and install it as follows: $ rpm -Uvh netmrg-0.10.rpm You will still have to perform the following tasks listed in the Install Instructions: o Setup the Database o Configure Apache o Configure the Installation o Setup Crontab * FreeBSD (4.8) + Install the following ports: o www/apache13 o rrdtool o net-snmp o libxml2 o mod_php4 (specify MySQL support) o lang/gcc32 + Run configure, specifying gcc32: ./configure 'LDFLAGS=-L/usr/local/gcc3/lib' 'CPPFLAGS=-I/usr/local/gcc3 /include' 'CXX=g++32' __________________________________________________________ Chapter 5. Installation Procedure 1. Untar to some directory like /tmp/ (it will untar into a 'netmrg' directory) cd /tmp wget http://www.netmrg.net/download/release/netmrg.tar.gz tar xzvf netmrg.tar.gz 2. Now we need to compile and install the source. cd into the directory made by your tar command and type the following: ./configure make make install Note: If configure fails to locate the needed libraries they can be manually specified. Run ./configure --help for details on the necessary options. 3. Setup the database Now we need to setup the database. Please change at least the password (netmrgpass below). mysqladmin create netmrg mysql -u root -p netmrg < share/netmrg.mysql mysql -u root -p > grant all on netmrg.* to netmrguser@localhost identified by 'netmrgpa ss'; 4. You need to modify your apache config in order to make your NetMRG installation live (commonly in /etc/httpd/conf/httpd.conf). The first is to alias /netmrg to the installed web directory (commonly /usr/local/var/www/netmrg/webfiles). Alias /netmrg "/usr/local/var/www/netmrg/webfiles" The easier way (if you're running Apache >= 1.3) is to just Include the conf file we've created anywhere in your file (near the bottom is fine). Include /usr/local/etc/netmrg.conf You will need to restart your Apache after making config changes. Telling it to reload its config should be good enough killall -HUP httpd 5. Configure the Installation All of NetMRG's common configuration options are controlled by an XML file, normally located at /usr/local/etc/netmrg.xml. You should edit this file to make any necessary changes before continuing with installation. For most installations, you will at least need to edit netmrg.xml to reflect your database username and password. 6. Setup Permissions NetMRG does not need superuser permissions to run, therefore we will setup a user for it. # useradd netmrg # chown netmrg:netmrg /usr/local/var/log/netmrg # chown netmrg:netmrg /usr/local/var/lib/netmrg/rrd 7. Setup crontab You can setup the crontab entries in two places: either edit /etc/crontab, or run crontab -e as the netmrg user. For 'crontab -e', use an entry similar to this: */5 * * * * bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" To edit the master crontab, edit /etc/crontab and add a line similar to this: */5 * * * * netmrg bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ] ; then /usr/local/bin/netmrg-gatherer; fi" 8. Point your web browser at your install, and start graphing things! The default login is admin and the default password is nimda. Point your web browser at the host you built this on (something similar to http://yourhost.com/netmrg/) and please change your password! __________________________________________________________ Chapter 6. Upgrade Procedure After doing a 'make install' as described in the chapter on Installing NetMRG, the next step is to run the web-based updater. This is accomplished by logging into NetMRG with administrator privileges, and following the prompts. NetMRG's web interface will not operate normally and the gatherer will not run until the web-based upgrade is performed. Non-administrator users will only receive a message directing them to contact their NetMRG administrator. If you need to perform an upgrade, the updater will prompt you to apply all updates. Clicking this link will perform all necessary updates for this release. If for some reason an update fails, or you would like to re-apply an update for any reason, you can goto the updater and goto View all available updates. This will present you a list of the updates that are available and their status (applied, not applied, or error). If you have problems updating from one version to the next, you can force individual updates that fail so that they're considered 'applied'. Once all updates are applied for a particular version, the database will be automatically updated to the latest version that has all updates applied. III. Reference Table of Contents I. Manual Pages I. Manual Pages Table of Contents netmrg-gatherer -- Gathers data from devices. netmrg-gatherer Name netmrg-gatherer -- Gathers data from devices. Synopsis netmrg-gatherer [OPTIONS] Description netmrg-gatherer performs tests on all enabled hosts in NetMRG. It will store results in RRD files using RRDTOOL(1) and perform actions in response to events. Global Options -h Displays usage information and exits. -v Displays software version and exits. Operating Options -t num threads Run no more than the specified number of threads simultaneously. -X Become a daemon. -M mode Mode of operation. This option controls the manner in which the gatherer operates. The modes currently supported are "once" (the default, best used manually or via cron) which runs all tests once then exits, and "wait" (best used when daemonized) which will run all tests, wait for the gatherer interval to expire, and then repeat. Note: To run netmrg-gatherer daemonized, the recommended set of options at this point is "-X -S -M wait" which will daemonize, repeat the gather cycle on each interval, and write output to syslog. Logging, Debugging and Verbosity Options -S Syslog. Logs messages to syslog instead of stdout. -b Bland. Disables color output. By default, netmrg-gatherer will display color output when connected to a terminal, but will use bland output when its output is written to a file. This option should only be needed when the detection mechanism has failed, or the user doesn't want to see colors when running the program by hand. -a All. Displays all log messages. -m Most. Displays more messages than default. -q Quiet. Silences all output. -l level mask Only outputs messages that match the specified level mask. -c component mask Only outputs messages that match the specified component mask. -s Safe. Tries to keep sensitive information out of the displayed messages. Configuration File Options -C config file Uses the specified XML configuration file. -K config file Parses the specified XML configuration file and exits. Database Options -H host Uses the specified host name for connecting to the database. -D database Uses the specified database name. -u user name Uses the specified user name for connecting to the database. -p [password] Uses the specified password for connecting to the database. If no password is specified, the user is prompted to enter one. Recaching Options -i device id Performs an interface recache on the specified device. -d device id Performs a disk recache on the specified device. Note: Recaching options are intended for use by the web interface. These options should not be generally used by end users. __________________________________________________________ Chapter 7. Contact Information We have great aspirations for what NetMRG could become, but as with all open-source software, such aspriations can only be achieved with the active participation of the open-source community. Please do your part and support software that you use by helping to answer support questions on forums and report bugs to developers. Thanks! * Main Website - http://www.netmrg.net/ * Online Docs- http://wiki.netmrg.net/ * Support Forum - http://lists.netmrg.net/ * Bug Reporting and Tracking - http://bugs.netmrg.net/ netmrg-0.20/m4/0000775000076400007640000000000011000016360013420 5ustar silfreedsilfreednetmrg-0.20/m4/lib-link.m40000664000076400007640000006424410772570211015414 0ustar silfreedsilfreed# lib-link.m4 serial 9 (gettext-0.16) dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.50) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) netmrg-0.20/m4/po.m40000664000076400007640000004336710772570211014334 0ustar silfreedsilfreed# po.m4 serial 13 (gettext-0.15) dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. AC_PREREQ(2.50) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # 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=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) netmrg-0.20/m4/Makefile.in0000664000076400007640000002206411000016360015471 0ustar silfreedsilfreed# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RRDTOOL = @RRDTOOL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WWWDIR = @WWWDIR@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign m4/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/m4/Makefile.am0000664000076400007640000000052110157157500015470 0ustar silfreedsilfreedEXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 netmrg-0.20/m4/lib-ld.m40000664000076400007640000000653110772570211015051 0ustar silfreedsilfreed# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) netmrg-0.20/m4/lib-prefix.m40000664000076400007640000001503610772570211015747 0ustar silfreedsilfreed# lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) netmrg-0.20/m4/nls.m40000664000076400007640000000226610772570211014503 0ustar silfreedsilfreed# nls.m4 serial 3 (gettext-0.15) dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) netmrg-0.20/m4/iconv.m40000664000076400007640000000642610772570211015027 0ustar silfreedsilfreed# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) netmrg-0.20/m4/gettext.m40000664000076400007640000003773210772570211015401 0ustar silfreedsilfreed# gettext.m4 serial 59 (gettext-0.16.1) dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) netmrg-0.20/install-sh0000775000076400007640000001270107702667001015127 0ustar silfreedsilfreed#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 netmrg-0.20/RELEASE-NOTES0000664000076400007640000001312311000015417014773 0ustar silfreedsilfreed Chapter 2. Revision History * 0.20 2008.04.11 Major feature enhancements and bug fixes; Fixed compilation under GCC 4.3; restructuring of view pages to show graph titles (for easier in-page searching) and icons for graph actions; fixed mysql 5 compatibility; added device properties (keeps track of things like model #, serial #, etc); added ability to chain interfaces to travel between them; added ajax monitor selection on graphs. * 0.19 2006.02.03 Major Feature Enhancements and Bug Fixes; Major Web Interface redesign to give more room for graphs and ease overall use. Security enhancements behind the scenes to ensure correct permissions checking. Added a search interface that will search groups, devices, sub devies, and sub device parameters. RRDtool 1.2 support (including graph smoothing); Depricated use of netmrg_cron.sh in favor of using netmrg-gatherer; migrated bulk of docs to wiki; numerous other bugfixes and enhancements. * 0.18.2 2004.11.09 Minor Bug Fixes; Fixed some escaping problems on the interface cache page, disabled the 'quickprint' Net-SNMP option for better compatibility, fixed the snmp-failure test, fixed an SVO-user view issue, and added failover for duplicate ifNames when adding interfaces. * 0.18.1 2004.11.01 Minor Bug Fixes; Fixed a small bug where the gatherer would not register negative values. * 0.18 2004.10.25 Major Bug Fixes; Fixed an issue preventing form submissions on some browsers, fixed PHP string escaping problems, fixed inability to create inverted stacked graphs, and fixed parameter substituion and documentation regarding notifications and responses. Added better support on FreeBSDs (4.8-5.2) and x86-64 architectures (Linux and FreeBSD), the ability to multiply summed values, MySQL timeouts, simple value parsing (to get the numeric content out of quoted numbers, etc), graphic icons for most actions, support for a default external auth user (with regards to permissions), and cleaned up the gatherer build process output. * 0.17 2004.09.13 Minor Feature Enhancements; Added colorized gatherer output, checkbox support on multiple pages, the ability to disable users, fixed a potential SQL-injection bug, updated navigation on group pages, updated tutorials. * 0.16 2004.06.10 Minor Bugfixes and Feature Enhancements; fixed a user management bug and several bugs related to 'single view only' users not being able to see graphs, added the ability to ignore SNMP uptime checks for devices (permitting the monitoring of broken devices), added the ability to do an SNMP walk of an OID (useful for the Windows SNMP agent), enhanced group/device management, cleaned up autoconf (now supports FC2), and added experimental syslog and daemon support in the gatherer. * 0.15 2004.05.20 Minor Bugfixes and Feature Enhancements; fixes for various db errors (including the infamous one on snmp_cache_view.php), better cross-platform compilation, select all/none/invert checkbox support, support for choosing what graph to apply to an interface, better support for php < 4.2.0, and some security fixes for single-view-only users. * 0.14 2004.03.10 Minor Bugfixes and Feature Enhancements; escaping issues in template dereferencing, broken links on various pages, security issues regarding manual SNMP recaching, broken duplication on non-cutting-edge MySQL, more parameter substitution in SQL tests, better date parsing for advanced graph view, nav-bar and group navigation enhancements, advanced view capability for monitor-only graphs. * 0.13 2003.12.19 Minor Bugfixes and Feature Enhancements; slide show ordering, previous slide, resume slide show, better formatting of 'sums', errors on view editing, fixes to permissions checking, and an occassional segfault in the gatherer was fixed. * 0.12 2003.12.15 Major Feature Enhancents and Bugfixes; added SNMPv2 support, fixed a bug that would cause a device to be deleted from all groups, fixed session timeout when using external auth, added checkbox support to interface/disk cache pages, slide show enhancements, fixed permission issue where unauthorized users could view/edit test_* pages * 0.10 2003.10.05 Major bug fix; fixes a db error when trying to view monitors, a bug that would always set the width and height to zero when creating graphs, and makes conditions with 'rate of change' work. Many documentation upgrades. * 0.10pre2 2003.09.15 This release focuses on adding new features and sqaushing bugs. In addition, there is now an 'updater.php' that is required to be run between versions. A minor change needs to be made to everyone's 'netmrg.xml' to add an 'externalauth' field inside the 'website' section. * 0.10pre1 2003.07.28 Initial publication References Visible links . file:///home/silfreed/src/netmrg/share/doc/txt/index.html . file:///home/silfreed/src/netmrg/share/doc/txt/overview.html . file:///home/silfreed/src/netmrg/share/doc/txt/intro.html . file:///home/silfreed/src/netmrg/share/doc/txt/installation.html netmrg-0.20/etc/0000775000076400007640000000000011000016360013653 5ustar silfreedsilfreednetmrg-0.20/etc/Makefile.in0000664000076400007640000002605611000016360015731 0ustar silfreedsilfreed# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # These settings are pulled into Makefile.in by automake VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/cron.d-netmrg.in $(srcdir)/init.d-netmrg.in \ $(srcdir)/netmrg.conf.in $(srcdir)/netmrg.xml.in \ $(top_srcdir)/Make.inc subdir = etc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = cron.d-netmrg init.d-netmrg netmrg.conf \ netmrg.xml SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(netmrg_etcdir)" netmrg_etcDATA_INSTALL = $(INSTALL_DATA) DATA = $(netmrg_etc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RRDTOOL = @RRDTOOL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WWWDIR = @WWWDIR@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_MAKEFLAGS = \ ` test "$(VERBOSE)" = "1" && echo $(ECHO_N) "" \ || echo $(ECHO_N) "-s" ` # options to install files in the etc directory netmrg_etcdir = $(sysconfdir) netmrg_etc_DATA = netmrg.xml netmrg.conf all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Make.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign etc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign etc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cron.d-netmrg: $(top_builddir)/config.status $(srcdir)/cron.d-netmrg.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ init.d-netmrg: $(top_builddir)/config.status $(srcdir)/init.d-netmrg.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ netmrg.conf: $(top_builddir)/config.status $(srcdir)/netmrg.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ netmrg.xml: $(top_builddir)/config.status $(srcdir)/netmrg.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ uninstall-netmrg_etcDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_etc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_etcdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_etcdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(netmrg_etcdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-netmrg_etcDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-netmrg_etcDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-netmrg_etcDATA install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-netmrg_etcDATA @SET_MAKE@ # override the default netmrg_etc install install-netmrg_etcDATA: $(netmrg_etc_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(netmrg_etcdir) @list='$(netmrg_etc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ if test -e "$(DESTDIR)$(netmrg_etcdir)/$$f"; then \ echo " Config file $$p exists...not overwriting."; \ else \ echo " INST $$d$$p"; \ $(netmrg_etcDATA_INSTALL) $$d$$p $(DESTDIR)$(netmrg_etcdir)/$$f; \ fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/etc/netmrg.conf.in0000664000076400007640000000030707742040424016443 0ustar silfreedsilfreedAlias /netmrg "@localstatedir@/www/netmrg/webfiles" Options Indexes AllowOverride None Order allow,deny Allow from all netmrg-0.20/etc/Makefile.am0000664000076400007640000000134210135656170015730 0ustar silfreedsilfreed@SET_MAKE@ include $(top_srcdir)/Make.inc # options to install files in the etc directory netmrg_etcdir=$(sysconfdir) netmrg_etc_DATA = netmrg.xml netmrg.conf # override the default netmrg_etc install install-netmrg_etcDATA: $(netmrg_etc_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(netmrg_etcdir) @list='$(netmrg_etc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ if test -e "$(DESTDIR)$(netmrg_etcdir)/$$f"; then \ echo " Config file $$p exists...not overwriting."; \ else \ echo " INST $$d$$p"; \ $(netmrg_etcDATA_INSTALL) $$d$$p $(DESTDIR)$(netmrg_etcdir)/$$f; \ fi; \ done netmrg-0.20/etc/cron.d-netmrg.in0000664000076400007640000000022610253427501016674 0ustar silfreedsilfreed# run NetMRG every 5 minutes if enabled */5 * * * * netmrg bash -c "if [ -f @localstatedir@/lock/subsys/netmrg ]; then @bindir@/netmrg-gatherer; fi" netmrg-0.20/etc/init.d-netmrg.in0000664000076400007640000000206510055756614016713 0ustar silfreedsilfreed#!/bin/bash # # NetMRG This shell script enables the running of NetMRG via cron # # Author: Douglas E. Warner # # chkconfig: - 50 01 # # description: Enable NetMRG run via cron # processname: netmrg # config: /etc/netmrg/netmrg.xml # # source function library . /etc/rc.d/init.d/functions prog="netmrg" lockfile="@localstatedir@/lock/subsys/$prog" RETVAL=0 start() { echo -n $"Enabling NetMRG run via cron: " touch "$lockfile" && success || failure RETVAL=$? echo } stop() { echo -n $"Disabling NetMRG run via cron: " rm -f "$lockfile" && success || failure RETVAL=$? echo } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart|force-reload) restart ;; reload) ;; condrestart) [ -f "$lockfile" ] && restart ;; status) if [ -f $lockfile ]; then echo $"NetMRG run via cron is enabled." RETVAL=0 else echo $"NetMRG run via cron is disabled." RETVAL=3 fi ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" exit 1 esac exit $RETVAL netmrg-0.20/etc/netmrg.xml.in0000664000076400007640000000202310772570211016312 0ustar silfreedsilfreed localhost netmrguser netmrgpass netmrg 10 @RRDTOOL@ @localstatedir@/log/netmrg/lockfile @localstatedir@/log/netmrg/runtime @libexecdir@/netmrg @localstatedir@/lib/netmrg/rrd @localstatedir@/www/netmrg @datarootdir@/netmrg/locale 5 Generic Company http://www.netmrg.net http://localhost /netmrg false 300 500 LOG_DAEMON 1.0 netmrg-0.20/depcomp0000775000076400007640000002753307702667001014511 0ustar silfreedsilfreed#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 netmrg-0.20/libexec/0000775000076400007640000000000011000016355014517 5ustar silfreedsilfreednetmrg-0.20/libexec/avoided.php0000775000076400007640000000104307564305313016663 0ustar silfreedsilfreed#!/usr/bin/php -q netmrg-0.20/libexec/linuxload.sh0000775000076400007640000000034310627026156017073 0ustar silfreedsilfreed#!/bin/sh # Author: Uwe Steinmann # usage linuxload.sh # item can be 1, 2, or 3 if [ -f /proc/loadavg -a "$1" != "" -a $1 -ge 1 -a $1 -le 3 ]; then cut -d' ' -f$1 /proc/loadavg else echo "U" fi netmrg-0.20/libexec/linuxacpiinfo.pl0000775000076400007640000000773010035252754017752 0ustar silfreedsilfreed#!/usr/bin/perl # # linuxacpiinfo.pl # # reports some acpi battery info # # % remaining, minutes remaining, ac status # # works for all batteries (if you have > 1) and non-standard # acpi directories (ie, not BATx) # use strict; ### config variables my $acpibatdir = "/proc/acpi/battery"; my $acpiacdir = "/proc/acpi/ac_adapter"; my $max_minutes = 600; # 10hrs ### status variables my $ac_status = 0; my $battery_status = 0; my $battery_maxcapacity = 0; my $battery_curcapacity = 0; my $battery_dischargerate = 0; my $time_remaining = "U"; my $percent_left = "U"; ### argument processing if (scalar(@ARGV) != 1 || ($ARGV[0] ne "-p" && $ARGV[0] ne "-th" && $ARGV[0] ne "-tm" && $ARGV[0] ne "-V") ) { print "U\n"; print "\n"; print "$0 [-p|-tm|-th|-a|-V]\n"; print " -p: Report Percent Left\n"; print " -th: Report Time Remaining (in hours)\n"; print " -tm: Report Time Remaining (in minutes)\n"; print " -V: acpi -V compatibility\n"; print "\n"; exit(1); } # end if not enough parameters ### read info from acpi # find our ac status opendir(DIR, $acpiacdir); my @acdirfiles = grep { !/^\./ } readdir(DIR); closedir(DIR); foreach my $acfile (@acdirfiles) { open(AC, "$acpiacdir/$acfile/state") or die("ERROR: couldn't open acfile"); while (my $line = ) { $ac_status = $1 if ($line =~ /^state:\s+(\S+)$/); } # end while lines close(AC); } # end foreach acfile # find our battery info opendir(DIR, $acpibatdir); my @batdirfiles = grep { !/^\./ } readdir(DIR); closedir(DIR); foreach my $batfile (@batdirfiles) { open(BATINFO, "$acpibatdir/$batfile/info") or die("ERROR: couldn't open batfile"); while (my $line = ) { $battery_maxcapacity += $1 if ($line =~ /^last full capacity:\s+(\d+)/); } # end while lines close(BATINFO); open(BATSTATE, "$acpibatdir/$batfile/state") or die("ERROR: couldn't open batstate"); while (my $line = ) { $battery_status = $1 if ($line =~ /^charging state:\s+(\S+)$/); $battery_curcapacity = $1 if ($line =~ /^remaining capacity:\s+(\d+)/); $battery_dischargerate = $1 if ($line =~ /^present rate:\s+(\d+)/); } # end while lines close(BATSTATE); } # end foreach batfile $time_remaining = sprintf("%.2f", $battery_curcapacity/$battery_dischargerate) if ($battery_dischargerate); $time_remaining = "U" if ($time_remaining*60 > $max_minutes); $percent_left = sprintf("%.2f", $battery_curcapacity/$battery_maxcapacity*100); ### do what the user wanted if ($ARGV[0] eq "-p") { print int($percent_left)."\n"; } # end if percent left elsif ($ARGV[0] eq "-th") { print $time_remaining."\n"; } # end if time left (hours) elsif ($ARGV[0] eq "-tm") { print int($time_remaining*60) if ($time_remaining ne "U"); print "\n"; } # end if time left (minutes) elsif ($ARGV[0] eq "-V") { #$ acpi -V # Battery 1: unknown, 100% # Thermal 1: ok, 43.0 degrees C # AC Adapter 1: on-line #$ acpi -V # Battery 1: charging, 97%, 00:26:45 until charged # Thermal 1: ok, 39.0 degrees C # AC Adapter 1: on-line #$ acpi -V # Battery 1: discharging, 71%, 02:12:12 remaining # Thermal 1: ok, 48.0 degrees C # AC Adapter 1: off-line print " Battery 1: ".$battery_status.", "; print int($percent_left)."%"; if ($battery_status eq "discharging") { my $hours_remaining = int($time_remaining); my $minutes_remaining = ($time_remaining * 60) % 60; my $seconds_remaining = ($time_remaining * 3600) % 60; print ", "; printf("%.2d", $hours_remaining); print ":"; printf("%.2d", $minutes_remaining); print ":"; printf("%.2d", $seconds_remaining); print " remaining"; } # end if discharging print "\n"; print " Thermal 1: ok, 30.0 degrees C\n"; print " AC Adapter 1: ".$ac_status."\n"; } # end if ac status ### DEBUG #print "AC Status: $ac_status\n"; #print "BAT Status: $battery_status\n"; #print "BAT Max Capacity: $battery_maxcapacity\n"; #print "BAT Current Capacity: $battery_curcapacity\n"; #print "BAT Discharge Rate: $battery_dischargerate\n"; #print "Time Left: $time_remaining\n"; #print "Percent Left: $percent_left\n"; netmrg-0.20/libexec/snmpdiff.php0000775000076400007640000000133207564305313017057 0ustar silfreedsilfreed#!/usr/bin/php -q ** ** Descritpion: ** Gets an oid1 and oid2 from a community@host and ** returns just the facts */ // no errors! error_reporting(E_NONE); // if less than 4 arguments, exit if ($argc != 5) { exit; } $snmp_result0 = snmpget($argv[1], $argv[2], $argv[3]); $snmp_result1 = snmpget($argv[1], $argv[2], $argv[4]); //if (!empty($snmp_result0) && !empty($snmp_result1)) { $snmp_parts0 = explode(" ", $snmp_result0); $snmp_parts1 = explode(" ", $snmp_result1); $diff = ($snmp_parts0[count($snmp_parts0)-1]+0) - ($snmp_parts1[count($snmp_parts1)-1]+0); echo "$diff\n"; //} else { // echo "U\n"; //} // end if exit; ?> netmrg-0.20/libexec/pmmodems.pl0000775000076400007640000000455410303142037016712 0ustar silfreedsilfreed#!/usr/bin/perl -w # Copyright (c) 2004, Ben Winslow # # Released under the MIT (aka X11) License: # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # Abstract: # Tallies the number of active modems on a Livingston Portmaster. # Modems in the 'active' and 'connecting' state are counted. # Tested and working on PM3s running ComOS 3.9.1c1. # Usage: # pmmodems.pl
use Net::SNMP; sub get_users { my ($comm, $ip) = @_; my ($numusers) = 0; my ($baseoid, $res, $k); my ($snmp, $err) = Net::SNMP->session( -hostname => $ip, -community => $comm, -version => 1 ); die $err if ($err); # enterprises.livingston.livingstonMib.livingstonInterfaces.livingstonModem.livingstonModemTable.livingstonModemEntry.livingstonModemStatus $baseoid = ".1.3.6.1.4.1.307.3.2.3.1.1.3"; $res = $snmp->get_table($baseoid); if (defined($res)) { # use oid_lex_sort for properly sorted output if hacking # up this script. it doesn't matter here. foreach $k (keys %$res) { # none(1), bound(2), connecting(3), # active(4), test(5), down(6), ready(7), # halt(8), admin(9) $numusers++ if ($res->{$k} == 4 || $res->{$k} == 3); } } else { $numusers = -1; } $snmp->close(); return $numusers; } my ($users); die "Usage: $0 \n" if (@ARGV != 2); $users = get_users($ARGV[0], $ARGV[1]); print "$users\n" if ($users != -1); netmrg-0.20/libexec/ping_time.pl0000775000076400007640000000040107656017736017057 0ustar silfreedsilfreed#!/usr/bin/perl # Return average ping time ($ip) = @ARGV; @result = `ping -n -c 6 -i 0.2 -w 3 $ip 2>/dev/null`; $result = $result[$#result]; $result =~ s/.*= //; $result =~ s/\/.*//; if ($result =~ /errors/) { print("U\n"); } else { print($result); } netmrg-0.20/libexec/win2kcpu.pl0000775000076400007640000000161107617604374016647 0ustar silfreedsilfreed#!/usr/bin/perl # # win2kcpu.pl # # uses snmpwalk to return the cpu load for # the cpu requested, or the first cpu if no cpu specified # use strict; # we need at least a host and a community string if (scalar(@ARGV) < 2) { print "U\n"; exit(); } # end if only one argument # some variables to be used later my $host = $ARGV[0]; my $community = $ARGV[1]; my $cpunumber = 1; my $cmdoutput; my @outputpercpu; if (defined($ARGV[2])) { $cpunumber = $ARGV[2]; } # end if cpu number specified # execute snmpwalk and store output $cmdoutput = `snmpwalk -Ov -c $community $host host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad 2> /dev/null`; @outputpercpu = split(/\n$/, $cmdoutput); my $i = 0; foreach my $line (@outputpercpu) { $i++; if ($i == $cpunumber) { $line =~ /(\d+)$/; print "$1\n"; exit(); } # end if time to output cpu info } # end output for each cpu print "U\n"; netmrg-0.20/libexec/old-cisco-dev-props.php0000775000076400007640000000171010522144106021027 0ustar silfreedsilfreed#!/usr/bin/php -q ** ** Descritpion: ** Returns either the model number (actually closer to "family" than model), ** and the IOS version. Designed for use on 2900XL and 3500XL switches with ** older IOS versions that do not support MIBs containing these values separately. */ // no errors! error_reporting(E_ALL); // if less than 3 arguments, exit if ($argc != 4) { print "U\nnot enough args"; exit; } $snmp_result = snmpget($argv[1], $argv[2], "sysDescr.0"); //print($snmp_result); $model = preg_replace("/.* \(tm\) /s", "", $snmp_result); $model = preg_replace("/ .*/s", "", $model); $model = "WS-" . $model; $version = preg_replace("/.* Version /s", "", $snmp_result); $version = preg_replace("/,.*/s", "", $version); switch ($argv[3]) { case "version": echo("$version\n"); break; case "model": echo("$model\n"); break; } exit; ?> netmrg-0.20/libexec/linux26diskaccess.pl0000775000076400007640000000321310627026156020440 0ustar silfreedsilfreed#!/usr/bin/perl use strict; ### config variables my $blockdev = "/sys/block"; ### argument processing if (@ARGV != 2 or $ARGV[0] !~ /^-[rw]b?$/ or $ARGV[1] !~ /^\w+(?:\d+)?$/) { print "U\n"; print "\n"; print "$0 [-r|-rb|-w|-wb] \n"; print "\n"; print "Reports disk I/O statistics counters for use as a NetMRG test script.\n"; print "\n"; print "Options:\n"; print " -r Report the number of read operations\n"; print " -rb Report the number of read blocks\n"; print " -w Report the number of write operations\n"; print " -wb Report the number of written blocks\n"; print " dev(n) Is a relative block device or partition name.\n"; print " For instance hda, hda1 or md0\n"; print "\n"; exit 1; } ### figure out device/partitions my ($hd, $partition); if ($ARGV[1] =~ /^(hd\w)\d+$/) { $partition = $ARGV[1]; $hd = $1; } # end if hd has a partition else { $hd = $ARGV[1]; } # end else hd is just the drive ### read info from system block # read the data from the correct path my $path = "$blockdev/$hd"; $path .= "/$partition" if ($partition ne ""); $path .= "/stat"; open(STAT, $path) || die ("U\nERROR: couldn't open $path\n\n"); my $line = ; close(STAT); chomp($line); $line =~ s/^\s+//; my ($read, $readb, $write, $writeb); if ($partition eq "") { ($read, $readb, $write, $writeb)=(split /\s+/, $line)[0, 2, 4, 6]; } else { ($read, $readb, $write, $writeb)=split /\s+/, $line; } ### output the data if ($ARGV[0] eq "-r") { print "$read\n"; } elsif ($ARGV[0] eq "-w") { print "$write\n"; } elsif ($ARGV[0] eq "-rb") { print "$readb\n"; } elsif ($ARGV[0] eq "-wb") { print "$writeb\n"; } netmrg-0.20/libexec/snmpdiff.sh0000775000076400007640000000064010721343575016704 0ustar silfreedsilfreed#!/bin/sh # # snmpdiff.sh # # takes in arguments and outputs diff of OIDs # if (( $# < 4 )); then echo "Usage: $0 [... ]"; exit 1; fi; hostname="$1" community="$2" shift shift snmpget="snmpget -v1 -c $community -OqvU $hostname" val=`$snmpget $1`; shift for i in "$@"; do val=$(($val - `$snmpget $i`)); done if (( $val != 0 )); then echo $val; else echo U; fi netmrg-0.20/libexec/linuxapminfo.pl0000775000076400007640000000163107744305526017616 0ustar silfreedsilfreed#!/usr/bin/perl # # linuxapminfo.pl # # reports values of certain apm values # use strict; if (scalar(@ARGV) != 1 || ($ARGV[0] ne "-p" && $ARGV[0] ne "-t") ) { print "U\n"; print "\n"; print "$0 [-p] [-t]\n"; print " -p: Report Percent Left\n"; print " -t: Report Time Remaining (in minutes)\n"; print "\n"; exit(1); } # end if not enough parameters # read in info from apm open 'apmfh', "/proc/apm"; my $apmline = ; close 'apmfh'; ## get the value we want # percent left if ($ARGV[0] eq "-p") { if ($apmline =~ /(\d+)%/) { print "$1\n"; exit(0); } # end if found percent left } # end if percent left to check # time remaining elsif ($ARGV[0] eq "-t") { if ($apmline =~ /(\d+)\s+min$/) { print "$1\n"; exit(0); } # end if found min left elsif ($apmline =~ /(\w+)\s+\?$/) { print "U\n"; exit(0); } # end if indef minutes left } # end if time remaining print "U\n"; exit (1); netmrg-0.20/mkinstalldirs0000775000076400007640000000370410157157500015730 0ustar silfreedsilfreed#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here netmrg-0.20/configure0000775000076400007640000113525011000016361015017 0ustar silfreedsilfreed#! /bin/sh # From configure.ac Revision:1281 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for NetMRG 0.20. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible 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 # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 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=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # 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. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. 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 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' 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 # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_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 # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_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 # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done 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+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. 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 } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop 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 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file 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 || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='NetMRG' PACKAGE_TARNAME='netmrg' PACKAGE_VERSION='0.20' PACKAGE_STRING='NetMRG 0.20' PACKAGE_BUGREPORT='' ac_unique_file="src/netmrg.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gt_needs= 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 datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar RRDTOOL MYSQL_CONFIG WWWDIR CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP CXXCPP GREP EGREP LIBOBJS USE_NLS MSGFMT GMSGFMT MSGFMT_015 GMSGFMT_015 XGETTEXT XGETTEXT_015 MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`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 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`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 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`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 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`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 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) 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 { (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 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac 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 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. 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 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 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. 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. 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 fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- 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 { (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 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. 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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no 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 { (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 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures NetMRG 0.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', 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/netmrg] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of NetMRG 0.20:";; esac cat <<\_ACEOF Optional Features: --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 --enable-dependency-tracking do not reject slow dependency extractors --enable-warnings Enable -Wall if using g++ --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-rrdtool=PROGRAM location of the rrdtool program --with-mysql_config=PROGRAM location of the mysql_config program --with-snmp-include-dir SNMP include base directory [/usr/(local/)include] --with-snmp-lib-dir SNMP library directory [/usr/(local/)lib[64]] --with-xml2-include-dir XML2 include directory --with-xml2-lib-dir XML2 library directory --with-www-dir install directory for web files --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? 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 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,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF NetMRG configure 0.20 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by NetMRG $as_me 0.20, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var 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;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do 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;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done 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;} 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;} >$cache_file fi gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value 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;} 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;} 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=: 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=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac 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;} { (exit 1); exit 1; }; } fi ac_ext=c 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 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break 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;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # 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 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 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; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # 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 alias in your environment" >&5 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 test "$2" = conftest.file ) then # Ok. : else { { 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! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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. # 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 # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL 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;} 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; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; 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; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." 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;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='netmrg' VERSION='0.20' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. 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; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi 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; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS 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; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { 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 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 ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers src/include/config.h" { 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'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; 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; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # We wanna use C++, not that silly C language ;) ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # # Autoconf is dumb and doesn't expand ${prefix} for this variable # If it does this in the future, this can probably be removed # if test "x$exec_prefix" = "xNONE"; then if test "x$prefix" = "xNONE" ; then exec_prefix="/usr/local" else exec_prefix="$prefix" fi ac_configure_args="$ac_configure_args --exec-prefix=$exec_prefix" fi # # --with configs # # rrdtool # Check whether --with-rrdtool was given. if test "${with_rrdtool+set}" = set; then withval=$with_rrdtool; rrdtool_prog=$withval fi # Extract the first word of "rrdtool", so it can be a program name with args. set dummy rrdtool; 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_RRDTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $RRDTOOL in [\\/]* | ?:[\\/]*) ac_cv_path_RRDTOOL="$RRDTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RRDTOOL="$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 IFS=$as_save_IFS test -z "$ac_cv_path_RRDTOOL" && ac_cv_path_RRDTOOL="$rrdtool_prog" ;; esac fi RRDTOOL=$ac_cv_path_RRDTOOL if test -n "$RRDTOOL"; then { echo "$as_me:$LINENO: result: $RRDTOOL" >&5 echo "${ECHO_T}$RRDTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$RRDTOOL" = "x"; then { { echo "$as_me:$LINENO: error: Couldn't find rrdtool. Please verify that it is installed." >&5 echo "$as_me: error: Couldn't find rrdtool. Please verify that it is installed." >&2;} { (exit 1); exit 1; }; } fi # mysql # Check whether --with-mysql_config was given. if test "${with_mysql_config+set}" = set; then withval=$with_mysql_config; mysql_config_prog=$withval fi # Extract the first word of "mysql_config", so it can be a program name with args. set dummy mysql_config; 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_MYSQL_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MYSQL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MYSQL_CONFIG="$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 IFS=$as_save_IFS test -z "$ac_cv_path_MYSQL_CONFIG" && ac_cv_path_MYSQL_CONFIG="$mysql_config_prog" ;; esac fi MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG if test -n "$MYSQL_CONFIG"; then { echo "$as_me:$LINENO: result: $MYSQL_CONFIG" >&5 echo "${ECHO_T}$MYSQL_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$MYSQL_CONFIG" = "x"; then { { echo "$as_me:$LINENO: error: Couldn't find mysql_config. Please verify that it is installed." >&5 echo "$as_me: error: Couldn't find mysql_config. Please verify that it is installed." >&2;} { (exit 1); exit 1; }; } fi # snmp # Check whether --with-snmp-include-dir was given. if test "${with_snmp_include_dir+set}" = set; then withval=$with_snmp_include_dir; snmp_include_dir=$withval fi # Check whether --with-snmp-lib-dir was given. if test "${with_snmp_lib_dir+set}" = set; then withval=$with_snmp_lib_dir; snmp_lib_dir=$withval fi # xml2 # Check whether --with-xml2-include-dir was given. if test "${with_xml2_include_dir+set}" = set; then withval=$with_xml2_include_dir; xml2_include_dir=$withval fi # Check whether --with-xml2-lib-dir was given. if test "${with_xml2_lib_dir+set}" = set; then withval=$with_xml2_lib_dir; xml2_lib_dir=$withval fi # www dir www_dir="${localstatedir}/www/${PACKAGE}" # Check whether --with-www-dir was given. if test "${with_www_dir+set}" = set; then withval=$with_www_dir; www_dir=$withval fi WWWDIR=$www_dir # # Special hacks for certain operating systems # # if host_alias is empty, ac_cv_host_alias may still have the info if test -z "$host_alias"; then host_alias=$ac_cv_host_alias fi # Platform-specific tweaks case $host_alias in *solaris*) cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG_SCANF 1 _ACEOF LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" LIBS="-lkstat $LIBS";; *linux*) cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG_SCANF 1 _ACEOF ;; *freebsd*) CPPFLAGS="$CPPFLAGS -I/usr/local/include";; *openbsd*) LIBS="-ldes $LIBS";; esac ### Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else 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 { 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_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { 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 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 ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $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_compiler --version >&5") 2>&5 ac_status=$? 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_compiler -v >&5") 2>&5 ac_status=$? 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_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. 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_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" 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_link_default") 2>&5 ac_status=$? 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' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. 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 ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { 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 See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi 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; } # 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 if { ac_try='./$ac_file' { (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") 2>&5 ac_status=$? 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. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 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; } rm -f a.out 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; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&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_link") 2>&5 ac_status=$? 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 # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. 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_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { 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 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; } 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; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" 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_compile") 2>&5 ac_status=$? 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_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else 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 See \`config.log' for more details." >&5 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; } 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; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .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; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c 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 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; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi 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; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS 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; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { 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 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 ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi 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; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi 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; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe 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; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else 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 { 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 break 2 fi done done IFS=$as_save_IFS 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; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { 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 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 ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { 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 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` { (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_compiler --version >&5") 2>&5 ac_status=$? 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_compiler -v >&5") 2>&5 ac_status=$? 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_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { 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; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; 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 "echo \"\$as_me:$LINENO: $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 (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 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi 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` 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; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; 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 "echo \"\$as_me:$LINENO: $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 (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 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; 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 "echo \"\$as_me:$LINENO: $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 (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 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; 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 "echo \"\$as_me:$LINENO: $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 (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 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" 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; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" 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 "echo \"\$as_me:$LINENO: $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 (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 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC 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; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}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; } ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 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; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c 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; } # 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 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (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 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (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 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { 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 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # 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 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether to enable -Wall" >&5 echo $ECHO_N "checking whether to enable -Wall... $ECHO_C" >&6; } # Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then enableval=$enable_warnings; if test -n "$GXX"; then { echo "$as_me:$LINENO: result: adding -Wall to CPPFLAGS." >&5 echo "${ECHO_T}adding -Wall to CPPFLAGS." >&6; } CPPFLAGS="$CPPFLAGS -Wall" fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ### Checks for libraries. { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; } if test $ac_cv_lib_intl_bindtextdomain = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL 1 _ACEOF LIBS="-lintl $LIBS" fi { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi { echo "$as_me:$LINENO: checking for compress in -lz" >&5 echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } if test "${ac_cv_lib_z_compress+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char compress (); int main () { return compress (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_z_compress=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_compress=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5 echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } if test $ac_cv_lib_z_compress = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBS="-lz $LIBS" fi { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_pthread_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_create=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; } if test $ac_cv_lib_pthread_pthread_create = yes; then CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" LIBS="-lpthread $LIBS" else { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_c_r_pthread_create=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; } if test $ac_cv_lib_c_r_pthread_create = yes; then CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" LIBS="-pthread $LIBS" else { { echo "$as_me:$LINENO: error: POSIX threads not found." >&5 echo "$as_me: error: POSIX threads not found." >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: checking for main in -lstdc++" >&5 echo $ECHO_N "checking for main in -lstdc++... $ECHO_C" >&6; } if test "${ac_cv_lib_stdcpp_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lstdc++ $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_stdcpp_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_stdcpp_main=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_main" >&5 echo "${ECHO_T}$ac_cv_lib_stdcpp_main" >&6; } if test $ac_cv_lib_stdcpp_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSTDC__ 1 _ACEOF LIBS="-lstdc++ $LIBS" fi ## Determine XML2 library path # try and find libs without any additional libraries { echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5 echo $ECHO_N "checking for xmlParseFile in -lxml2... $ECHO_C" >&6; } if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxml2 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char xmlParseFile (); int main () { return xmlParseFile (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_xml2_xmlParseFile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_xml2_xmlParseFile=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5 echo "${ECHO_T}$ac_cv_lib_xml2_xmlParseFile" >&6; } if test $ac_cv_lib_xml2_xmlParseFile = yes; then XML2_LIBS=" " else XML2_LIBS= fi # hunt through several directories trying to find the libraries if test "x$XML2_LIBS" = "x"; then old_LDFLAGS="$LDFLAGS" for try in $xml2_lib_dir /usr/lib64 /usr/lib /usr/local/lib ; do LDFLAGS="$old_LDFLAGS -L$try" unset ac_cv_lib_xml2_xmlParseFile { echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5 echo $ECHO_N "checking for xmlParseFile in -lxml2... $ECHO_C" >&6; } if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxml2 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char xmlParseFile (); int main () { return xmlParseFile (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_xml2_xmlParseFile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_xml2_xmlParseFile=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5 echo "${ECHO_T}$ac_cv_lib_xml2_xmlParseFile" >&6; } if test $ac_cv_lib_xml2_xmlParseFile = yes; then XML2_LIBS="-L$try" else XML2_LIBS= fi if test "x$XML2_LIBS" != "x"; then break; fi done LDFLAGS="$old_LDFLAGS $XML2_LIBS" fi if test "x$XML2_LIBS" = "x"; then { { echo "$as_me:$LINENO: error: XML2 libraries not found. Use --with-xml2-lib-dir=" >&5 echo "$as_me: error: XML2 libraries not found. Use --with-xml2-lib-dir=" >&2;} { (exit 1); exit 1; }; } fi # don't forget to add xml2 to the list of libraries LIBS="-lxml2 $LIBS" ## Determine MySQL library path MYSQL_LIBS=$($MYSQL_CONFIG --libs) LIBS="$LIBS $MYSQL_LIBS" # now that we've found the libraries, check for MySQL < 4.0 MYSQL_VERSION=$($MYSQL_CONFIG --version) if test "x${MYSQL_VERSION//.*/}" = "x3"; then cat >>confdefs.h <<\_ACEOF #define OLD_MYSQL 1 _ACEOF fi ### Checks for header files. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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; } 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 else 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 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. # 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" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 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;} { (exit 1); exit 1; }; } 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; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 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. # 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" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 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;} { (exit 1); exit 1; }; } 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; } 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; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext 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_link") 2>&5 ac_status=$? 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") 2>&5 ac_status=$? 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 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi 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; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. 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; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 #include <$ac_header> _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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_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 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" 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 cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in \ cstdio \ cstdlib \ string \ list \ unistd.h \ netinet/in.h do as_ac_Header=`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; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$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; } 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 #include <$ac_header> _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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else 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; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" 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_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 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else 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; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_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;} 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;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ## Determine XML2 include path { echo "$as_me:$LINENO: checking for libxml/xmlmemory.h" >&5 echo $ECHO_N "checking for libxml/xmlmemory.h... $ECHO_C" >&6; } # Can we include headers using system include dirs? cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int a = 1; ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then XML2_INCLUDE=" " else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 XML2_INCLUDE= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # hunt through several directories trying to find the includes if test "x$XML2_INCLUDE" = "x"; then old_CPPFLAGS="$CPPFLAGS" for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do CPPFLAGS="$old_CPPFLAGS -I$i" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int a = 1; ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then XML2_INCLUDE="-I$i" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 XML2_INCLUDE= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$XML2_INCLUDE" != "x"; then break; fi done CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE" fi if test "x$XML2_INCLUDE" = "x"; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { { echo "$as_me:$LINENO: error: XML2 headers not found. Use --with-xml2-include-dir=" >&5 echo "$as_me: error: XML2 headers not found. Use --with-xml2-include-dir=" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } ## Determine MySQL include path MYSQL_INCLUDE=$($MYSQL_CONFIG --cflags) CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE" ### Checks for typedefs, structures, and compiler characteristics. #AC_CHECK_TYPES([long long]) { 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; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no 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; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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_)) 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ### Checks for library functions. { echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=void 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; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { echo "$as_me:$LINENO: checking for working memcmp" >&5 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else 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 () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF rm -f conftest$ac_exeext 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_link") 2>&5 ac_status=$? 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") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac { echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else 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 () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext 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_link") 2>&5 ac_status=$? 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") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6; } if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else 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 () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext 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_link") 2>&5 ac_status=$? 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") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in \ memmove \ llround \ setenv 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; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi 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 cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; } if test "${ac_cv_search_nanosleep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char nanosleep (); int main () { return nanosleep (); ; return 0; } _ACEOF for ac_lib in '' rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_nanosleep=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_nanosleep+set}" = set; then break fi done if test "${ac_cv_search_nanosleep+set}" = set; then : else ac_cv_search_nanosleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; } ac_res=$ac_cv_search_nanosleep if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else { { echo "$as_me:$LINENO: error: nanosleep function not found." >&5 echo "$as_me: error: nanosleep function not found." >&2;} { (exit 1); exit 1; }; } fi # Determine UCD or Net-SNMP include path if test "x$snmp_include_dir" != "x"; then for i in / /ucd-snmp /include/ucd-snmp; do test -f $snmp_include_dir/$i/snmp.h && SNMP_INCDIR=$snmp_include_dir/$i done for i in / /net-snmp /include/net-snmp; do test -f $snmp_include_dir/$i/net-snmp-config.h && SNMP_INCDIR=$snmp_include_dir/$i done else for i in /usr/local/include /usr/include; do test -f $i/snmp.h && SNMP_INCDIR=$i test -f $i/ucd-snmp/snmp.h && SNMP_INCDIR=$i/ucd-snmp test -f $i/net-snmp/net-snmp-config.h && SNMP_INCDIR=$i/net-snmp test -f $i/snmp/snmp.h && SNMP_INCDIR=$i/snmp test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp test -f $i/snmp/include/net-snmp/net-snmp-config.h && SNMP_INCDIR=$i/snmp/include/net-snmp done fi # Determine UCD or Net-SNMP library path if test "x$snmp_lib_dir" != "x"; then test -f $snmp_lib_dir/libsnmp.a -o -f $snmp_lib_dir/libsnmp.so -o -f $snmp_lib_dir/libsnmp.dylib && SNMP_LIBDIR=$snmp_lib_dir test -f $snmp_lib_dir/libnetsnmp.a -o -f $snmp_lib_dir/libnetsnmp.so -o -f $snmp_lib_dir/libnetsnmp.dylib && SNMP_LIBDIR=$snmp_lib_dir else for i in /usr/local/lib /usr/sfw/lib /usr/lib /usr/lib64 ; do test -f $i/libsnmp.a -o -f $i/libsnmp.so -o -f $i/libsnmp.dylib && SNMP_LIBDIR=$i test -f $i/libnetsnmp.a -o -f $i/libnetsnmp.so -o -f $i/libnetsnmp.dylib && SNMP_LIBDIR=$i done fi if test -z "$SNMP_INCDIR"; then if test "x$snmp_include_dir" != "x";then { { echo "$as_me:$LINENO: error: Cannot find SNMP headers under $snmp_include_dir" >&5 echo "$as_me: error: Cannot find SNMP headers under $snmp_include_dir" >&2;} { (exit 1); exit 1; }; } else { { echo "$as_me:$LINENO: error: Cannot find SNMP headers. Use --with-snmp-include-dir= to specify non-default path." >&5 echo "$as_me: error: Cannot find SNMP headers. Use --with-snmp-include-dir= to specify non-default path." >&2;} { (exit 1); exit 1; }; } fi fi if test -z "$SNMP_LIBDIR"; then if test "x$snmp_lib_dir" != "x";then { { echo "$as_me:$LINENO: error: Cannot find SNMP libraries under $snmp_lib_dir" >&5 echo "$as_me: error: Cannot find SNMP libraries under $snmp_lib_dir" >&2;} { (exit 1); exit 1; }; } else { { echo "$as_me:$LINENO: error: Cannot find SNMP libraries. Use --with-snmp-lib-dir= to specify non-default path." >&5 echo "$as_me: error: Cannot find SNMP libraries. Use --with-snmp-lib-dir= to specify non-default path." >&2;} { (exit 1); exit 1; }; } fi fi LDFLAGS="$LDFLAGS -L$SNMP_LIBDIR" CPPFLAGS="$CPPFLAGS -I$SNMP_INCDIR" # Net/UCD-SNMP includes v3 support and insists on crypto unless # compiled --without-openssl SNMP_SSL=no { echo "$as_me:$LINENO: checking if Net-SNMP needs crypto support" >&5 echo $ECHO_N "checking if Net-SNMP needs crypto support... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { exit(USE_OPENSSL != 1); ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SNMP_SSL=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: checking if UCD-SNMP needs crypto support" >&5 echo $ECHO_N "checking if UCD-SNMP needs crypto support... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { exit(USE_OPENSSL != 1); ; 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 "echo \"\$as_me:$LINENO: $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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SNMP_SSL=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$SNMP_SSL" = "yes"; then { echo "$as_me:$LINENO: checking for CRYPTO_free in -lcrypto" >&5 echo $ECHO_N "checking for CRYPTO_free in -lcrypto... $ECHO_C" >&6; } if test "${ac_cv_lib_crypto_CRYPTO_free+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char CRYPTO_free (); int main () { return CRYPTO_free (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_crypto_CRYPTO_free=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypto_CRYPTO_free=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_free" >&5 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_free" >&6; } if test $ac_cv_lib_crypto_CRYPTO_free = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" else { { echo "$as_me:$LINENO: error: libcrypto not found!" >&5 echo "$as_me: error: libcrypto not found!" >&2;} { (exit 1); exit 1; }; } fi fi HAVE_NET_SNMP=no { echo "$as_me:$LINENO: checking for snmp_timeout in -lnetsnmp" >&5 echo $ECHO_N "checking for snmp_timeout in -lnetsnmp... $ECHO_C" >&6; } if test "${ac_cv_lib_netsnmp_snmp_timeout+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnetsnmp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char snmp_timeout (); int main () { return snmp_timeout (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_netsnmp_snmp_timeout=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_netsnmp_snmp_timeout=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_netsnmp_snmp_timeout" >&5 echo "${ECHO_T}$ac_cv_lib_netsnmp_snmp_timeout" >&6; } if test $ac_cv_lib_netsnmp_snmp_timeout = yes; then LIBS="-lnetsnmp $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_NET_SNMP 1 _ACEOF HAVE_NET_SNMP=yes else { echo "$as_me:$LINENO: result: Cannot find Net-SNMP libraries...checking for UCD-SNMP" >&5 echo "${ECHO_T}Cannot find Net-SNMP libraries...checking for UCD-SNMP" >&6; } fi if test "$HAVE_NET_SNMP" = "no"; then { echo "$as_me:$LINENO: checking for snmp_timeout in -lsnmp" >&5 echo $ECHO_N "checking for snmp_timeout in -lsnmp... $ECHO_C" >&6; } if test "${ac_cv_lib_snmp_snmp_timeout+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsnmp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char snmp_timeout (); int main () { return snmp_timeout (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_snmp_snmp_timeout=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_snmp_snmp_timeout=no fi 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 { echo "$as_me:$LINENO: result: $ac_cv_lib_snmp_snmp_timeout" >&5 echo "${ECHO_T}$ac_cv_lib_snmp_snmp_timeout" >&6; } if test $ac_cv_lib_snmp_snmp_timeout = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSNMP 1 _ACEOF LIBS="-lsnmp $LIBS" else { { echo "$as_me:$LINENO: error: Cannot find UCD-SNMP libraries" >&5 echo "$as_me: error: Cannot find UCD-SNMP libraries" >&2;} { (exit 1); exit 1; }; } fi fi # Internationalization support { echo "$as_me:$LINENO: checking whether NLS is requested" >&5 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "${ECHO_T}$USE_NLS" >&6; } # Prepare PATH_SEPARATOR. # 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=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; 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_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; 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_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$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 IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # 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=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; 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_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # 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=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; 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_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { echo "$as_me:$LINENO: result: $MSGMERGE" >&5 echo "${ECHO_T}$MSGMERGE" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # 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=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6; } if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_CFPreferencesCopyAppValue=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CFPREFERENCESCOPYAPPVALUE 1 _ACEOF fi { echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6; } if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_CFLocaleCopyCurrent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CFLOCALECOPYCURRENT 1 _ACEOF fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6; } if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$gt_func_gnugettext_libc=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$gt_func_gnugettext_libc'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBINTL= LTLIBINTL= INCINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6; } if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$gt_func_gnugettext_libintl=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext 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_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 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi ac_res=`eval echo '${'$gt_func_gnugettext_libintl'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF else USE_NLS=no fi fi { echo "$as_me:$LINENO: checking whether to use NLS" >&5 echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "${ECHO_T}$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { echo "$as_me:$LINENO: result: $gt_source" >&5 echo "${ECHO_T}$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { echo "$as_me:$LINENO: checking how to link with libintl" >&5 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $LIBINTL" >&5 echo "${ECHO_T}$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi POSUB=po fi INTLLIBS="$LIBINTL" # # Run configure in directories # #AC_CONFIG_SUBDIRS(src) ac_config_files="$ac_config_files Makefile subst bin/rrdedit etc/Makefile etc/cron.d-netmrg etc/init.d-netmrg etc/netmrg.conf etc/netmrg.xml m4/Makefile po/Makefile.in src/Makefile src/include/netmrg.h var/Makefile var/lib/Makefile var/lib/rrd/Makefile www/Makefile www/include/config.php" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var 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;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache 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;} 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;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= 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"` # 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" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { 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. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" 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. Usually this means the macro was only invoked conditionally." >&5 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 : ${CONFIG_STATUS=./config.status} 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 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible 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 # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 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=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # 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. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. 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 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' 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 # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop 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 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file 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 || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by NetMRG $as_me 0.20, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -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 --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ NetMRG config.status 0.20 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _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. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { 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 ;; -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 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF 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 export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "subst") CONFIG_FILES="$CONFIG_FILES subst" ;; "bin/rrdedit") CONFIG_FILES="$CONFIG_FILES bin/rrdedit" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "etc/cron.d-netmrg") CONFIG_FILES="$CONFIG_FILES etc/cron.d-netmrg" ;; "etc/init.d-netmrg") CONFIG_FILES="$CONFIG_FILES etc/init.d-netmrg" ;; "etc/netmrg.conf") CONFIG_FILES="$CONFIG_FILES etc/netmrg.conf" ;; "etc/netmrg.xml") CONFIG_FILES="$CONFIG_FILES etc/netmrg.xml" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/include/netmrg.h") CONFIG_FILES="$CONFIG_FILES src/include/netmrg.h" ;; "var/Makefile") CONFIG_FILES="$CONFIG_FILES var/Makefile" ;; "var/lib/Makefile") CONFIG_FILES="$CONFIG_FILES var/lib/Makefile" ;; "var/lib/rrd/Makefile") CONFIG_FILES="$CONFIG_FILES var/lib/rrd/Makefile" ;; "www/Makefile") CONFIG_FILES="$CONFIG_FILES www/Makefile" ;; "www/include/config.php") CONFIG_FILES="$CONFIG_FILES www/include/config.php" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$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 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 build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$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 PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$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 RRDTOOL!$RRDTOOL$ac_delim MYSQL_CONFIG!$MYSQL_CONFIG$ac_delim WWWDIR!$WWWDIR$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$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 CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$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 CXXCPP!$CXXCPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LIBOBJS!$LIBOBJS$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` 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 >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF USE_NLS!$USE_NLS$ac_delim MSGFMT!$MSGFMT$ac_delim GMSGFMT!$GMSGFMT$ac_delim MSGFMT_015!$MSGFMT_015$ac_delim GMSGFMT_015!$GMSGFMT_015$ac_delim XGETTEXT!$XGETTEXT$ac_delim XGETTEXT_015!$XGETTEXT_015$ac_delim MSGMERGE!$MSGMERGE$ac_delim INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim LIBICONV!$LIBICONV$ac_delim LTLIBICONV!$LTLIBICONV$ac_delim INTLLIBS!$INTLLIBS$ac_delim LIBINTL!$LIBINTL$ac_delim LTLIBINTL!$LTLIBINTL$ac_delim POSUB!$POSUB$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; 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` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _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 >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _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 # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS 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;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) 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;} { (exit 1); exit 1; }; };; 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." 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;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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;} { (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,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $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;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _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 $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t 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 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' 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' 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 ;; :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;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) 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 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } 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;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # 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 dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $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" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi perl subst etc/cron.d-netmrg perl subst etc/init.d-netmrg perl subst etc/netmrg.conf perl subst etc/netmrg.xml perl subst src/include/netmrg.h perl subst src/include/config.h perl subst www/Makefile netmrg-0.20/subst.in0000775000076400007640000000211510772570211014611 0ustar silfreedsilfreed#!/usr/bin/perl -w use strict; my ${prefix} = "@prefix@"; my ${exec_prefix} = "@exec_prefix@"; my ${datarootdir} = "@datarootdir@"; while (my $f = shift @ARGV) { my $TEMP = ''; if (-x "/bin/mktemp") { $TEMP = `/bin/mktemp $f.$$.XXXXXX`; die "Cannot make temporary file $TEMP" if($?); chomp $TEMP; } else { my $XXXXXX = rand; $TEMP = "$f.$$.$XXXXXX"; } open IN, "<$f" || die "Cannot open $f for reading"; open OUT, ">$TEMP" || die "Cannot make temporary file $TEMP"; while () { s|\@libexecdir\@|@libexecdir@|g; # put all --with-vars before directories s|\@localstatedir\@|@localstatedir@|g; s|\@sysconfdir\@|@sysconfdir@|g; s|\@datarootdir\@|@datarootdir@|g; s|\@datadir\@|@datadir@|g; s|\@sbindir\@|@sbindir@|g; s|\@bindir\@|@bindir@|g; s|define PACKAGE|define NETMRG_PACKAGE|; # work around autoconf stupidity s|\$\{exec_prefix\}|@exec_prefix@|g; # must be next to last s|\$\{prefix\}|@prefix@|g; # must be last print OUT $_; } close OUT; close IN; if ((! -e $f) || (`diff $f $TEMP`)) { rename $TEMP, $f; } else { unlink $TEMP; } } netmrg-0.20/Makefile.in0000664000076400007640000007514411000016361015161 0ustar silfreedsilfreed# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # These settings are pulled into Makefile.in by automake VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/subst.in \ $(top_srcdir)/Make.inc $(top_srcdir)/bin/rrdedit.in \ $(top_srcdir)/configure $(top_srcdir)/src/include/config.h.in \ $(top_srcdir)/src/include/netmrg.h.in \ $(top_srcdir)/www/include/config.php.in ABOUT-NLS INSTALL \ config.guess config.rpath config.sub depcomp install-sh \ missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = subst bin/rrdedit src/include/netmrg.h \ www/include/config.php am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(netmrg_libexecdir)" "$(DESTDIR)$(netmrg_man1dir)" \ "$(DESTDIR)$(netmrg_share_bindstatsdir)" \ "$(DESTDIR)$(netmrg_share_dbdir)" \ "$(DESTDIR)$(netmrg_share_docdir)" \ "$(DESTDIR)$(netmrg_share_htmldir)" \ "$(DESTDIR)$(netmrg_share_imagesdir)" \ "$(DESTDIR)$(netmrg_var_logdir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) netmrg_libexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) $(netmrg_libexec_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; netmrg_man1DATA_INSTALL = $(INSTALL_DATA) netmrg_share_bindstatsDATA_INSTALL = $(INSTALL_DATA) netmrg_share_dbDATA_INSTALL = $(INSTALL_DATA) netmrg_share_docDATA_INSTALL = $(INSTALL_DATA) netmrg_share_htmlDATA_INSTALL = $(INSTALL_DATA) netmrg_share_imagesDATA_INSTALL = $(INSTALL_DATA) netmrg_var_logDATA_INSTALL = $(INSTALL_DATA) DATA = $(netmrg_man1_DATA) $(netmrg_share_bindstats_DATA) \ $(netmrg_share_db_DATA) $(netmrg_share_doc_DATA) \ $(netmrg_share_html_DATA) $(netmrg_share_images_DATA) \ $(netmrg_var_log_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RRDTOOL = @RRDTOOL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WWWDIR = @WWWDIR@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_MAKEFLAGS = \ ` test "$(VERBOSE)" = "1" && echo $(ECHO_N) "" \ || echo $(ECHO_N) "-s" ` SUBDIRS = m4 po src www etc var . ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = config.rpath ABOUT-NLS # options to install files in the libexec directory netmrg_libexecdir = $(libexecdir)/$(PACKAGE) netmrg_libexec_SCRIPTS = libexec/*.php libexec/*.pl # options to install files in the bin directory bin_SCRIPTS = bin/rrdedit # options to install files in the share/images directory netmrg_share_imagesdir = $(pkgdatadir)/images netmrg_share_images_DATA = share/images/default/*.svg # options to install files in the share/db directory netmrg_share_dbdir = $(pkgdatadir)/db netmrg_share_db_DATA = share/netmrg.mysql # options to install files in the share/contrib directory netmrg_share_bindstatsdir = $(pkgdatadir)/contrib/bindstats netmrg_share_bindstats_DATA = contrib/bindstats/dnsstats* # options to install files in the share/doc directory netmrg_share_docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) netmrg_share_doc_DATA = INSTALL README share/doc/*.sgml share/doc/ChangeLog share/doc/LICENSE share/doc/TODO share/doc/txt/netmrg.txt share/doc/txt/INSTALL share/doc/txt/RELEASE-NOTES share/doc/txt/UPGRADE etc/cron.d-netmrg etc/init.d-netmrg # html documentation netmrg_share_htmldir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html netmrg_share_html_DATA = share/doc/html/*.html # man1 pages netmrg_man1dir = $(mandir)/man1 netmrg_man1_DATA = share/doc/man/man1/*.1 # options to install files in the var/log directory netmrg_var_logdir = $(localstatedir)/log/$(PACKAGE) netmrg_var_log_DATA = all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Make.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) src/include/config.h: src/include/stamp-h1 @if test ! -f $@; then \ rm -f src/include/stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) src/include/stamp-h1; \ else :; fi src/include/stamp-h1: $(top_srcdir)/src/include/config.h.in $(top_builddir)/config.status @rm -f src/include/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/include/config.h $(top_srcdir)/src/include/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f src/include/stamp-h1 touch $@ distclean-hdr: -rm -f src/include/config.h src/include/stamp-h1 subst: $(top_builddir)/config.status $(srcdir)/subst.in cd $(top_builddir) && $(SHELL) ./config.status $@ bin/rrdedit: $(top_builddir)/config.status $(top_srcdir)/bin/rrdedit.in cd $(top_builddir) && $(SHELL) ./config.status $@ src/include/netmrg.h: $(top_builddir)/config.status $(top_srcdir)/src/include/netmrg.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ www/include/config.php: $(top_builddir)/config.status $(top_srcdir)/www/include/config.php.in cd $(top_builddir) && $(SHELL) ./config.status $@ uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done uninstall-netmrg_libexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(netmrg_libexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(netmrg_libexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_libexecdir)/$$f"; \ done uninstall-netmrg_man1DATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_man1_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_man1dir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_man1dir)/$$f"; \ done uninstall-netmrg_share_bindstatsDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_share_bindstats_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_share_bindstatsdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_share_bindstatsdir)/$$f"; \ done uninstall-netmrg_share_dbDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_share_db_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_share_dbdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_share_dbdir)/$$f"; \ done uninstall-netmrg_share_docDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_share_doc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_share_docdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_share_docdir)/$$f"; \ done uninstall-netmrg_share_htmlDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_share_html_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_share_htmldir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_share_htmldir)/$$f"; \ done uninstall-netmrg_share_imagesDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_share_images_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_share_imagesdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_share_imagesdir)/$$f"; \ done install-netmrg_var_logDATA: $(netmrg_var_log_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_var_logdir)" || $(MKDIR_P) "$(DESTDIR)$(netmrg_var_logdir)" @list='$(netmrg_var_log_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(netmrg_var_logDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(netmrg_var_logdir)/$$f'"; \ $(netmrg_var_logDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_var_logdir)/$$f"; \ done uninstall-netmrg_var_logDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_var_log_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_var_logdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_var_logdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 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; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi 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; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(netmrg_libexecdir)" "$(DESTDIR)$(netmrg_man1dir)" "$(DESTDIR)$(netmrg_share_bindstatsdir)" "$(DESTDIR)$(netmrg_share_dbdir)" "$(DESTDIR)$(netmrg_share_docdir)" "$(DESTDIR)$(netmrg_share_htmldir)" "$(DESTDIR)$(netmrg_share_imagesdir)" "$(DESTDIR)$(netmrg_var_logdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-netmrg_man1DATA \ install-netmrg_share_bindstatsDATA install-netmrg_share_dbDATA \ install-netmrg_share_docDATA install-netmrg_share_htmlDATA \ install-netmrg_share_imagesDATA install-netmrg_var_logDATA install-dvi: install-dvi-recursive install-exec-am: install-binSCRIPTS install-netmrg_libexecSCRIPTS install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-netmrg_libexecSCRIPTS \ uninstall-netmrg_man1DATA uninstall-netmrg_share_bindstatsDATA \ uninstall-netmrg_share_dbDATA uninstall-netmrg_share_docDATA \ uninstall-netmrg_share_htmlDATA \ uninstall-netmrg_share_imagesDATA uninstall-netmrg_var_logDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .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 \ distclean-generic distclean-hdr distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-netmrg_libexecSCRIPTS \ install-netmrg_man1DATA install-netmrg_share_bindstatsDATA \ install-netmrg_share_dbDATA install-netmrg_share_docDATA \ install-netmrg_share_htmlDATA install-netmrg_share_imagesDATA \ install-netmrg_var_logDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-netmrg_libexecSCRIPTS \ uninstall-netmrg_man1DATA uninstall-netmrg_share_bindstatsDATA \ uninstall-netmrg_share_dbDATA uninstall-netmrg_share_docDATA \ uninstall-netmrg_share_htmlDATA \ uninstall-netmrg_share_imagesDATA uninstall-netmrg_var_logDATA @SET_MAKE@ install : all install-recursive distclean: distclean-recursive @echo " RM $(am__CONFIG_DISTCLEAN_FILES)" @rm -f $(am__CONFIG_DISTCLEAN_FILES) @echo " RM Makefile" @rm -f Makefile install-netmrg_libexecSCRIPTS: $(netmrg_libexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(netmrg_libexecdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_libexecdir)" @echo " INST $(netmrg_libexec_SCRIPTS)" @list='$(netmrg_libexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ $(netmrg_libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_libexecdir)/$$f"; \ else :; fi; \ done install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @echo " INST $(bin_SCRIPTS)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done install-netmrg_share_imagesDATA: $(netmrg_share_images_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_imagesdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_imagesdir)" @echo " INST $(netmrg_share_images_DATA)" @list='$(netmrg_share_images_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_imagesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_imagesdir)/$$f"; \ done install-netmrg_share_dbDATA: $(netmrg_share_db_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_dbdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_dbdir)" @echo " INST $(netmrg_share_db_DATA)" @list='$(netmrg_share_db_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_dbDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_dbdir)/$$f"; \ done install-netmrg_share_bindstatsDATA: $(netmrg_share_bindstats_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_bindstatsdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_bindstatsdir)" @echo " INST $(netmrg_share_bindstats_DATA)" @list='$(netmrg_share_bindstats_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_bindstatsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_bindstatsdir)/$$f"; \ done install-netmrg_share_docDATA: $(netmrg_share_doc_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_docdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_docdir)" @echo " INST $(netmrg_share_doc_DATA)" @list='$(netmrg_share_doc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_docdir)/$$f"; \ done install-netmrg_share_htmlDATA: $(netmrg_share_html_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_htmldir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_htmldir)" @echo " INST $(netmrg_share_html_DATA)" @list='$(netmrg_share_html_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_htmldir)/$$f"; \ done install-netmrg_man1DATA: $(netmrg_man1_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_man1dir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_man1dir)" @echo " INST $(netmrg_man1_DATA)" @list='$(netmrg_man1_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_man1DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_man1dir)/$$f"; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/INSTALL0000664000076400007640000000641511000015417014141 0ustar silfreedsilfreed Chapter 5. Installation Procedure 1. Untar to some directory like /tmp/ (it will untar into a 'netmrg' directory) cd /tmp wget http://www.netmrg.net/download/release/netmrg.tar.gz tar xzvf netmrg.tar.gz 2. Now we need to compile and install the source. cd into the directory made by your tar command and type the following: ./configure make make install Note: If configure fails to locate the needed libraries they can be manually specified. Run ./configure --help for details on the necessary options. 3. Setup the database Now we need to setup the database. Please change at least the password (netmrgpass below). mysqladmin create netmrg mysql -u root -p netmrg < share/netmrg.mysql mysql -u root -p > grant all on netmrg.* to netmrguser@localhost identified by 'netmrgpass'; 4. You need to modify your apache config in order to make your NetMRG installation live (commonly in /etc/httpd/conf/httpd.conf). The first is to alias /netmrg to the installed web directory (commonly /usr/local/var/www/netmrg/webfiles). Alias /netmrg "/usr/local/var/www/netmrg/webfiles" The easier way (if you're running Apache >= 1.3) is to just Include the conf file we've created anywhere in your file (near the bottom is fine). Include /usr/local/etc/netmrg.conf You will need to restart your Apache after making config changes. Telling it to reload its config should be good enough killall -HUP httpd 5. Configure the Installation All of NetMRG's common configuration options are controlled by an XML file, normally located at /usr/local/etc/netmrg.xml. You should edit this file to make any necessary changes before continuing with installation. For most installations, you will at least need to edit netmrg.xml to reflect your database username and password. 6. Setup Permissions NetMRG does not need superuser permissions to run, therefore we will setup a user for it. # useradd netmrg # chown netmrg:netmrg /usr/local/var/log/netmrg # chown netmrg:netmrg /usr/local/var/lib/netmrg/rrd 7. Setup crontab You can setup the crontab entries in two places: either edit /etc/crontab, or run crontab -e as the netmrg user. For 'crontab -e', use an entry similar to this: */5 * * * * bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" To edit the master crontab, edit /etc/crontab and add a line similar to this: */5 * * * * netmrg bash -c "if [ -f /usr/local/var/lock/subsys/netmrg ]; then /usr/local/bin/netmrg-gatherer; fi" 8. Point your web browser at your install, and start graphing things! The default login is admin and the default password is nimda. Point your web browser at the host you built this on (something similar to http://yourhost.com/netmrg/) and please change your password! References Visible links . file:///home/silfreed/src/netmrg/share/doc/txt/index.html . file:///home/silfreed/src/netmrg/share/doc/txt/installation.html . file:///home/silfreed/src/netmrg/share/doc/txt/satisfyreq.html . file:///home/silfreed/src/netmrg/share/doc/txt/upgrade.html netmrg-0.20/missing0000775000076400007640000002403607702667001014526 0ustar silfreedsilfreed#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 netmrg-0.20/Makefile.am0000664000076400007640000001237510332674616015171 0ustar silfreedsilfreed@SET_MAKE@ include $(top_srcdir)/Make.inc SUBDIRS = m4 po src www etc var . ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = config.rpath ABOUT-NLS install : all install-recursive # options to install files in the libexec directory netmrg_libexecdir=$(libexecdir)/$(PACKAGE) netmrg_libexec_SCRIPTS = libexec/*.php libexec/*.pl # options to install files in the bin directory bin_SCRIPTS = bin/rrdedit # options to install files in the share/images directory netmrg_share_imagesdir=$(pkgdatadir)/images netmrg_share_images_DATA = share/images/default/*.svg # options to install files in the share/db directory netmrg_share_dbdir=$(pkgdatadir)/db netmrg_share_db_DATA = share/netmrg.mysql # options to install files in the share/contrib directory netmrg_share_bindstatsdir=$(pkgdatadir)/contrib/bindstats netmrg_share_bindstats_DATA = contrib/bindstats/dnsstats* # options to install files in the share/doc directory netmrg_share_docdir=$(datadir)/doc/$(PACKAGE)-$(VERSION) netmrg_share_doc_DATA = INSTALL README share/doc/*.sgml share/doc/ChangeLog share/doc/LICENSE share/doc/TODO share/doc/txt/netmrg.txt share/doc/txt/INSTALL share/doc/txt/RELEASE-NOTES share/doc/txt/UPGRADE etc/cron.d-netmrg etc/init.d-netmrg # html documentation netmrg_share_htmldir=$(datadir)/doc/$(PACKAGE)-$(VERSION)/html netmrg_share_html_DATA = share/doc/html/*.html # man1 pages netmrg_man1dir=$(mandir)/man1 netmrg_man1_DATA = share/doc/man/man1/*.1 # options to install files in the var/log directory netmrg_var_logdir=$(localstatedir)/log/$(PACKAGE) netmrg_var_log_DATA = distclean: distclean-recursive @echo " RM $(am__CONFIG_DISTCLEAN_FILES)" @rm -f $(am__CONFIG_DISTCLEAN_FILES) @echo " RM Makefile" @rm -f Makefile install-netmrg_libexecSCRIPTS: $(netmrg_libexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(netmrg_libexecdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_libexecdir)" @echo " INST $(netmrg_libexec_SCRIPTS)" @list='$(netmrg_libexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ $(netmrg_libexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_libexecdir)/$$f"; \ else :; fi; \ done install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @echo " INST $(bin_SCRIPTS)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done install-netmrg_share_imagesDATA: $(netmrg_share_images_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_imagesdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_imagesdir)" @echo " INST $(netmrg_share_images_DATA)" @list='$(netmrg_share_images_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_imagesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_imagesdir)/$$f"; \ done install-netmrg_share_dbDATA: $(netmrg_share_db_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_dbdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_dbdir)" @echo " INST $(netmrg_share_db_DATA)" @list='$(netmrg_share_db_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_dbDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_dbdir)/$$f"; \ done install-netmrg_share_bindstatsDATA: $(netmrg_share_bindstats_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_bindstatsdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_bindstatsdir)" @echo " INST $(netmrg_share_bindstats_DATA)" @list='$(netmrg_share_bindstats_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_bindstatsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_bindstatsdir)/$$f"; \ done install-netmrg_share_docDATA: $(netmrg_share_doc_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_docdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_docdir)" @echo " INST $(netmrg_share_doc_DATA)" @list='$(netmrg_share_doc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_docdir)/$$f"; \ done install-netmrg_share_htmlDATA: $(netmrg_share_html_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_share_htmldir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_share_htmldir)" @echo " INST $(netmrg_share_html_DATA)" @list='$(netmrg_share_html_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_share_htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_share_htmldir)/$$f"; \ done install-netmrg_man1DATA: $(netmrg_man1_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_man1dir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_man1dir)" @echo " INST $(netmrg_man1_DATA)" @list='$(netmrg_man1_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ $(netmrg_man1DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_man1dir)/$$f"; \ done netmrg-0.20/ABOUT-NLS0000664000076400007640000015111610157157500014352 0ustar silfreedsilfreedNotes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. Quick configuration advice ========================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. INSTALL Matters =============== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the GNU `gettext' own library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will respectively bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your country by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Translating Teams ================= For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of January 2004. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | () | ant-phone | () | anubis | | ap-utils | | aspell | [] | bash | [] [] [] [] | batchelor | | bfd | [] [] | binutils | [] [] | bison | [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | [] [] [] | darkstat | [] () [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] [] | error | [] [] [] [] [] | fetchmail | [] () [] [] [] [] | fileutils | [] [] [] | findutils | [] [] [] [] [] [] [] | flex | [] [] [] [] | fslint | | gas | [] | gawk | [] [] [] [] | gbiff | [] | gcal | [] | gcc | [] [] | gettext | [] [] [] [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] [] [] [] | gliv | | glunarclock | [] [] | gnubiff | [] | gnucash | [] () [] [] | gnucash-glossary | [] () [] | gnupg | [] () [] [] [] [] | gpe-aerial | [] | gpe-beam | [] [] | gpe-calendar | [] [] | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] | gpsdrive | () () () | gramadoir | [] | grep | [] [] [] [] [] [] | gretl | [] | gtick | [] () | hello | [] [] [] [] [] [] | id-utils | [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] | iso_639 | | jpilot | [] [] [] | jtag | | jwhois | [] | kbd | [] [] [] [] [] | latrine | () | ld | [] [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] | libiconv | [] [] [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lingoteach_lessons | () () | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] | man-db | [] () [] [] () | minicom | [] [] [] | mysecretdiary | [] [] [] | nano | [] () [] [] [] | nano_1_0 | [] () [] [] [] | opcodes | [] | parted | [] [] [] [] [] | ptx | [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] [] [] [] | sed | [] [] [] [] [] [] | sh-utils | [] [] [] | shared-mime-info | | sharutils | [] [] [] [] [] [] | silky | () | skencil | [] () [] | sketch | [] () [] | soundtracker | [] [] [] | sp | [] | tar | [] [] [] [] | texinfo | [] [] [] | textutils | [] [] [] [] | tin | () () | tp-robot | | tuxpaint | [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] [] | vorbis-tools | [] [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] [] [] [] | xchat | [] [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] | +----------------------------------------------------+ af am ar az be bg bs ca cs da de el en en_GB eo es 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 et eu fa fi fr ga gl he hr hu id is it ja ko lg +-------------------------------------------------+ a2ps | [] [] [] () () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] | aspell | [] [] | bash | [] [] | batchelor | [] [] | bfd | [] | binutils | [] [] | bison | [] [] [] [] | bluez-pin | [] [] [] [] [] | clisp | | clisp | [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] [] | darkstat | () [] [] [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | | enscript | [] [] | error | [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] [] [] [] | flex | [] [] [] | fslint | [] | gas | [] | gawk | [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext | [] [] [] | gettext-examples | [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] | gliv | () | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | () [] | gnucash-glossary | [] | gnupg | [] [] [] [] [] [] [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] [] [] | gpe-clock | [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] | gpe-sketchbook | [] | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] [] [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] | gprof | [] [] | gpsdrive | () () () | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] | gretl | [] [] | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | | iso_4217 | [] [] [] [] [] [] | iso_639 | | jpilot | [] () | jtag | [] | jwhois | [] [] [] [] | kbd | [] | latrine | [] | ld | [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] [] [] | libiconv | [] [] [] [] [] [] [] [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] | lingoteach_lessons | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | | make | [] [] [] [] [] [] | man-db | () () | minicom | [] [] [] [] | mysecretdiary | [] [] | nano | [] [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] | sed | [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] | shared-mime-info | [] [] [] | sharutils | [] [] [] [] [] | silky | () [] () () | skencil | [] | sketch | [] | soundtracker | [] [] | sp | [] () | tar | [] [] [] [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] [] [] [] | tin | [] () | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] () [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-------------------------------------------------+ et eu fa fi fr ga gl he hr hu id is it ja ko lg 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru +-----------------------------------------------------+ a2ps | [] [] () () [] [] [] | aegis | () () () | ant-phone | [] [] | anubis | [] [] [] [] [] [] | ap-utils | [] () [] | aspell | [] | bash | [] [] [] | batchelor | [] | bfd | [] | binutils | [] | bison | [] [] [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] | console-tools | [] | coreutils | [] [] | cpio | [] [] [] [] [] | darkstat | [] [] [] [] | diffutils | [] [] [] [] [] [] | e2fsprogs | [] | enscript | [] [] [] [] | error | [] [] [] | fetchmail | [] [] () [] | fileutils | [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] | fslint | [] [] | gas | | gawk | [] [] [] | gbiff | [] [] | gcal | | gcc | | gettext | [] [] [] | gettext-examples | [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] | gimp-print | [] | gliv | [] [] [] | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | [] [] () [] | gnucash-glossary | [] [] | gnupg | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] [] | gpe-ownerinfo | [] [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] | gprof | [] [] | gpsdrive | () () [] | gramadoir | () [] | grep | [] [] [] [] [] | gretl | | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] | iso_3166_1 | [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] | jpilot | () () | jtag | | jwhois | [] [] [] [] () | kbd | [] [] [] | latrine | [] | ld | | libc | [] [] [] [] | libgpewidget | [] [] [] | libiconv | [] [] [] [] [] | lifelines | | lilypond | | lingoteach | | lingoteach_lessons | | lynx | [] [] [] | m4 | [] [] [] [] [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] | minicom | [] [] [] [] | mysecretdiary | [] [] [] | nano | [] [] [] [] [] | nano_1_0 | [] [] [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | ptx | [] [] [] [] [] [] [] [] | python | | radius | [] [] | recode | [] [] [] [] | rpm | [] [] [] | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] | sh-utils | [] [] | shared-mime-info | [] [] | sharutils | [] [] | silky | () | skencil | [] [] | sketch | [] [] | soundtracker | | sp | | tar | [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] | tin | | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] | vorbis-tools | [] [] [] | wastesedge | | wdiff | [] [] [] [] [] | wget | [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-----------------------------------------------------+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu +-----------------------------------------------------+ a2ps | [] [] [] [] | 16 aegis | | 0 ant-phone | | 3 anubis | [] [] | 9 ap-utils | () | 3 aspell | | 4 bash | | 9 batchelor | | 3 bfd | [] [] | 6 binutils | [] [] [] | 8 bison | [] [] | 14 bluez-pin | [] [] [] | 14 clisp | | 0 clisp | | 5 console-tools | | 3 coreutils | [] [] [] [] | 16 cpio | [] [] | 14 darkstat | [] [] [] () () | 12 diffutils | [] [] [] | 23 e2fsprogs | [] [] | 6 enscript | [] [] | 12 error | [] [] [] | 15 fetchmail | [] [] | 11 fileutils | [] [] [] [] [] | 17 findutils | [] [] [] [] [] [] | 29 flex | [] [] | 13 fslint | | 3 gas | [] | 3 gawk | [] [] | 12 gbiff | | 4 gcal | [] [] | 4 gcc | [] | 4 gettext | [] [] [] [] [] | 16 gettext-examples | [] [] [] [] [] | 14 gettext-runtime | [] [] [] [] [] [] [] [] | 22 gettext-tools | [] [] [] [] [] [] | 14 gimp-print | [] [] | 10 gliv | | 3 glunarclock | [] [] [] | 13 gnubiff | | 3 gnucash | [] [] | 9 gnucash-glossary | [] [] [] | 8 gnupg | [] [] [] [] | 17 gpe-aerial | [] | 7 gpe-beam | [] | 8 gpe-calendar | [] [] [] [] | 13 gpe-clock | [] [] [] | 10 gpe-conf | [] [] | 9 gpe-contacts | [] [] [] | 11 gpe-edit | [] [] [] [] [] | 12 gpe-go | | 5 gpe-login | [] [] [] [] [] | 13 gpe-ownerinfo | [] [] [] [] | 13 gpe-sketchbook | [] [] | 9 gpe-su | [] [] [] | 10 gpe-taskmanager | [] [] [] | 10 gpe-timesheet | [] [] [] [] | 12 gpe-today | [] [] [] [] [] | 13 gpe-todo | [] [] [] [] | 12 gphoto2 | [] [] [] | 11 gprof | [] [] | 9 gpsdrive | [] [] | 3 gramadoir | [] | 5 grep | [] [] [] [] | 26 gretl | | 3 gtick | | 7 hello | [] [] [] [] [] | 34 id-utils | [] [] | 12 indent | [] [] [] [] | 21 iso_3166 | [] [] [] [] [] [] [] | 27 iso_3166_1 | [] [] [] | 16 iso_3166_2 | | 0 iso_3166_3 | | 2 iso_4217 | [] [] [] [] [] [] | 24 iso_639 | | 1 jpilot | [] [] [] [] [] | 9 jtag | [] | 2 jwhois | () [] [] | 11 kbd | [] [] | 11 latrine | | 2 ld | [] [] | 5 libc | [] [] [] [] | 20 libgpewidget | [] [] [] [] | 13 libiconv | [] [] [] [] [] [] [] [] | 27 lifelines | [] | 2 lilypond | [] | 3 lingoteach | | 2 lingoteach_lessons | () | 0 lynx | [] [] [] | 14 m4 | [] [] | 15 mailutils | | 5 make | [] [] [] | 16 man-db | [] | 5 minicom | | 11 mysecretdiary | [] [] | 10 nano | [] [] [] [] | 17 nano_1_0 | [] [] [] | 17 opcodes | [] [] | 6 parted | [] [] [] | 15 ptx | [] [] | 22 python | | 0 radius | | 4 recode | [] [] [] | 20 rpm | [] [] | 9 screem | [] [] | 2 scrollkeeper | [] [] [] | 15 sed | [] [] [] [] [] [] | 24 sh-utils | [] [] | 14 shared-mime-info | [] [] | 7 sharutils | [] [] [] [] | 17 silky | () | 3 skencil | [] | 6 sketch | [] | 6 soundtracker | [] [] | 7 sp | [] | 3 tar | [] [] [] [] [] | 24 texinfo | [] [] [] | 14 textutils | [] [] [] [] | 16 tin | | 1 tp-robot | | 2 tuxpaint | [] [] [] [] [] | 29 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] | 15 vorbis-tools | | 8 wastesedge | | 0 wdiff | [] [] [] | 18 wget | [] [] [] [] [] [] [] [] | 24 xchat | [] [] [] [] [] | 15 xfree86_xkb_xml | [] [] [] [] [] | 11 xpad | | 5 +-----------------------------------------------------+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If January 2004 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Using `gettext' in new packages =============================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. netmrg-0.20/config.rpath0000775000076400007640000003521310157157500015432 0ustar silfreedsilfreed#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2003 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $CC in icc|ecc) wl='-Wl,' ;; ccc) wl='-Wl,' ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then hardcode_direct=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10* | hpux11*) if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4.2uw2*) hardcode_direct=yes hardcode_minus_L=no ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ;; sysv5*) hardcode_libdir_flag_spec= ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi4*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; freebsd*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case "$host_cpu" in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; netbsd*) ;; newsos6) ;; nto-qnx) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; sco3.2v5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ;; sysv4*MP*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' </dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi 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; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am @SET_MAKE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/var/Makefile.am0000664000076400007640000000007210135656170015744 0ustar silfreedsilfreed@SET_MAKE@ include $(top_srcdir)/Make.inc SUBDIRS = lib netmrg-0.20/var/log/0000775000076400007640000000000011000016355014455 5ustar silfreedsilfreednetmrg-0.20/var/log/placeholder0000664000076400007640000000000007564550646016702 0ustar silfreedsilfreednetmrg-0.20/var/lib/0000775000076400007640000000000011000016360014436 5ustar silfreedsilfreednetmrg-0.20/var/lib/rrd/0000775000076400007640000000000011000016361015226 5ustar silfreedsilfreednetmrg-0.20/var/lib/rrd/Makefile.in0000664000076400007640000002514211000016361017277 0ustar silfreedsilfreed# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # These settings are pulled into Makefile.in by automake VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Make.inc subdir = var/lib/rrd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(netmrg_var_libdir)" netmrg_var_libDATA_INSTALL = $(INSTALL_DATA) DATA = $(netmrg_var_lib_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RRDTOOL = @RRDTOOL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WWWDIR = @WWWDIR@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_MAKEFLAGS = \ ` test "$(VERBOSE)" = "1" && echo $(ECHO_N) "" \ || echo $(ECHO_N) "-s" ` SUFFIXES = .rrd RRDS = zero.rrd # options to install files in the var/lib directory netmrg_var_libdir = $(localstatedir)/lib/$(PACKAGE)/rrd netmrg_var_lib_DATA = $(RRDS) all: all-am .SUFFIXES: .SUFFIXES: .rrd $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Make.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign var/lib/rrd/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign var/lib/rrd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-netmrg_var_libDATA: @$(NORMAL_UNINSTALL) @list='$(netmrg_var_lib_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(netmrg_var_libdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_var_libdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(netmrg_var_libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-netmrg_var_libDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-netmrg_var_libDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-netmrg_var_libDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-netmrg_var_libDATA @SET_MAKE@ $(RRDS) : @echo " RRD $@" @$(RRDTOOL) create zero.rrd DS:mon_25:GAUGE:600:U:U RRA:AVERAGE:0:1:1 RRA:LAST:0:1:1 RRA:MAX:0:1:1 clean : clean-am clean-rrd distclean-am: clean-am clean-rrd distclean-generic clean-rrd : @echo " RM $(netmrg_var_lib_DATA)" @rm -f $(netmrg_var_lib_DATA) install-netmrg_var_libDATA: $(netmrg_var_lib_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_var_libdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_var_libdir)" @list='$(netmrg_var_lib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " INST $$d$$p"; \ $(netmrg_var_libDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_var_libdir)/$$f"; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/var/lib/rrd/Makefile.am0000664000076400007640000000164410332674616017313 0ustar silfreedsilfreed@SET_MAKE@ include $(top_srcdir)/Make.inc SUFFIXES = .rrd RRDS = zero.rrd # options to install files in the var/lib directory netmrg_var_libdir=$(localstatedir)/lib/$(PACKAGE)/rrd netmrg_var_lib_DATA = $(RRDS) $(RRDS) : @echo " RRD $@" @$(RRDTOOL) create zero.rrd DS:mon_25:GAUGE:600:U:U RRA:AVERAGE:0:1:1 RRA:LAST:0:1:1 RRA:MAX:0:1:1 clean : clean-am clean-rrd distclean-am: clean-am clean-rrd distclean-generic clean-rrd : @echo " RM $(netmrg_var_lib_DATA)" @rm -f $(netmrg_var_lib_DATA) install-netmrg_var_libDATA: $(netmrg_var_lib_DATA) @$(NORMAL_INSTALL) test -z "$(netmrg_var_libdir)" || $(mkdir_p) "$(DESTDIR)$(netmrg_var_libdir)" @list='$(netmrg_var_lib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " INST $$d$$p"; \ $(netmrg_var_libDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(netmrg_var_libdir)/$$f"; \ done netmrg-0.20/var/lib/Makefile.in0000664000076400007640000003463111000016360016512 0ustar silfreedsilfreed# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # These settings are pulled into Makefile.in by automake VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Make.inc subdir = var/lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RRDTOOL = @RRDTOOL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WWWDIR = @WWWDIR@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_MAKEFLAGS = \ ` test "$(VERBOSE)" = "1" && echo $(ECHO_N) "" \ || echo $(ECHO_N) "-s" ` SUBDIRS = rrd all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Make.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign var/lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign var/lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 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; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi 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; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am @SET_MAKE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/var/lib/Makefile.am0000664000076400007640000000007210135656170016512 0ustar silfreedsilfreed@SET_MAKE@ include $(top_srcdir)/Make.inc SUBDIRS = rrd netmrg-0.20/Make.inc0000664000076400007640000000023110135656247014472 0ustar silfreedsilfreed # These settings are pulled into Makefile.in by automake AM_MAKEFLAGS = \ ` test "$(VERBOSE)" = "1" && echo $(ECHO_N) "" \ || echo $(ECHO_N) "-s" ` netmrg-0.20/po/0000775000076400007640000000000011000016355013522 5ustar silfreedsilfreednetmrg-0.20/po/en@boldquot.header0000664000076400007640000000247110157157500017166 0ustar silfreedsilfreed# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # netmrg-0.20/po/Makevars0000664000076400007640000000353510157157500015236 0ustar silfreedsilfreed# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. localedir = $(datadir)/$(PACKAGE)/locale # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = NetMRG Development Team # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = Devel Forum at http://lists.netmrg.net # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = netmrg-0.20/po/LINGUAS0000664000076400007640000000002610157157500014557 0ustar silfreedsilfreed# Available languages netmrg-0.20/po/en@quot.header0000664000076400007640000000226310157157500016324 0ustar silfreedsilfreed# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # netmrg-0.20/po/boldquot.sed0000664000076400007640000000033110157157500016057 0ustar silfreedsilfreeds/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g s/“/“/g s/â€/â€/g s/‘/‘/g s/’/’/g netmrg-0.20/po/Rules-quot0000664000076400007640000000337610157157500015550 0ustar silfreedsilfreed# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header netmrg-0.20/po/remove-potcdate.sin0000664000076400007640000000066010157157500017347 0ustar silfreedsilfreed# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } netmrg-0.20/po/quot.sed0000664000076400007640000000023110157157500015215 0ustar silfreedsilfreeds/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g netmrg-0.20/po/netmrg.pot0000664000076400007640000000213210157161710015550 0ustar silfreedsilfreed# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR NetMRG Development Team # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: Devel Forum at http://lists.netmrg.net\n" "POT-Creation-Date: 2004-12-12 19:29-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/settings.cpp:117 msgid "Parsing config section" msgstr "" #: src/settings.cpp:190 msgid "Second stage parser not aware of this section." msgstr "" #: src/settings.cpp:205 msgid "Failed to parse configuration file" msgstr "" #: src/settings.cpp:213 msgid "Empty configuration file" msgstr "" #: src/settings.cpp:220 msgid "Configuration file of the wrong type. Root node is not 'netmrg.'" msgstr "" #: src/settings.cpp:265 msgid "Unexpected section in configuration file: " msgstr "" netmrg-0.20/po/Makefile.in.in0000664000076400007640000003022510772570211016211 0ustar silfreedsilfreed# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.14 PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: all-@USE_NLS@ all-yes: stamp-po all-no: # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @echo "touch stamp-po" @echo timestamp > stamp-poT @mv stamp-poT stamp-po # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkinstalldirs) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkinstalldirs) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in stamp-po POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir); \ else \ cp -p $(srcdir)/$$file $(distdir); \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/po/POTFILES.in0000664000076400007640000000254010157162023015306 0ustar silfreedsilfreed# List of source files containing translatable strings. # Copyright (C) 2004 NetMRG Development Team # C++ files src/db.cpp src/devices.cpp src/events.cpp src/locks.cpp src/mappings.cpp src/monitors.cpp src/netmrg.cpp src/rrd.cpp src/settings.cpp src/snmp.cpp src/utils.cpp # PHP files www/lib/auth.php www/lib/database.php www/lib/format.php www/lib/graphing.php www/lib/misc.php www/lib/phptimer.php www/lib/processing.php www/lib/static.php www/lib/xml_to_array.php www/webfiles/about.php www/webfiles/color_dialog.php www/webfiles/conditions.php www/webfiles/contributors.php www/webfiles/devices.php www/webfiles/device_tree.php www/webfiles/dev_types.php www/webfiles/enclose_graph.php www/webfiles/error.php www/webfiles/event_log.php www/webfiles/events.php www/webfiles/get_graph.php www/webfiles/graph_items.php www/webfiles/graphs.php www/webfiles/groups.php www/webfiles/grpdev_list.php www/webfiles/index.php www/webfiles/login.php www/webfiles/logout.php www/webfiles/monitors.php www/webfiles/notifications.php www/webfiles/recache.php www/webfiles/responses.php www/webfiles/snmp_cache_view.php www/webfiles/sub_devices.php www/webfiles/sub_dev_param.php www/webfiles/tests_script.php www/webfiles/tests_snmp.php www/webfiles/tests_sql.php www/webfiles/updater.php www/webfiles/user_prefs.php www/webfiles/users.php www/webfiles/view.php netmrg-0.20/po/insert-header.sin0000664000076400007640000000124010157157500016776 0ustar silfreedsilfreed# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } netmrg-0.20/bin/0000775000076400007640000000000011000016355013654 5ustar silfreedsilfreednetmrg-0.20/bin/makedist0000775000076400007640000000140610367731540015423 0ustar silfreedsilfreed#!/bin/sh # # makedist # # gets the latest vcs tree and tars it up as $version # progname="netmrg" version=`cat share/doc/VERSION` vcsver=`echo $version | sed -e 's/\./_/g'` this="$progname-$version" pkgdir="/tmp" rm -rf $pkgdir/$this/ rm -f $pkgdir/$this.tar.* #svn export -q http://svn.$progname.net/branches/$progname-$vcsver $pkgdir/$this svn export -q http://svn.$progname.net/trunk $pkgdir/$this cd $pkgdir/$this ./bootstrap > /dev/null 2>&1 rm -rf autom4te.cache/ cd - tar -C $pkgdir -czf $pkgdir/$this.tar.gz $this tar -C $pkgdir -cjf $pkgdir/$this.tar.bz2 $this cd $pkgdir md5sum $this.tar.gz > $this.tar.gz.md5sum md5sum $this.tar.bz2 > $this.tar.bz2.md5sum sha1sum $this.tar.gz > $this.tar.gz.sha1sum sha1sum $this.tar.bz2 > $this.tar.bz2.sha1sum cd - netmrg-0.20/bin/rrdedit.in0000775000076400007640000000125210060212221015637 0ustar silfreedsilfreed#!/bin/sh # Given a .rrd filename, edit it with vi and restore the .rrd after # finished editing # # Written by Ian Berry, idea taken from Brady Alleman # Re-modified for NetMRG prefix="@prefix@" localstatedir="@localstatedir@" rrdtool="@RRDTOOL@" editor="vi" RRD_DIR="$localstatedir/lib/netmrg/rrd" if [ ! -n "$1" ] then echo "Usage rrdedit [RRD_FILENAME]" exit fi if [ ! -f "$RRD_DIR/$1" ] then echo "Cannot locate file: '$RRD_DIR/$1'!" exit fi # dump it to temp $rrdtool dump $RRD_DIR/$1 > /tmp/$1.xml # make a backup cp $RRD_DIR/$1 /tmp/$1.backup # edit the xml $editor /tmp/$1.xml rm -f $RRD_DIR/$1 # restore the rrd $rrdtool restore /tmp/$1.xml $RRD_DIR/$1 netmrg-0.20/bin/makedocs0000775000076400007640000000271611000015417015374 0ustar silfreedsilfreed#!/bin/sh # # makedocs # # makes docs and puts them in our doc dir # and in the root dir for text files # #HTML echo "Building HTML docs" rm -f share/doc/html/*.html docbook2html -d share/doc/netmrg.dsl#html -o share/doc/html share/doc/netmrg.sgml find share/doc/html -name \*.html -exec tidy -indent -asxhtml -quiet -modify {} \; cp share/doc/netmrg-logo-medium.png share/doc/html/ cp share/doc/netmrg-logo-small.png share/doc/html/ cp share/doc/netmrgdoc.css share/doc/html/ echo #MAN echo "Building MAN pages" rm -f share/doc/man/man1/*.1 docbook2man -d share/doc/netmrg.dsl#print -o share/doc/man share/doc/netmrg.sgml mv share/doc/man/*.1 share/doc/man/man1 find share/doc/man -maxdepth 1 -type f -exec rm -f {} \; echo #TXT echo "Building TXT files" docbook2html -d share/doc/netmrg.dsl#html2txt -o share/doc/txt share/doc/netmrg.sgml txtfiles="install.html revisions.html upgrade.html" for i in $txtfiles ; do links -dump -no-numbering share/doc/txt/$i | grep -v ' Link:' > share/doc/txt/$i.txt done rm -f share/doc/txt/*.html mv share/doc/txt/install.html.txt share/doc/txt/INSTALL cp share/doc/txt/INSTALL INSTALL mv share/doc/txt/revisions.html.txt share/doc/txt/RELEASE-NOTES cp share/doc/txt/RELEASE-NOTES RELEASE-NOTES mv share/doc/txt/upgrade.html.txt share/doc/txt/UPGRADE cp share/doc/txt/UPGRADE UPGRADE echo #README echo "Building README" docbook2txt -d share/doc/netmrg.dsl#html -o share/doc/txt share/doc/netmrg.sgml cp share/doc/txt/netmrg.txt README echo netmrg-0.20/bin/makesvnsnap0000775000076400007640000000054010210415741016133 0ustar silfreedsilfreed#!/bin/sh # # makecvssnap # # gets the latest cvs tree and tars it up as $date # progname="netmrg" version=`date +'%Y.%m.%d'` this="$progname-$version" tmpdir="/tmp" pkgdir="/tmp" rm -rf $tmpdir/$this rm -f $this.tar.gz svn export -q http://svn.$progname.net/trunk $tmpdir/$this tar -C $tmpdir -czf $pkgdir/$this.tar.gz $this rm -rf $tmpdir/$this netmrg-0.20/src/0000775000076400007640000000000011000016360013667 5ustar silfreedsilfreednetmrg-0.20/src/rrd.cpp0000664000076400007640000001047610522722116015205 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * rrd.cpp * NetMRG Gatherer RRDTOOL integration * * see doc/LICENSE for copyright information ********************************************/ #include #include "common.h" #include "rrd.h" #include "utils.h" #include "locks.h" #include "settings.h" // RRDTOOL Pipe FILE *rrdtool_pipe; void rrd_init() { debuglogger(DEBUG_GLOBAL + DEBUG_RRD, LEVEL_INFO, NULL, "Initializing RRDTOOL pipe."); string rrdtool = get_setting(setPathRRDTOOL) + " - "; if (!(get_debug_components() & DEBUG_RRD) || !(get_debug_level() & LEVEL_DEBUG)) rrdtool = rrdtool + " >/dev/null"; rrdtool_pipe = popen(rrdtool.c_str(), "w"); if (!rrdtool_pipe) { debuglogger(DEBUG_GLOBAL + DEBUG_RRD, LEVEL_CRITICAL, NULL, "Failed to initialize RRDTOOL pipe."); exit(3); } // sets buffering to one line setlinebuf(rrdtool_pipe); } void rrd_cleanup() { if (rrdtool_pipe) { pclose(rrdtool_pipe); debuglogger(DEBUG_GLOBAL + DEBUG_RRD, LEVEL_INFO, NULL, "Closed RRDTOOL pipe."); } else { debuglogger(DEBUG_GLOBAL, LEVEL_ERROR, NULL, "Tried to close RRDTOOL pipe before opening it."); } } // rrd_cmd // // issues a command to RRDTOOL via the RRDTOOL pipe, and logs it void rrd_cmd(DeviceInfo info, string cmd) { debuglogger(DEBUG_RRD, LEVEL_DEBUG, &info, "RRD: '" + cmd + "'"); cmd = " " + cmd + "\n"; netmrg_mutex_lock(lkRRD); fprintf(rrdtool_pipe, cmd.c_str()); netmrg_mutex_unlock(lkRRD); } // get_rrd_file // // returns the name of the rrd file in use for a given monitor string get_rrd_file(string mon_id) { string filename = get_setting(setPathRRDs) + "/mon_" + mon_id + ".rrd"; return filename; } // create_rrd // // creates a new RRD file void create_rrd(DeviceInfo info, RRDInfo rrd) { string command; int poll_interval = get_setting_int(setPollInterval); command = "create " + get_rrd_file(inttostr(info.monitor_id)) + " --step " + inttostr(poll_interval) + " DS:mon_" + inttostr(info.monitor_id) + ":" + rrd.data_type + ":" + inttostr(poll_interval * 2) + ":" + rrd.min_val + ":" + rrd.max_val + " " + /* Step: Interval; Capacity: 50 hours */ "RRA:AVERAGE:0.5:1:" + inttostr(180000 / poll_interval) + " " + /* Step: 30 mins; Capacity: 350 hours */ "RRA:AVERAGE:0.5:" + inttostr(1800 / poll_interval) + ":700 " + /* Step: 2 hours; Capacity: 1550 hours */ "RRA:AVERAGE:0.5:" + inttostr(7200 / poll_interval) + ":775 " + /* Step: 1 day; Capacity: 19128 hours */ "RRA:AVERAGE:0.5:" + inttostr(86400 / poll_interval) + ":797 " + "RRA:LAST:0.5:1:" + inttostr(180000 / poll_interval) + " " + "RRA:LAST:0.5:" + inttostr(1800 / poll_interval) + ":700 " + "RRA:LAST:0.5:" + inttostr(7200 / poll_interval) + ":775 " + "RRA:LAST:0.5:" + inttostr(86400 / poll_interval) + ":797 " + "RRA:MAX:0.5:1:" + inttostr(180000 / poll_interval) + " " + "RRA:MAX:0.5:" + inttostr(1800 / poll_interval) + ":700 " + "RRA:MAX:0.5:" + inttostr(7200 / poll_interval) + ":775 " + "RRA:MAX:0.5:" + inttostr(86400 / poll_interval) + ":797" ; rrd_cmd(info, command); } // tune_rrd // // modifies the maximum and minimum values acceptable for a given RRD void tune_rrd(DeviceInfo info, RRDInfo rrd) { string command = "tune " + get_rrd_file(inttostr(info.monitor_id)) + " -a mon_" + inttostr(info.monitor_id) + ":" + rrd.max_val + " -i mon_" + inttostr(info.monitor_id) + ":" + rrd.min_val; rrd_cmd(info, command); } // update_rrd // // update an RRD with a current value void update_rrd(DeviceInfo info, RRDInfo rrd) { string command = "update " + get_rrd_file(inttostr(info.monitor_id)) + " N:" + strstripnl(info.curr_val); rrd_cmd(info, command); } // update_monitor_rrd // // for a monitor: // 1. Create a RRD file if one doesn't exist. // 2. Tune the RRD file if necessary. // 3. Update the RRD file with current data, or an unknown if we need to do that void update_monitor_rrd(DeviceInfo info, RRDInfo rrd) { if (!(file_exists(get_rrd_file(inttostr(info.monitor_id))))) { create_rrd(info, rrd); } if (rrd.tuned == 0) { tune_rrd(info, rrd); } if ( (rrd.data_type != "GAUGE") && (info.counter_unknowns == 1) ) { debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Writing unknown to non-gauge RRD due to restart condition."); info.curr_val = "U"; } update_rrd(info, rrd); } netmrg-0.20/src/Makefile.in0000664000076400007640000004563111000016360015745 0ustar silfreedsilfreed# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # These settings are pulled into Makefile.in by automake VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/Make.inc bin_PROGRAMS = netmrg-gatherer$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_netmrg_gatherer_OBJECTS = db.$(OBJEXT) devices.$(OBJEXT) \ events.$(OBJEXT) locks.$(OBJEXT) mappings.$(OBJEXT) \ monitors.$(OBJEXT) netmrg.$(OBJEXT) rrd.$(OBJEXT) \ settings.$(OBJEXT) snmp.$(OBJEXT) utils.$(OBJEXT) netmrg_gatherer_OBJECTS = $(am_netmrg_gatherer_OBJECTS) netmrg_gatherer_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(top_builddir)/src/include@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(netmrg_gatherer_SOURCES) DIST_SOURCES = $(netmrg_gatherer_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RRDTOOL = @RRDTOOL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WWWDIR = @WWWDIR@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_MAKEFLAGS = \ ` test "$(VERBOSE)" = "1" && echo $(ECHO_N) "" \ || echo $(ECHO_N) "-s" ` SUBDIRS = . netmrg_gatherer_SOURCES = db.cpp devices.cpp events.cpp locks.cpp mappings.cpp monitors.cpp netmrg.cpp rrd.cpp settings.cpp snmp.cpp utils.cpp noinst_HEADERS = include/common.h include/db.h include/devices.h include/events.h include/locks.h include/mappings.h include/monitors.h include/netmrg.h include/rrd.h include/settings.h include/snmp.h include/types.h include/utils.h INCLUDES = -I./include all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Make.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devices.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mappings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitors.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netmrg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 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; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi 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; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS @SET_MAKE@ .cpp.o: @echo " CXX $@" @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< netmrg-gatherer$(EXEEXT): $(netmrg_gatherer_OBJECTS) $(netmrg_gatherer_DEPENDENCIES) @echo " LINK $@" @rm -f netmrg-gatherer$(EXEEXT) $(CXXLINK) $(netmrg_gatherer_LDFLAGS) $(netmrg_gatherer_OBJECTS) $(netmrg_gatherer_LDADD) $(LIBS) mostlyclean-compile: @echo " RM *.$(OBJEXT)" -rm -f *.$(OBJEXT) clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || ( \ echo " RM $(bin_PROGRAMS)"; \ rm -f $(bin_PROGRAMS) ) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @echo " INST $(bin_PROGRAMS)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/src/monitors.cpp0000664000076400007640000003756710772574472016323 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * monitors.cpp * NetMRG Gatherer Monitors Library * * see doc/LICENSE for copyright information ********************************************/ #include #include #include #include "monitors.h" #include "snmp.h" #include "utils.h" #include "rrd.h" #include "locks.h" #include "events.h" #include "settings.h" #ifdef OLD_MYSQL #define MYSQL_CONNECT(a,b,c,d,e,f,g,h) mysql_connect(a,b,c,d) #else #define MYSQL_CONNECT(a,b,c,d,e,f,g,h) mysql_real_connect(a,b,c,d,e,f,g,h) #endif #ifdef HAVE_LLROUND #define ROUND_VAL llround #else #define ROUND_VAL (uint) #endif string process_internal_monitor(DeviceInfo info, MYSQL *mysql) { string test_result = "U", temp, temp2; float disk_total, disk_used; unsigned int nCPUs, sum; list WinCPUList; switch(info.test_id) { // count lines in a file case 1: test_result = count_file_lines(info); break; // TNT "good" modems (that is, available modems - suspect modems) case 2: test_result = snmp_diff(info, ".1.3.6.1.4.1.529.15.1.0", ".1.3.6.1.4.1.529.15.3.0"); break; // UCD CPU combined load (user + system) case 3: temp = snmp_get(info, ".1.3.6.1.4.1.2021.11.9.0"); temp2 = snmp_get(info, ".1.3.6.1.4.1.2021.11.10.0"); if ( (temp != "U") && (temp2 != "U") ) { test_result = inttostr(strtoint(temp) + strtoint(temp2)); } break; // Windows disk usage % case 4: temp = snmp_get(info, expand_parameters(info, ".1.3.6.1.2.1.25.2.3.1.5.%dskIndex%")); disk_total = (float) strtoul(temp.c_str(), NULL, 10); temp = snmp_get(info, expand_parameters(info, ".1.3.6.1.2.1.25.2.3.1.6.%dskIndex%")); disk_used = (float) strtoul(temp.c_str(), NULL, 10); if (disk_total != 0) test_result = inttostr((int) (100*disk_used/disk_total)); break; // UCD Swap utilization % case 5: temp = snmp_get(info, ".1.3.6.1.4.1.2021.4.3.0"); disk_total = (float) strtoul(temp.c_str(), NULL, 10); temp = snmp_get(info, ".1.3.6.1.4.1.2021.4.4.0"); disk_used = (float) strtoul(temp.c_str(), NULL, 10); if (disk_total != 0) test_result = inttostr((int) (100 - 100*disk_used/disk_total)); break; // read value from file case 6: test_result = read_value_from_file(info); break; // report SNMP avoidance status case 7: test_result = inttostr(info.snmp_avoid); break; // Windows CPU usage % case 8: WinCPUList = snmp_walk(info, ".1.3.6.1.2.1.25.3.3.1.2"); // hrProcessorLoad nCPUs = 0; sum = 0; for (list::iterator current = WinCPUList.begin(); current != WinCPUList.end(); current++) { nCPUs++; sum += strtoul(current->value.c_str(), NULL, 10); } if (nCPUs > 0) { test_result = inttostr(sum / nCPUs); } else { test_result = "U"; } break; default: debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Unknown Internal Test (" + inttostr(info.test_id) + ")"); } return test_result; } string process_sql_monitor(DeviceInfo info, MYSQL *mysql) { MYSQL test_mysql; MYSQL_RES *mysql_res, *test_res; MYSQL_ROW mysql_row, test_row; string value = "U"; string query = string("SELECT host, user, password, query, column_num, timeout FROM tests_sql WHERE id = ") + inttostr(info.test_id); mysql_res = db_query(mysql, &info, query); // if the sql test exists if (mysql_res && (mysql_num_rows(mysql_res) == 1) && (mysql_row = mysql_fetch_row(mysql_res)) && (mysql_row[0] != NULL)) { string host = expand_parameters(info, mysql_row[0]); string user = expand_parameters(info, mysql_row[1]); string password = expand_parameters(info, mysql_row[2]); string test_query = expand_parameters(info, mysql_row[3]); debuglogger(DEBUG_GATHERER, LEVEL_DEBUG, &info, "MySQL Query Test ({'" + host + "'}, {'" + user + "'}, {'" + password + "'}, '" + test_query + "', '" + string(mysql_row[4]) + "')"); netmrg_mutex_lock(lkMySQL); mysql_init(&test_mysql); uint timeout = strtoint(mysql_row[5]); mysql_options(&test_mysql, MYSQL_OPT_CONNECT_TIMEOUT, (const char *) &timeout); if (!(MYSQL_CONNECT(&test_mysql,host.c_str(),user.c_str(),password.c_str(), NULL, 0, NULL, 0))) { netmrg_mutex_unlock(lkMySQL); debuglogger(DEBUG_GATHERER, LEVEL_WARNING, &info, "Test MySQL Connection Failure."); } else { netmrg_mutex_unlock(lkMySQL); if (mysql_query(&test_mysql, test_query.c_str())) { debuglogger(DEBUG_GATHERER, LEVEL_WARNING, &info, "Test MySQL Query Failed (" + test_query + ")"); } else if (!(test_res = mysql_store_result(&test_mysql))) { debuglogger(DEBUG_GATHERER, LEVEL_WARNING, &info, "Test MySQL Store Result failed."); } else { test_row = mysql_fetch_row(test_res); if (test_row != NULL) { if (test_row[strtoint(mysql_row[4])] != NULL) { value = string(test_row[strtoint(mysql_row[4])]); } else { debuglogger(DEBUG_GATHERER, LEVEL_NOTICE, &info, "Selected column is NULL."); } } else { debuglogger(DEBUG_GATHERER, LEVEL_NOTICE, &info, "There are no rows."); } mysql_free_result(test_res); mysql_close(&test_mysql); } } } else { debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Unknown SQL Test (" + inttostr(info.test_id) + ")."); } mysql_free_result(mysql_res); return value; } string process_script_monitor(DeviceInfo info, MYSQL *mysql) { MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; string value; string query = string("SELECT cmd, data_type FROM tests_script WHERE id = ") + inttostr(info.test_id); mysql_res = db_query(mysql, &info, query); // if the script test exists if (mysql_res && (mysql_num_rows(mysql_res) == 1) && (mysql_row = mysql_fetch_row(mysql_res)) && (mysql_row[0] != NULL)) { string command = expand_parameters(info, string(mysql_row[0])); if (command[0] != '/') command = get_setting(setPathLibexec) + "/" + command; char **env; params_to_env(info, env); debuglogger(DEBUG_GATHERER, LEVEL_INFO, &info, "Sending '" + command + "' to shell."); pid_t pid; char *argv[4]; argv[0] = "sh"; argv[1] = "-c"; argv[2] = (char *) command.c_str(); argv[3] = NULL; // if error code is desired if (strtoint(mysql_row[1]) == 1) { int status = 0; switch (pid = fork()) { case -1: // an error occurred during fork()ing debuglogger(DEBUG_GATHERER, LEVEL_ERROR, &info, "fork() failed."); value = "U"; break; case 0: // we're the child execve("/bin/sh", argv, env); exit(127); // if we get here, execve() has failed break; default: // we're the parent while ( (waitpid(pid, &status, 0) == -1) && (errno == EINTR) ); if (WIFEXITED(status)) { // the process terminated normally, return the error code value = inttostr(WEXITSTATUS(status)); } else { // the process did not terminate normally, return "unknown" debuglogger(DEBUG_MONITOR, LEVEL_NOTICE, &info, "external process terminated abnormally."); value = "U"; } break; } } // stdout is desired else { int status = 0; int pdes[2]; volatile int parent_fd, child_fd; int perr = 0; //netmrg_mutex_lock(lkPipe); perr = pipe(pdes); //netmrg_mutex_unlock(lkPipe); if (perr < 0) { debuglogger(DEBUG_GATHERER, LEVEL_ERROR, &info, "pipe() failed."); value = "U"; } else { parent_fd = pdes[0]; child_fd = pdes[1]; char buf[256]; size_t len; /*fd_set fds; struct timeval timeout;*/ switch (pid = fork()) { case -1: // an error occurred during fork()ing close(pdes[0]); close(pdes[1]); debuglogger(DEBUG_GATHERER, LEVEL_ERROR, &info, "fork() failed."); value = "U"; break; case 0: // we're the child close(parent_fd); if (child_fd != STDOUT_FILENO) { dup2(child_fd, STDOUT_FILENO); close(child_fd); } execve("/bin/sh", argv, env); exit(127); // if we get here, execve() has failed break; default: // we're the parent debuglogger(DEBUG_MONITOR, LEVEL_DEBUG, &info, "external process pid is " + inttostr(pid) + ", our fd is " + inttostr(parent_fd)); close(child_fd); /* select() will be useful eventually for limiting the time spent on external progs - but not now FD_ZERO(&fds); FD_SET(parent_fd,&fds); timeout.tv_sec = 5; timeout.tv_usec = 0; // wait 5 seonds for pipe response switch(select(parent_fd + 1, &fds, NULL, NULL, &timeout)) { case -1: debuglogger(DEBUG_GATHERER, LEVEL_ERROR, &info, "select() failed."); break; case 0: debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "select() timed out."); break; default: debuglogger(DEBUG_MONITOR, LEVEL_DEBUG, &info, "select() succeeded."); break; } */ /* move this block to the bottom of read when using select() */ while ( (waitpid(pid, &status, 0) == -1) && (errno == EINTR) ); if (!WIFEXITED(status)) { // the process did not terminate normally debuglogger(DEBUG_MONITOR, LEVEL_NOTICE, &info, "external process terminated abnormally."); } else { debuglogger(DEBUG_MONITOR, LEVEL_DEBUG, &info, "external process terminated normally (" + inttostr(WEXITSTATUS(status)) + ")"); } if ((len = read(parent_fd, (void *) buf, 255)) == -1) { // error during read debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "read() failed."); value = "U"; } else { debuglogger(DEBUG_MONITOR, (len == 0 ? LEVEL_NOTICE : LEVEL_DEBUG), &info, "read() provided " + inttostr(len) + " bytes."); buf[len] = '\0'; value = string(buf); if (len == 0) value = "U"; } close(parent_fd); break; } } } free_env(info, env); } else { debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Unknown Script Test (" + inttostr(info.test_id) + ")."); value = "U"; } mysql_free_result(mysql_res); return value; } string process_snmp_monitor(DeviceInfo info, MYSQL *mysql) { MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; string value; string query = string("SELECT oid, type, subitem FROM tests_snmp WHERE id = ") + inttostr(info.test_id); mysql_res = db_query(mysql, &info, query); // if the snmp test exists if (mysql_res && (mysql_num_rows(mysql_res) == 1) && (mysql_row = mysql_fetch_row(mysql_res)) && (mysql_row[0] != NULL)) { string oid = expand_parameters(info, mysql_row[0]); int type = strtoint(mysql_row[1]); int subitem = strtoint(mysql_row[2]); if (info.snmp_avoid == 0) { list result; list::iterator x; switch (type) { case 0: // plain "get" value = snmp_get(info, oid); break; case 1: // walk to Nth item result = snmp_walk(info, oid); result.reverse(); // sigh, it's upside-down x = result.begin(); for (int k = 0; k < subitem; k++) { if (x == result.end()) { debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "There is no subitem in position " + inttostr(subitem) + "."); value = "U"; break; } else { value = x->value; x++; } } break; case 2: // count of walked items result = snmp_walk(info, oid); value = inttostr(result.size()); break; default: value = "U"; debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Unknown SNMP Test Type (" + inttostr(type) + ")."); } } else { value = "U"; debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Avoided."); } } else { value = "U"; debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Unknown SNMP Test (" + inttostr(info.test_id) + ")."); } mysql_free_result(mysql_res); return value; } uint process_monitor(DeviceInfo info, MYSQL *mysql, RRDInfo rrd) { debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Starting Monitor."); info.parameters.push_front(ValuePair("parameters", info.test_params)); switch (info.test_type) { case 1: info.curr_val = process_script_monitor(info, mysql); break; case 2: info.curr_val = process_snmp_monitor(info, mysql); break; case 3: info.curr_val = process_sql_monitor(info, mysql); break; case 4: info.curr_val = process_internal_monitor(info, mysql); break; default: debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Unknown test type (" + inttostr(info.test_type) + ")."); info.curr_val = "U"; } // end switch debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Value: " + strstripnl(info.curr_val)); // strip out anything not numeric info.curr_val = remove_nonnumerics(info.curr_val); if (rrd.data_type != "") { update_monitor_rrd(info, rrd); } // what type of value are we dealing with? if (info.curr_val == "U") { // value is unknown debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Value is unknown."); } else if (info.curr_val == inttostr(strtoint(info.curr_val))) { // value is an integer // (do nothing) debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Value is an integer."); } else if (info.curr_val == "") { // value is non-numeric debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Value is not numeric."); info.curr_val = "U"; } else { //value is probably decimal debuglogger(DEBUG_MONITOR, LEVEL_INFO, &info, "Value is a decimal."); info.curr_val = inttostr(ROUND_VAL(strtodec(info.curr_val))); } if ((info.curr_val == "U") || (info.last_val == "U")) { info.delta_val = "U"; info.rate_val = "U"; } else { info.delta_val = inttostr(strtoint(info.curr_val) - strtoint(info.last_val)); if (info.delta_time != 0) { info.rate_val = inttostr(strtoint(info.delta_val) / info.delta_time); } else { info.rate_val = "U"; } } // populate parameters info.parameters.push_front(ValuePair("current_value", info.curr_val)); info.parameters.push_front(ValuePair("delta_value", info.delta_val)); info.parameters.push_front(ValuePair("rate_value", info.rate_val)); info.parameters.push_front(ValuePair("last_value", info.last_val)); uint status = process_events(info, mysql); info.status = status; update_monitor_db(info, mysql, rrd); return status; } // update_monitor_db // // update the database with current values for a monitor void update_monitor_db(DeviceInfo info, MYSQL *mysql, RRDInfo rrd) { if (info.curr_val == "U") { info.curr_val = "NULL"; } if (info.delta_val == "U") { info.delta_val = "NULL"; } db_update(mysql, &info, "UPDATE monitors SET tuned=1, last_val=" + info.curr_val + ", delta_val=" + info.delta_val + ", delta_time=UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(last_time), "+ "last_time=NOW(), status=" + inttostr(info.status) + " WHERE id=" + inttostr(info.monitor_id)); } // expand_parameters // // expand parameters within a string string expand_parameters(DeviceInfo &info, string input) { for (list::iterator current = info.parameters.begin(); current != info.parameters.end(); current++) { input = token_replace(input, "%" + current->name + "%", current->value); } return input; } void params_to_env(DeviceInfo &info, char ** &env) { int count = info.parameters.size() + 1; env = new char* [count]; int i = 0; for (list::iterator current = info.parameters.begin(); current != info.parameters.end(); current++) { string env_string = "netmrg_" + current->name + "=" + current->value; env[i] = new char[env_string.length() + 1]; strncpy(env[i], env_string.c_str(), env_string.length() + 1); i++; } env[count - 1] = NULL; for (int i = 0; i < count; i++) if (env[i] != NULL) debuglogger(DEBUG_MONITOR, LEVEL_DEBUG, &info, string("Env: ") + env[i]); } void free_env(DeviceInfo &info, char ** &env) { for (int i = 0; i < info.parameters.size() + 1; i++) delete [] env[i]; delete [] env; } netmrg-0.20/src/events.cpp0000664000076400007640000001201410772570211015714 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * events.cpp * NetMRG Gatherer Events Library * * see doc/LICENSE for copyright information ********************************************/ #include "events.h" #include "utils.h" #include "settings.h" #include "monitors.h" string situations[4] = { "Disabled", "Normal", "Warning", "Critical" }; uint process_events(DeviceInfo info, MYSQL *mysql) { MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; uint status = 0; string query = "SELECT id, trigger_type, last_status, situation, last_triggered, name FROM events WHERE mon_id=" + inttostr(info.monitor_id) + " AND trigger_type = 1"; mysql_res = db_query(mysql, &info, query); for (uint i = 0; i < mysql_num_rows(mysql_res); i++) { mysql_row = mysql_fetch_row(mysql_res); info.event_id = strtoint(mysql_row[0]); if (process_event(info, mysql, strtoint(mysql_row[1]), strtoint(mysql_row[2]), strtoint(mysql_row[3]), strtoint(mysql_row[4]), mysql_row[5])) { status = worstof(status, strtoint(mysql_row[3])); } } mysql_free_result(mysql_res); return status; } // end process_events() uint process_event(DeviceInfo info, MYSQL *mysql, int trigger_type, int last_status, int situation, long int last_triggered, string name) { MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; uint status = 0; string query = "SELECT `value`, `value_type`, `condition`, `logic_condition` FROM `conditions` WHERE `event_id` = '" + inttostr(info.event_id) + "' ORDER BY `id`"; mysql_res = db_query(mysql, &info, query); for (uint i = 0; i < mysql_num_rows(mysql_res); i++) { mysql_row = mysql_fetch_row(mysql_res); if (i == 0) { status = process_condition(info, strtoint(mysql_row[0]), strtoint(mysql_row[1]), strtoint(mysql_row[2])); } else { switch (strtoint(mysql_row[3])) { case 0: status = status && process_condition(info, strtoint(mysql_row[0]), strtoint(mysql_row[1]), strtoint(mysql_row[2])); break; case 1: status = status || process_condition(info, strtoint(mysql_row[0]), strtoint(mysql_row[1]), strtoint(mysql_row[2])); break; } } } mysql_free_result(mysql_res); if (status == 0) { debuglogger(DEBUG_EVENT, LEVEL_INFO, &info, "Not Triggered."); db_update(mysql, &info, "UPDATE events SET last_status=0 WHERE id=" + inttostr(info.event_id)); return 0; } else { debuglogger(DEBUG_EVENT, LEVEL_INFO, &info, "Triggered."); // setup parameters for the response to use. info.parameters.push_front(ValuePair("event_name", name)); info.parameters.push_front(ValuePair("situation", situations[situation])); if ((uint) last_status != status) { db_update(mysql, &info, "UPDATE events SET last_triggered=UNIX_TIMESTAMP(NOW()), last_status=1 WHERE id=" + inttostr(info.event_id)); db_update(mysql, &info, "INSERT INTO event_log SET date=UNIX_TIMESTAMP(NOW()), time_since_last_change=UNIX_TIMESTAMP(NOW())-" + inttostr(last_triggered) + ", event_id=" + inttostr(info.event_id)); process_responses(info, mysql); } return 1; } } // end process_event() uint process_condition(DeviceInfo info, long long int compare_value, int value_type, int condition) { long long int actual_value = 0; switch (value_type) { case 0: if (info.curr_val == "U") return 0; actual_value = strtoint(info.curr_val); break; case 1: if (info.delta_val == "U") return 0; actual_value = strtoint(info.delta_val); break; case 2: if (info.rate_val == "U") return 0; actual_value = strtoint(info.rate_val); break; case 3: if (info.last_val == "U") return 0; actual_value = strtoint(info.last_val); break; } switch (condition) { case 0: if (actual_value < compare_value) return 1; break; case 1: if (actual_value == compare_value) return 1; break; case 2: if (actual_value > compare_value) return 1; break; case 3: if (actual_value <= compare_value) return 1; break; case 4: if (actual_value != compare_value) return 1; break; case 5: if (actual_value >= compare_value) return 1; break; } return 0; } // end process_condition() void process_responses(DeviceInfo info, MYSQL *mysql) { MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; int notification_res; string query = string("SELECT notifications.command, responses.parameters, responses.id ") + string("FROM responses, notifications ") + string("WHERE responses.event_id=") + inttostr(info.event_id) + " " + string("AND responses.notification_id=notifications.id AND notifications.disabled = 0"); mysql_res = db_query(mysql, &info, query); for (uint i = 0; i < mysql_num_rows(mysql_res); i++) { mysql_row = mysql_fetch_row(mysql_res); info.response_id = strtoint(mysql_row[2]); string command = string(mysql_row[0]) + " " + string(mysql_row[1]); command = expand_parameters(info, command); if (command[0] != '/') command = get_setting(setPathLibexec) + "/" + command; debuglogger(DEBUG_RESPONSE, LEVEL_INFO, &info, "Running Response: " + command); notification_res = system(command.c_str()); } } // end process_responses() netmrg-0.20/src/Makefile.am0000664000076400007640000000361710135656170015753 0ustar silfreedsilfreed@SET_MAKE@ include $(top_srcdir)/Make.inc SUBDIRS = . netmrg_gatherer_SOURCES = db.cpp devices.cpp events.cpp locks.cpp mappings.cpp monitors.cpp netmrg.cpp rrd.cpp settings.cpp snmp.cpp utils.cpp noinst_HEADERS = include/common.h include/db.h include/devices.h include/events.h include/locks.h include/mappings.h include/monitors.h include/netmrg.h include/rrd.h include/settings.h include/snmp.h include/types.h include/utils.h bin_PROGRAMS = netmrg-gatherer INCLUDES = -I./include .cpp.o: @echo " CXX $@" @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< netmrg-gatherer$(EXEEXT): $(netmrg_gatherer_OBJECTS) $(netmrg_gatherer_DEPENDENCIES) @echo " LINK $@" @rm -f netmrg-gatherer$(EXEEXT) $(CXXLINK) $(netmrg_gatherer_LDFLAGS) $(netmrg_gatherer_OBJECTS) $(netmrg_gatherer_LDADD) $(LIBS) mostlyclean-compile: @echo " RM *.$(OBJEXT)" -rm -f *.$(OBJEXT) clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || ( \ echo " RM $(bin_PROGRAMS)"; \ rm -f $(bin_PROGRAMS) ) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @echo " INST $(bin_PROGRAMS)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done netmrg-0.20/src/devices.cpp0000664000076400007640000003276510522722116016045 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * devices.cpp * NetMRG Gatherer Devices Library * * see doc/LICENSE for copyright information ********************************************/ #include "devices.h" #include "snmp.h" #include "utils.h" #include "monitors.h" #include "mappings.h" #include "settings.h" void do_properties_recache(DeviceInfo info, MYSQL *mysql) { string query = string("SELECT id, test_type, test_id, test_params, name FROM dev_props WHERE dev_type_id = " + inttostr(info.device_type)); MYSQL_RES *mysql_res = db_query(mysql, &info, query); MYSQL_ROW mysql_row; for (uint i = 0; i < mysql_num_rows(mysql_res); i++) { mysql_row = mysql_fetch_row(mysql_res); string value; info.property_id = strtoint(mysql_row[0]); info.test_type = strtoint(mysql_row[1]); info.test_id = strtoint(mysql_row[2]); info.test_params = mysql_row[3]; info.parameters.push_front(ValuePair("parameters", info.test_params)); switch (info.test_type) { case 1: value = process_script_monitor(info, mysql); value = strstripnl(value); break; case 2: value = process_snmp_monitor(info, mysql); value = remove_surrounding_quotes(value); break; case 3: value = process_sql_monitor(info, mysql); break; case 4: value = process_internal_monitor(info, mysql); break; default: debuglogger(DEBUG_PROPERTY, LEVEL_WARNING, &info, "Unknown test type (" + inttostr(info.test_type) + ")."); value = "U"; } // end switch if (value != "U") { debuglogger(DEBUG_PROPERTY, LEVEL_INFO, &info, string("Device Property '") + mysql_row[4] + "' set to {'" + value + "'}"); db_update(mysql, &info, "REPLACE INTO dev_prop_vals SET dev_id=" + inttostr(info.device_id) + ", prop_id=" + mysql_row[0] + ", value='" + db_escape(value) + "'"); } else { debuglogger(DEBUG_PROPERTY, LEVEL_INFO, &info, "Device Property test failed, skipping update."); } } mysql_free_result(mysql_res); } // end do_properties_recache uint process_sub_device(DeviceInfo info, MYSQL *mysql) { MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; uint status = 0; int subdev_status = 0; debuglogger(DEBUG_SUBDEVICE, LEVEL_INFO, &info, "Starting Subdevice."); // setup subdevice specific parameters info.parameters.push_front(ValuePair("subdev_name", info.subdevice_name)); // create an array containing the parameters for the subdevice string query = string("SELECT name, value FROM sub_dev_variables WHERE type = 'static' AND sub_dev_id = ") + inttostr(info.subdevice_id); mysql_res = db_query(mysql, &info, query); for (uint i = 0; i < mysql_num_rows(mysql_res); i++) { mysql_row = mysql_fetch_row(mysql_res); info.parameters.push_front(ValuePair(mysql_row[0], mysql_row[1])); } mysql_free_result(mysql_res); // depending on the subdevice type, assign values to more parameters switch (info.subdevice_type) { case 1: break; // group case 2: subdev_status = setup_interface_parameters(&info, mysql); break; // interface case 3: subdev_status = setup_disk_parameters(&info, mysql); break; // disk default: debuglogger(DEBUG_SUBDEVICE, LEVEL_WARNING, &info, "Unknown subdevice type (" + inttostr(info.subdevice_type) + ")"); subdev_status = -3; } // end subdevice type switch // delete the old dynamic entries from the cache db_update(mysql, &info, "DELETE FROM sub_dev_variables WHERE type = 'dynamic' AND sub_dev_id = " + inttostr(info.subdevice_id)); // insert the new dynamic entries for (list::iterator current = info.parameters.begin(); current != info.parameters.end(); current++) { db_update(mysql, &info, "INSERT DELAYED INTO sub_dev_variables SET type = 'dynamic', sub_dev_id = " + inttostr(info.subdevice_id) + ", name = '" + current->name + "', value = '" + db_escape(current->value) + "'"); } if (subdev_status < 0) { debuglogger(DEBUG_SUBDEVICE, LEVEL_WARNING, &info, "Subdevice aborted due to previous errors."); return 0; } // query the monitors for this subdevice query = string("SELECT ") + string("monitors.data_type, ") + // 0 string("data_types.rrd_type, ") + // 1 string("monitors.min_val, ") + // 2 string("monitors.max_val, ") + // 3 string("monitors.tuned, ") + // 4 string("monitors.test_type, ") + // 5 string("monitors.test_id, ") + // 6 string("monitors.test_params, ") + // 7 string("monitors.last_val, ") + // 8 string("monitors.id, ") + // 9 string("NOW() - monitors.last_time ") + // 10 string("FROM monitors ") + string("LEFT JOIN data_types ON monitors.data_type=data_types.id ") + string("WHERE sub_dev_id = ") + inttostr(info.subdevice_id); mysql_res = db_query(mysql, &info, query); for (uint i = 0; i < mysql_num_rows(mysql_res); i++) { mysql_row = mysql_fetch_row(mysql_res); info.monitor_id = strtoint(mysql_row[9]); info.test_type = strtoint(mysql_row[5]); info.test_id = strtoint(mysql_row[6]); info.test_params = mysql_row[7]; if (mysql_row[8] != NULL) { info.last_val = mysql_row[8]; } if (mysql_row[10] != NULL) { info.delta_time = strtoint(mysql_row[10]); } RRDInfo rrd; // if we're using RRD if (strtoint(mysql_row[0]) > 0) { if (mysql_row[1] != NULL) { rrd.data_type = mysql_row[1]; } if (mysql_row[2] != NULL) { rrd.min_val = mysql_row[2]; } if (mysql_row[3] != NULL) { rrd.max_val = mysql_row[3]; } rrd.tuned = strtoint(mysql_row[4]); } // end using rrd // process each monitor status = worstof(status, process_monitor(info, mysql, rrd)); } // end for each monitor mysql_free_result(mysql_res); db_update(mysql, &info, "UPDATE sub_devices SET status=" + inttostr(status) + " WHERE id=" + inttostr(info.subdevice_id)); return status; } // end process subdevice uint process_sub_devices(DeviceInfo info, MYSQL *mysql) { MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; uint status = 0; string query = string("SELECT id, type, name FROM sub_devices WHERE dev_id=") + inttostr(info.device_id); mysql_res = db_query(mysql, &info, query); for (uint i = 0; i < mysql_num_rows(mysql_res); i++) { mysql_row = mysql_fetch_row(mysql_res); // setup subdevice variables info.subdevice_id = strtoint(mysql_row[0]); info.subdevice_type = strtoint(mysql_row[1]); info.subdevice_name = mysql_row[2]; status = worstof(status, process_sub_device(info, mysql)); } mysql_free_result(mysql_res); return status; } void process_device(int dev_id) { MYSQL mysql; MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; uint status = 0; time_t start_time = time( NULL ); DeviceInfo info; info.device_id = dev_id; // connect to db, get info for this device debuglogger(DEBUG_DEVICE, LEVEL_NOTICE, &info, "Starting device thread at " + timetostr(start_time) + "."); if (!db_connect(&mysql)) return; debuglogger(DEBUG_DEVICE, LEVEL_INFO, &info, "MySQL connection established."); info.mysql = (void *) &mysql; string query = string("SELECT ") + string("name, ") + // 0 string("ip, ") + // 1 string("snmp_version, ") + // 2 string("snmp_read_community, ") + // 3 string("snmp_recache_method, ") + // 4 string("snmp_uptime, ") + // 5 string("snmp_ifnumber, ") + // 6 string("snmp_port, ") + // 7 string("snmp_timeout, ") + // 8 string("snmp_retries, ") + // 9 string("no_snmp_uptime_check, ") + // 10 string("dev_type, ") + // 11 string("unknowns_on_snmp_restart ") + // 12 string("FROM devices ") + string("WHERE id=") + inttostr(dev_id); mysql_res = db_query(&mysql, &info, query); mysql_row = mysql_fetch_row(mysql_res); info.name = mysql_row[0]; info.ip = mysql_row[1]; info.snmp_version = strtoint(mysql_row[2]); info.device_type = strtoint(mysql_row[11]); debuglogger(DEBUG_DEVICE, LEVEL_INFO, &info, info.name + " / {" + info.ip + "}"); // setup device-wide parameters info.parameters.push_front(ValuePair("dev_name", mysql_row[0])); info.parameters.push_front(ValuePair("ip", mysql_row[1])); // get SNMP-level info, if SNMP is used. if (info.snmp_version > 0) { // set SNMP parameters info.snmp_read_community = mysql_row[3]; info.snmp_port = strtoint(mysql_row[7]); info.snmp_timeout = strtoint(mysql_row[8]); info.snmp_retries = strtoint(mysql_row[9]); int snmp_recache_method = strtoint(mysql_row[4]); int check_snmp_uptime = strtoint(mysql_row[10]) ? 0 : 1; // add SNMP parameters to list info.parameters.push_front(ValuePair("snmp_read_community", mysql_row[3])); // init device snmp session snmp_session_init(info); if (check_snmp_uptime) { // get uptime info.snmp_uptime = get_snmp_uptime(info); debuglogger(DEBUG_SNMP, LEVEL_INFO, &info, "SNMP Uptime is " + format_time_elapsed(info.snmp_uptime / 100) + + " (" + inttostr(info.snmp_uptime) + " centiseconds)"); // store new uptime db_update(&mysql, &info, "UPDATE devices SET snmp_uptime=" + inttostr(info.snmp_uptime) + " WHERE id=" + inttostr(dev_id)); } else { debuglogger(DEBUG_DEVICE, LEVEL_WARNING, &info, "Not checking SNMP uptime as per configuration."); debuglogger(DEBUG_DEVICE, LEVEL_WARNING, &info, "This option should only be used as a last resort."); } if ( check_snmp_uptime && (info.snmp_uptime == 0) ) { // device is snmp-dead info.snmp_avoid = 1; debuglogger(DEBUG_DEVICE, LEVEL_WARNING, &info, "Device is SNMP-dead. Avoiding SNMP tests."); } else { if (snmp_recache_method >= 1) { // we care about SNMP agent restarts if (check_snmp_uptime) { if (strtoint(mysql_row[5]) == 0) { // device came back from the dead info.snmp_recache = 1; debuglogger(DEBUG_DEVICE, LEVEL_NOTICE, &info, "Device has returned from SNMP-death."); // write unknowns to counters, if configured to if (strtoint(mysql_row[12]) == 1) { info.counter_unknowns = 1; debuglogger(DEBUG_DEVICE, LEVEL_NOTICE, &info, "Using unknowns for non-gauge values."); } } if (info.snmp_uptime < strtoint(mysql_row[5])) { // uptime went backwards info.snmp_recache = 1; debuglogger(DEBUG_SNMP, LEVEL_NOTICE, &info, "SNMP Agent Restart."); // write unknowns to counters, if configured to if (strtoint(mysql_row[12]) == 1) { info.counter_unknowns = 1; debuglogger(DEBUG_DEVICE, LEVEL_NOTICE, &info, "Using unknowns for non-gauge values."); } } } } if (snmp_recache_method >= 2) { // we care about ifNumber info.snmp_ifnumber = strtoint(snmp_get(info, string("interfaces.ifNumber.0"))); debuglogger(DEBUG_SNMP, LEVEL_INFO, &info, "Number of Interfaces is " + inttostr(info.snmp_ifnumber)); if (info.snmp_ifnumber != strtoint(mysql_row[6])) { // ifNumber changed info.snmp_recache = 1; db_update(&mysql, &info, "UPDATE devices SET snmp_ifnumber = " + inttostr(info.snmp_ifnumber) + string(" WHERE id = ") + inttostr(dev_id)); debuglogger(DEBUG_SNMP, LEVEL_NOTICE, &info, "Number of interfaces changed from " + string(mysql_row[6]) + " to " + inttostr(info.snmp_ifnumber)); } else if (snmp_recache_method >= 3) { // we care about interface cache matching ifNumber MYSQL_RES *cache_mysql_res; MYSQL_ROW cache_mysql_row; cache_mysql_res = db_query(&mysql, &info, string("SELECT count(*) FROM snmp_interface_cache WHERE dev_id = ") + inttostr(info.device_id)); cache_mysql_row = mysql_fetch_row(cache_mysql_res); unsigned int interface_cache_count = strtoint(cache_mysql_row[0]); mysql_free_result(cache_mysql_res); if (info.snmp_ifnumber != interface_cache_count) { // ifNumber doesn't match the interface cache in the database info.snmp_recache = 1; debuglogger(DEBUG_SNMP, LEVEL_NOTICE, &info, "Number of cached interfaces (" + inttostr(interface_cache_count) + ") " + "doesn't match reported number of interfaces."); } } } if (strtoint(mysql_row[4]) == 4) { // we recache this one every time. info.snmp_recache = 1; } } // end snmp_uptime > 0 if (info.snmp_recache) { // we need to recache. debuglogger(DEBUG_SNMP, LEVEL_NOTICE, &info, "Performing SNMP Recache."); do_snmp_interface_recache(&info, &mysql); do_snmp_disk_recache(&info, &mysql); do_properties_recache(info, &mysql); } } // end snmp-enabled else { debuglogger(DEBUG_SNMP, LEVEL_INFO, &info, "This device is configured with no SNMP support; avoiding SNMP tests."); info.snmp_avoid = 1; } mysql_free_result(mysql_res); // process sub-devices status = process_sub_devices(info, &mysql); db_update(&mysql, &info, "UPDATE devices SET status=" + inttostr(status) + ", snmp_avoided=" + inttostr(info.snmp_avoid) + " WHERE id=" + inttostr(dev_id)); if (info.snmp_sess_p) { snmp_session_cleanup(info); } // trim event log for device debuglogger(DEBUG_DEVICE, LEVEL_INFO, &info, "Trimming device event log."); mysql_res = db_query(&mysql, &info, "SELECT id FROM log WHERE dev_id=" + inttostr(info.device_id) + " ORDER BY id"); int count = mysql_num_rows(mysql_res); for (int i = 0; i < count - get_setting_int(setMaxDeviceLogEntries); i++) { mysql_row = mysql_fetch_row(mysql_res); db_update(&mysql, &info, string("DELETE FROM log WHERE id=") + mysql_row[0]); } mysql_free_result(mysql_res); mysql_close(&mysql); info.mysql = NULL; debuglogger(DEBUG_DEVICE, LEVEL_NOTICE, &info, "Ending device thread at " + timetostr(time( NULL )) + ", after a duration of " + inttostr(time(NULL) - start_time) + " seconds."); } // end process_device netmrg-0.20/src/mappings.cpp0000664000076400007640000003121510521740213016223 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * mappings.cpp * NetMRG Gatherer Mappings Library * * see doc/LICENSE for copyright information ********************************************/ #include "mappings.h" #include "utils.h" #include "snmp.h" #include "db.h" string hex_to_dec(const string & hex) { unsigned int value; sscanf(hex.c_str(), "%x", &value); return inttostr(value); } string cdpaddress_to_ip(const string & cdpip) { string temp = cdpip; string ip = ""; int pos; while ((pos = temp.find(" ")) != string::npos) { ip += hex_to_dec(temp.substr(0,pos)) + "."; temp.erase(0, pos+1); } ip += hex_to_dec(temp); return ip; } string get_cdp_index(DeviceInfo *info, string portifindex) { list cdpAddressType = snmp_walk(*info, ".1.3.6.1.4.1.9.9.23.1.2.1.1.3." + portifindex); cdpAddressType = snmp_trim_rootoid(cdpAddressType, ".1.3.6.1.4.1.9.9.23.1.2.1.1.3."); if (!cdpAddressType.empty()) return cdpAddressType.begin()->oid; return "U"; } void do_snmp_interface_recache(DeviceInfo *info, MYSQL *mysql) { // clear cache for this device db_update(mysql, info, "DELETE FROM snmp_interface_cache WHERE dev_id=" + inttostr(info->device_id)); // this is a hack to see if we're on a CatOS platform string sysdescr = snmp_get(*info, "system.sysDescr.0"); IfMIBType mibtype = imtStandard; if (sysdescr.find("FSM726 Managed Switch") != string::npos) mibtype = imtFSM726; if (sysdescr.find("WS-C") != string::npos) mibtype = imtCatOS; if (sysdescr.find("Cisco Systems Catalyst 1900") != string::npos) mibtype = imtOldCiscoSwitch; // check for CDP capability bool cdp_enabled = (snmp_get(*info, ".1.3.6.1.4.1.9.9.23.1.3.1.0") == "1"); list ifIndexList = snmp_walk(*info, "ifIndex"); for (list::iterator current = ifIndexList.begin(); current != ifIndexList.end(); current++) { string ifIndex = current->value; string ifName = snmp_get(*info, "ifName." + ifIndex); if ((mibtype == imtStandard) && (sysdescr.find("Cisco") != string::npos) && (sysdescr.find("IOS") != string::npos) && (ifName == "U") ) { mibtype = imtOldCiscoRouter; } string ifDescr = snmp_get(*info, "ifDescr." + ifIndex); // use CatOS port name in place of ifAlias string ifAlias; if (mibtype == imtCatOS) { // CatOS port names are indexed by slot and port, not by ifIndex string::size_type slash_pos = ifName.find("/"); int slot = strtoint(ifName.substr(0, slash_pos)); int port = strtoint(ifName.substr(slash_pos + 1, ifName.length() - 1)); debuglogger(DEBUG_SNMP, LEVEL_DEBUG, info, "ifname='" + ifName + "', slash_pos=" + inttostr(slash_pos) + ", slot=" + inttostr(slot) + ", port=" + inttostr(port)); if ( (slot != 0) && (port != 0) ) { ifAlias = snmp_get(*info, ".1.3.6.1.4.1.9.5.1.4.1.1.4." + inttostr(slot) + "." + inttostr(port)); ifAlias.erase(0, 1); ifAlias.erase(ifAlias.length() - 1, 1); } } else if (mibtype == imtFSM726) { ifAlias = snmp_get(*info, ".1.3.6.1.4.1.4526.1.4.11.6.1.13." + ifIndex); ifAlias = remove_surrounding_quotes(ifAlias); ifName = ifDescr; } else if (mibtype == imtOldCiscoSwitch) { ifAlias = snmp_get(*info, ".1.3.6.1.4.1.437.1.1.3.3.1.1.3." + ifIndex); ifAlias = remove_surrounding_quotes(ifAlias); ifName = ifDescr; } else if (mibtype == imtOldCiscoRouter) { ifAlias = snmp_get(*info, ".1.3.6.1.4.1.9.2.2.1.1.28." + ifIndex); ifAlias = remove_surrounding_quotes(ifAlias); ifName = ifDescr; } else { ifAlias = snmp_get(*info, "ifAlias." + ifIndex); } U_to_NULL(ifAlias); U_to_NULL(ifName); U_to_NULL(ifDescr); string ifType = snmp_get(*info, "ifType." + ifIndex); string ifMAC = snmp_get(*info, "ifPhysAddress." + ifIndex); U_to_NULL(ifMAC); string ifOperStatus = snmp_get(*info, "ifOperStatus." + ifIndex); string ifAdminStatus = snmp_get(*info, "ifAdminStatus." + ifIndex); string ifSpeed = snmp_get(*info, "ifSpeed." + ifIndex); string vlan = snmp_get(*info, ".1.3.6.1.4.1.9.9.68.1.2.2.1.2." + ifIndex); U_to_NULL(vlan); // CDP Next Hop string nexthop = "U"; if (cdp_enabled) { string cdp_index = get_cdp_index(info, ifIndex); if (cdp_index != "U") { string cdp_port = remove_surrounding_quotes(snmp_get(*info, ".1.3.6.1.4.1.9.9.23.1.2.1.1.7." + cdp_index)); string raw_cdp_ip = snmp_get(*info, ".1.3.6.1.4.1.9.9.23.1.2.1.1.4." + cdp_index); string cdp_ip = cdpaddress_to_ip(raw_cdp_ip); MYSQL_RES *nh_mysql_res; MYSQL_ROW nh_mysql_row; nh_mysql_res = db_query(mysql, info, string( "SELECT sd.id FROM devices d, sub_devices sd, sub_dev_variables sdv ") + "WHERE d.ip = '" + cdp_ip + "'" + "AND sdv.name = 'ifDescr' AND sdv.value = '" + cdp_port + "'" + "AND d.id = sd.dev_id AND sd.id = sdv.sub_dev_id"); if (nh_mysql_row = mysql_fetch_row(nh_mysql_res)) { nexthop = string(nh_mysql_row[0]); } mysql_free_result(nh_mysql_res); } } U_to_NULL(nexthop); db_update(mysql, info, string("INSERT INTO snmp_interface_cache SET ") + "dev_id = " + inttostr((*info).device_id) + ", " + "ifIndex = '" + ifIndex + "', " + "ifName = " + ifName + ", " + "ifDescr = " + ifDescr + ", " + "ifAlias = " + ifAlias + ", " + "ifType = '" + ifType + "', " + "ifMAC = " + ifMAC + ", " + "ifOperStatus = '" + ifOperStatus + "', " + "ifAdminStatus = '" + ifAdminStatus + "', " + "ifSpeed = '" + ifSpeed + "', " + "vlan = " + vlan + ", " + "nexthop = " + nexthop + ""); } list ifIPList = snmp_walk(*info, "ipAdEntIfIndex"); ifIPList = snmp_trim_rootoid(ifIPList, ".1.3.6.1.2.1.4.20.1.2."); for (list::iterator current = ifIPList.begin(); current != ifIPList.end(); current++) { string ip = current->oid; string ifIndex = current->value; db_update(mysql, info, string("UPDATE snmp_interface_cache SET ifIP = '") + ip + "' WHERE dev_id=" + inttostr((*info).device_id) + " AND ifIndex=" + ifIndex); } } void do_snmp_disk_recache(DeviceInfo *info, MYSQL *mysql) { // clear cache for this device db_update(mysql, info, "DELETE FROM snmp_disk_cache WHERE dev_id=" + inttostr((*info).device_id)); // try UCD Disk MIB list dskIndexList = snmp_walk(*info, "dskIndex"); for (list::iterator current = dskIndexList.begin(); current != dskIndexList.end(); current++) { string dskIndex = current->value; string dskPath = snmp_get(*info, "dskPath." + dskIndex); U_to_NULL(dskPath); string dskDevice = snmp_get(*info, "dskDevice." + dskIndex); U_to_NULL(dskDevice); db_update(mysql, info, string("INSERT INTO snmp_disk_cache SET ") + "dev_id = " + inttostr((*info).device_id) + ", " + "disk_index = " + dskIndex + ", " + "disk_device = " + dskDevice + ", " + "disk_path = " + dskPath); } // try Windows Disk MIB if (dskIndexList.empty()) { string dskPath, dskIndex; dskIndexList = snmp_walk(*info, ".1.3.6.1.2.1.25.2.3.1.1"); for (list::iterator current = dskIndexList.begin(); current != dskIndexList.end(); current++) { dskIndex = current->value; dskPath = snmp_get(*info, ".1.3.6.1.2.1.25.2.3.1.3." + dskIndex); U_to_NULL(dskPath); if (dskPath[1] == '\\' && dskPath[2] == '"' && dskPath[dskPath.size()-3] == '\\' && dskPath[dskPath.size()-2] == '"') { dskPath.erase(1, 2); dskPath.erase(dskPath.size()-3, 2); } string::size_type i = dskPath.find(" ", 0); if (i != string::npos) { dskPath = dskPath.substr(0, i+1) + "'"; } db_update(mysql, info, string("INSERT INTO snmp_disk_cache SET ") + "dev_id = " + inttostr((*info).device_id) + ", " + "disk_index = " + dskIndex + ", " + "disk_device = " + dskPath + ", " + "disk_path = " + dskPath); } } } int setup_interface_parameters(DeviceInfo *info, MYSQL *mysql) { // This function examines the parameters for the subdevice and determines if any // are to be used as SNMP index values. If so, it adds parameters with all available // information from the snmp_cache, so that things like %ifIndex% and %ifName% in monitors // will get expanded into the correct values when the monitors are processed. string index = ""; string value = ""; MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; int retval = 0; for (list::iterator current = info->parameters.begin(); current != info->parameters.end(); current++) { value = current->value; if ( current->name == "ifIndex" || current->name == "ifName" || current->name == "ifDescr" || current->name == "ifAlias" || current->name == "ifIP" || current->name == "ifMAC" ) { index = current->name; break; } } // end for each parameter if (index == "") { debuglogger(DEBUG_SUBDEVICE, LEVEL_WARNING, info, "Interface subdevice has no interface parameters."); retval = -1; } else { string query = string("SELECT ifIndex, ifName, ifIP, ifDescr, ifAlias, ifMAC, ifSpeed, nexthop FROM snmp_interface_cache WHERE dev_id=") + inttostr(info->device_id) + string(" AND ") + index + "='" + db_escape(value) + "'"; mysql_res = db_query(mysql, info, query); if (mysql_num_rows(mysql_res) > 0) { mysql_row = mysql_fetch_row(mysql_res); if ((mysql_row[0] != NULL) && (index != "ifIndex")) { info->parameters.push_front(ValuePair("ifIndex", mysql_row[0])); } if ((mysql_row[1] != NULL) && (index != "ifName")) { info->parameters.push_front(ValuePair("ifName", mysql_row[1])); } if ((mysql_row[2] != NULL) && (index != "ifIP")) { info->parameters.push_front(ValuePair("ifIP", mysql_row[2])); } if ((mysql_row[3] != NULL) && (index != "ifDescr")) { info->parameters.push_front(ValuePair("ifDescr", mysql_row[3])); } if ((mysql_row[4] != NULL) && (index != "ifAlias")) { info->parameters.push_front(ValuePair("ifAlias", mysql_row[4])); parse_fancy_alias(info, mysql_row[4]); } if ((mysql_row[5] != NULL) && (index != "ifMAC")) { info->parameters.push_front(ValuePair("ifMAC", mysql_row[5])); } if (mysql_row[6] != NULL) info->parameters.push_front(ValuePair("ifSpeed", mysql_row[6])); if (mysql_row[7] != NULL) info->parameters.push_front(ValuePair("nexthop", mysql_row[7])); } else { debuglogger(DEBUG_SUBDEVICE, LEVEL_WARNING, info, "Interface index not found."); retval = -2; } mysql_free_result(mysql_res); } return retval; } void parse_fancy_alias(DeviceInfo *info, string alias) { // see if the interface description looks parsible, and parse it. if (alias.find("(",0) != string::npos) { info->parameters.push_front(ValuePair("ifCktName", alias.substr(0, alias.find("(",0)))); info->parameters.push_front(ValuePair("ifCktID", alias.substr(alias.find("(",0) + 1, alias.length() - alias.find("(",0) - 2))); } else { info->parameters.push_front(ValuePair("ifCktName", alias)); info->parameters.push_front(ValuePair("ifCktID", "N/A")); } } int setup_disk_parameters(DeviceInfo *info, MYSQL *mysql) { // just like setup_interface_parameters, but for disks instead string index = ""; string value = ""; MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; int retval = 0; for (list::iterator current = info->parameters.begin(); current != info->parameters.end(); current++) { value = current->value; if (current->name == "dskIndex") { index = "disk_index"; break; } else if (current->name == "dskPath") { index = "disk_path"; break; } else if (current->name == "dskDevice") { index = "disk_device"; break; } } // end for each parameter if (index == "") { debuglogger(DEBUG_SUBDEVICE, LEVEL_WARNING, info, "Disk subdevice has no disk parameters."); retval = -1; } else { string query = string("SELECT disk_index, disk_path, disk_device FROM snmp_disk_cache WHERE dev_id=") + inttostr(info->device_id) + string(" AND ") + index + "='" + db_escape(value) + "'"; mysql_res = db_query(mysql, info, query); if (mysql_num_rows(mysql_res) > 0) { mysql_row = mysql_fetch_row(mysql_res); if ((mysql_row[0] != NULL) && (index != "disk_index")) { info->parameters.push_front(ValuePair("dskIndex", mysql_row[0])); } if ((mysql_row[1] != NULL) && (index != "disk_path")) { info->parameters.push_front(ValuePair("dskPath", mysql_row[1])); } if ((mysql_row[2] != NULL) && (index != "disk_device")) { info->parameters.push_front(ValuePair("dskDevice", mysql_row[2])); } } else { debuglogger(DEBUG_SUBDEVICE, LEVEL_WARNING, info, "Disk index not found."); retval = -2; } mysql_free_result(mysql_res); } return retval; } netmrg-0.20/src/db.cpp0000664000076400007640000000516410135324327015003 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * db.cpp * NetMRG Gatherer Database Library * * see doc/LICENSE for copyright information ********************************************/ #include "common.h" #include "db.h" #include "locks.h" #include "utils.h" #include "settings.h" // db_connect // // make a new MySQL connection to the NetMRG database int db_connect(MYSQL *connection) { const char * socket = NULL; if (get_setting(setDBSock) != "") { socket = get_setting(setDBSock).c_str(); } int port = 0; if (get_setting_int(setDBPort) > 0) { port = get_setting_int(setDBPort); } netmrg_mutex_lock(lkMySQL); mysql_init(connection); uint timeout = get_setting_int(setDBTimeout); mysql_options(connection, MYSQL_OPT_CONNECT_TIMEOUT, (const char *) &timeout); if (!(mysql_real_connect(connection, get_setting(setDBHost).c_str(), get_setting(setDBUser).c_str(), get_setting(setDBPass).c_str(), get_setting(setDBDB).c_str(), port, socket, 0))) { netmrg_mutex_unlock(lkMySQL); debuglogger(DEBUG_MYSQL, LEVEL_ERROR, NULL, "MySQL Connection Failure. (" + string(mysql_error(connection)) + ")"); return 0; } else { netmrg_mutex_unlock(lkMySQL); return 1; } } // db_query // // perform a MySQL query and return the results MYSQL_RES *db_query(MYSQL *mysql, const DeviceInfo *info, const string & query) { MYSQL_RES *mysql_res = NULL; if (mysql_query(mysql, query.c_str())) { debuglogger(DEBUG_MYSQL, LEVEL_ERROR, info, "MySQL Query Failed. (" + query + ") (" + mysql_error(mysql) + ")"); } else if (!(mysql_res = mysql_store_result(mysql))) { debuglogger(DEBUG_MYSQL, LEVEL_ERROR, info, "MySQL Store Result failed. (" + string(mysql_error(mysql)) + ")"); } else { debuglogger(DEBUG_MYSQL, LEVEL_DEBUG, info, "Mysql Query Succeeded. (" + query + ")"); } return mysql_res; } // db_update // // query the database, but disregard the results and log any failure void db_update(MYSQL *mysql, const DeviceInfo *info, const string & query) { if (mysql_query(mysql, query.c_str())) { debuglogger(DEBUG_MYSQL, LEVEL_ERROR, info, "MySQL Update Failed. (" + query + ") (" + mysql_error(mysql) + ")"); } else { debuglogger(DEBUG_MYSQL, LEVEL_DEBUG, info, "MySQL Update Succeeded. (" + query + ")"); } } // db_escape // // turn a string into one appropriate for inclusion in an SQL query string db_escape(const string & input) { char *raw_output = new char[input.length() * 2 + 1]; // mysql_real_escape avoided due to its requirement of a mysql connection mysql_escape_string(raw_output, input.c_str(), input.length()); string output = string(raw_output); delete [] raw_output; return output; } netmrg-0.20/src/settings.cpp0000664000076400007640000002015510303011532016237 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * settings.cpp * NetMRG Gatherer Settings Library * * see doc/LICENSE for copyright information ********************************************/ #include #include #include "settings.h" #include "locks.h" #include "utils.h" static string current_settings[settings_count]; string get_setting(Setting x) { netmrg_mutex_lock(lkSettings); string temp = current_settings[x]; netmrg_mutex_unlock(lkSettings); return temp; } long int get_setting_int(Setting x) { return strtoint(get_setting(x)); } void set_setting(Setting x, const string & newvalue) { netmrg_mutex_lock(lkSettings); current_settings[x] = newvalue; netmrg_mutex_unlock(lkSettings); } void set_setting_int(Setting x, long int newvalue) { set_setting(x, inttostr(newvalue)); } void load_settings_default() { // threads set_setting_int(setThreadCount, DEF_THREAD_COUNT); // database set_setting(setDBHost, DEF_DB_HOST); set_setting(setDBUser, DEF_DB_USER); set_setting(setDBPass, DEF_DB_PASS); set_setting(setDBDB, DEF_DB_DB); set_setting(setDBSock, DEF_DB_SOCK); set_setting_int(setDBPort, DEF_DB_PORT); set_setting_int(setDBTimeout, DEF_DB_TIMEOUT); // paths set_setting(setPathRRDTOOL, DEF_RRDTOOL); set_setting(setPathLockFile, DEF_LOCKFILE); set_setting(setPathRuntimeFile, DEF_RUNTIME_FILE); set_setting(setPathLibexec, DEF_LIBEXEC); set_setting(setPathRRDs, DEF_RRDS); set_setting(setPathLocale, DEF_LOCALE); // other set_setting_int(setPollInterval, DEF_POLL_INTERVAL); set_setting_int(setMaxDeviceLogEntries, DEF_MAX_DEV_LOG); set_setting(setSyslogFacility, DEF_SYSLOG_FACILITY); // update intl info setup_intl(); } void print_settings() { debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "-- Database --"); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Host: " + get_setting(setDBHost)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "User: " + get_setting(setDBUser)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Pass: " + get_setting(setDBPass)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "DB: " + get_setting(setDBDB)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Sock: " + get_setting(setDBSock)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Port: " + get_setting(setDBPort)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Timeout: " + get_setting(setDBTimeout)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "-- Threads --"); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Count: " + get_setting(setThreadCount)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "-- Paths --"); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "RRDTOOL: " + get_setting(setPathRRDTOOL)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Lock File: " + get_setting(setPathLockFile)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Runtime File: " + get_setting(setPathRuntimeFile)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Libexec: " + get_setting(setPathLibexec)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "RRDs: " + get_setting(setPathRRDs)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Locale: " + get_setting(setPathLocale)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "-- Other --"); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Poll Interval: " + get_setting(setPollInterval)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Max Dev Logs: " + get_setting(setMaxDeviceLogEntries)); debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, "Syslog Facility: " + get_setting(setSyslogFacility)); } string xmltostring(const xmlChar * input) { if (input == NULL) return string(""); char temp[1024]; snprintf(temp, 1023, "%s", input); return string(temp); } void parse_config_section(xmlDocPtr doc, xmlNodePtr cur, string section) { // parses a section of an already loaded config file xmlChar * value; string val_str; debuglogger(DEBUG_GLOBAL, LEVEL_DEBUG, NULL, (string)_("Parsing config section") + " '" + section + "'"); cur = cur->xmlChildrenNode; while (cur != NULL) { value = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); val_str = string(xmltostring(value)); if (section == "database") { if (!xmlStrcmp(cur->name, (const xmlChar *) "host")) set_setting(setDBHost, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "user")) set_setting(setDBUser, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "password")) set_setting(setDBPass, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "db")) set_setting(setDBDB, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "socket")) set_setting(setDBSock, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "port")) set_setting(setDBPort, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "timeout")) set_setting(setDBTimeout, val_str); } else if (section == "paths") { if (!xmlStrcmp(cur->name, (const xmlChar *) "rrdtool")) set_setting(setPathRRDTOOL, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "lockfile")) set_setting(setPathLockFile, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "runtimefile")) set_setting(setPathRuntimeFile, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "libexec")) set_setting(setPathLibexec, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "rrds")) set_setting(setPathRRDs, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "locale")) set_setting(setPathLocale, val_str); } else if (section == "threads") { if (!xmlStrcmp(cur->name, (const xmlChar *) "count")) set_setting(setThreadCount, val_str); } else if (section == "polling") { if (!xmlStrcmp(cur->name, (const xmlChar *) "interval")) set_setting(setPollInterval, val_str); } else if (section == "logging") { if (!xmlStrcmp(cur->name, (const xmlChar *) "max_device_entries")) set_setting(setMaxDeviceLogEntries, val_str); if (!xmlStrcmp(cur->name, (const xmlChar *) "syslog_facility")) set_setting(setSyslogFacility, val_str); } else debuglogger(DEBUG_GLOBAL, LEVEL_WARNING, NULL, (string)_("Second stage parser not aware of this section.")); xmlFree(value); cur = cur->next; } // end while not null } // end parse_config_section() void load_settings_file(const string & filename) { // parses xml-based config file xmlDocPtr doc; xmlNodePtr cur; doc = xmlParseFile(filename.c_str()); if (doc == NULL) { debuglogger(DEBUG_GLOBAL, LEVEL_ERROR, NULL, (string)_("Failed to parse configuration file") + " (" + filename + ")"); return; } cur = xmlDocGetRootElement(doc); if (cur == NULL) { debuglogger(DEBUG_GLOBAL, LEVEL_ERROR, NULL, (string)_("Empty configuration file") + " (" + filename + ")"); xmlFreeDoc(doc); return; } if (xmlStrcmp(cur->name, (const xmlChar *) "netmrg")) { debuglogger(DEBUG_GLOBAL, LEVEL_ERROR, NULL, (string)_("Configuration file of the wrong type. Root node is not 'netmrg.'") + " (" + filename + ")"); xmlFreeDoc(doc); return; } cur = cur->xmlChildrenNode; // read each section of the config file while (cur != NULL) { if ( !xmlStrcmp(cur->name, (const xmlChar *) "database") || !xmlStrcmp(cur->name, (const xmlChar *) "paths") || !xmlStrcmp(cur->name, (const xmlChar *) "threads") || !xmlStrcmp(cur->name, (const xmlChar *) "polling") || !xmlStrcmp(cur->name, (const xmlChar *) "logging") ) { parse_config_section(doc, cur, xmltostring(cur->name)); } else if ( !xmlStrcmp(cur->name, (const xmlChar *) "website") || !xmlStrcmp(cur->name, (const xmlChar *) "rrdtool") || !xmlStrcmp(cur->name, (const xmlChar *) "text") ) { // ignored sections } else debuglogger(DEBUG_GLOBAL, LEVEL_NOTICE, NULL, (string)_("Unexpected section in configuration file: ") + xmltostring(cur->name)); cur = cur->next; } xmlFreeDoc(doc); // settings may have changed, reset intl info to be safe setup_intl(); } // setup_intl - internationalization support void setup_intl() { // use language settings from the environment setlocale(LC_ALL, ""); // set the location of translation tables for the domain bindtextdomain("netmrg", get_setting(setPathLocale).c_str()); // select the domain textdomain("netmrg"); } netmrg-0.20/src/locks.cpp0000664000076400007640000000424310051467110015521 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * locks.cpp * NetMRG Gatherer Locks * * see doc/LICENSE for copyright information ********************************************/ #include "locks.h" #include "utils.h" // Create mutex locks static pthread_mutex_t active_threads_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t mysql_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t snmp_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t rrdtool_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t settings_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t pipe_lock = PTHREAD_MUTEX_INITIALIZER; // Create conditional variables static pthread_cond_t active_threads_cv = PTHREAD_COND_INITIALIZER; pthread_mutex_t* get_lock(Lock myLock) { switch (myLock) { case lkActiveThreads: return &active_threads_lock; case lkMySQL: return &mysql_lock; case lkSNMP: return &snmp_lock; case lkRRD: return &rrdtool_lock; case lkSettings: return &settings_lock; case lkPipe: return &pipe_lock; } return NULL; } pthread_cond_t* get_cond(Cond myCond) { switch (myCond) { case cActiveThreads: return &active_threads_cv; } return NULL; } string get_lock_name(Lock myLock) { switch (myLock) { case lkActiveThreads: return "ActiveThreads"; case lkMySQL: return "MySQL"; case lkSNMP: return "SNMP"; case lkRRD: return "RRD"; case lkSettings: return "Settings"; case lkPipe: return "Pipe"; } return ""; } void netmrg_mutex_lock(Lock myLock) { debuglogger(DEBUG_THREAD, LEVEL_DEBUG, NULL, "Locking " + get_lock_name(myLock)); pthread_mutex_lock(get_lock(myLock)); } void netmrg_mutex_unlock(Lock myLock) { debuglogger(DEBUG_THREAD, LEVEL_DEBUG, NULL, "Unlocking " + get_lock_name(myLock)); pthread_mutex_unlock(get_lock(myLock)); } int netmrg_mutex_trylock(Lock myLock) { debuglogger(DEBUG_THREAD, LEVEL_DEBUG, NULL, "Trying to lock " + get_lock_name(myLock)); return pthread_mutex_trylock(get_lock(myLock)); } void netmrg_cond_signal(Cond myCond) { pthread_cond_signal(get_cond(myCond)); } void netmrg_cond_wait(Cond myCond, Lock myLock) { pthread_cond_wait(get_cond(myCond), get_lock(myLock)); } netmrg-0.20/src/include/0000775000076400007640000000000011000016355015316 5ustar silfreedsilfreednetmrg-0.20/src/include/locks.h0000664000076400007640000000104410046570375016621 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * locks.h * NetMRG Gatherer Locks Header File * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_LOCKS #define NETMRG_LOCKS #include "common.h" enum Lock { lkActiveThreads, lkMySQL, lkSNMP, lkRRD, lkSettings, lkPipe }; enum Cond { cActiveThreads }; void netmrg_mutex_lock(Lock); void netmrg_mutex_unlock(Lock); int netmrg_mutex_trylock(Lock); void netmrg_cond_signal(Cond); void netmrg_cond_wait(Cond, Lock); #endif netmrg-0.20/src/include/mappings.h0000664000076400007640000000141710376624267017336 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * mappings.h * NetMRG Gatherer Mappings Library Header * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_MAPPINGS #define NETMRG_MAPPINGS #include "types.h" #include "db.h" // types enum IfMIBType { imtStandard, imtCatOS, imtOldCiscoSwitch, imtOldCiscoRouter, imtFSM726 }; // caching functions void do_snmp_interface_recache(DeviceInfo *info, MYSQL *mysql); void do_snmp_disk_recache(DeviceInfo *info, MYSQL *mysql); // parameter setup functions int setup_interface_parameters(DeviceInfo *info, MYSQL *mysql); int setup_disk_parameters(DeviceInfo *info, MYSQL *mysql); // misc functions void parse_fancy_alias(DeviceInfo *info, string alias); #endif netmrg-0.20/src/include/utils.h0000664000076400007640000000655410521740213016645 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * utils.h * NetMRG Gatherer Utilities Library Header * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_UTILS #define NETMRG_UTILS #include "common.h" #include "types.h" #include "db.h" #include #include using std::string; // NetMRG Components const int DEBUG_GLOBAL = 1; const int DEBUG_THREAD = 2; const int DEBUG_DEVICE = 4; const int DEBUG_SUBDEVICE = 8; const int DEBUG_MONITOR = 16; const int DEBUG_EVENT = 32; const int DEBUG_RESPONSE = 64; const int DEBUG_RRD = 128; const int DEBUG_SNMP = 256; const int DEBUG_GATHERER = 512; const int DEBUG_MYSQL = 1024; const int DEBUG_LOGGING = 2048; const int DEBUG_FILELINE = 4096; const int DEBUG_FUNCTION = 8192; const int DEBUG_PROPERTY = 16384; const int DEBUG_ALL = 32767; const int DEBUG_MOST = DEBUG_ALL; const int DEBUG_DEFAULT = DEBUG_ALL; // Logging Levels (see syslog(3) manpage for definitions) const int LEVEL_EMERG = 1; const int LEVEL_ALERT = 2; const int LEVEL_CRITICAL = 4; // this is the worst condition currently used const int LEVEL_ERROR = 8; const int LEVEL_WARNING = 16; const int LEVEL_NOTICE = 32; const int LEVEL_INFO = 64; const int LEVEL_DEBUG = 128; const int LEVEL_ALL = 255; const int LEVEL_MOST = 127; const int LEVEL_DEFAULT = 63; // Logging Output Modes const int LOG_METHOD_STDOUT = 1; const int LOG_METHOD_SYSLOG = 2; const int LOG_METHOD_VT100 = 4; // Terminal Constants const char ESC = 0x1b; const int ATTR_RESET = 0; const int ATTR_BRIGHT = 1; const int ATTR_DIM = 2; const int ATTR_UNDER = 4; const int ATTR_BLINK = 5; const int ATTR_REVER = 7; const int ATTR_HIDDEN = 8; const int COLOR_BLACK = 30; const int COLOR_RED = 31; const int COLOR_GREEN = 32; const int COLOR_BROWN = 33; const int COLOR_BLUE = 34; const int COLOR_MAGENTA = 35; const int COLOR_CYAN = 36; const int COLOR_WHITE = 37; // terminal functions bool vt100_compatible(); // general functions int file_exists(string filename); string remove_surrounding_quotes(string input); string strstripnl(string input); string token_replace(string &source, string token, string value); u_char *u_string(string source, u_char *out); string inttostr(long long int int_to_convert); string timetostr(const time_t timestamp); long long int strtoint(string string_to_convert); string inttopadstr(int integer, int padlen); string count_file_lines(DeviceInfo info); string read_value_from_file(DeviceInfo info); void U_to_NULL(string & input); uint worstof(uint a, uint b); string format_time_elapsed(long long int num_secs); string remove_nonnumerics(string input); double strtodec(string input); // debugging functions void init_logging(); int get_debug_level(); void set_debug_level(int level); int get_debug_components(); void set_debug_components(int components); bool get_debug_safety(); void set_debug_safety(bool safety); void set_log_method(int method); int get_log_method(); string censor_message(const string & message); string remove_braces(const string & message); #define debuglogger(a,b,c,d) __debuglogger(a, b, __FILE__, __LINE__, __FUNCTION__, c, d) void __debuglogger(int component, int level, const char * file, int line, const char * function, const DeviceInfo *, const string & message); #endif netmrg-0.20/src/include/common.h0000664000076400007640000000122710204564342016772 0ustar silfreedsilfreed#ifndef NETMRG_COMMON_H #define NETMRG_COMMON_H 1 #include #if HAVE_CONFIG_H # include "config.h" #endif #include #if HAVE_UNISTD_H # include # include #endif #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include #if !HAVE_MEMMOVE # define memmove(d, s, n) memcpy ((d), (s), (n)) #endif #if HAVE_NETINET_IN_H # include #endif #include "gettext.h" #define _(String) gettext(String) #if HAVE_SYS_WAIT_H # include #endif #endif /* NETMRG_COMMON_H */ netmrg-0.20/src/include/events.h0000664000076400007640000000121110130375750017000 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * events.h * NetMRG Gatherer Events Header File * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_EVENTS #define NETMRG_EVENTS #include "types.h" #include "db.h" uint process_events(DeviceInfo info, MYSQL *mysql); uint process_event(DeviceInfo info, MYSQL *mysql, int trigger_type, int last_status, int situation, long int last_triggered, string name); uint process_condition(DeviceInfo info, long long int compare_value, int value_type, int condition); void process_responses(DeviceInfo info, MYSQL *mysql); #endif netmrg-0.20/src/include/settings.h0000664000076400007640000000174310157157500017346 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * settings.h * NetMRG Gatherer Settings Library Header * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_SETTINGS #define NETMRG_SETTINGS #include "types.h" using std::string; const int settings_count = 17; enum Setting { setDBHost, setDBUser, setDBPass, setDBDB, setDBSock, setDBPort, setThreadCount, setPathRRDTOOL, setPathLockFile, setPathRuntimeFile, setPathLibexec, setPathLocale, setPathRRDs, setPollInterval, setMaxDeviceLogEntries, setSyslogFacility, setDBTimeout }; // functions to set and get settings string get_setting(Setting); long int get_setting_int(Setting); void set_setting(Setting, const string &); void set_setting_int(Setting, long int); // functions to load settings void load_settings_default(); void load_settings_file(const string & filename); // other functions void print_settings(); void setup_intl(); #endif netmrg-0.20/src/include/netmrg.h.in0000664000076400007640000000254010772570211017404 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * config.h * Gatherer Configuration Header File * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_CONFIG #define NETMRG_CONFIG #ifdef __linux__ #define _PTHREADS #define _P __P #endif #define NETMRG_VERSION "@PACKAGE_VERSION@" // The remaining options are the default values // used if not overridden on the command line or config file. // Paths #define DEF_CONFIG_FILE "@sysconfdir@/netmrg.xml" #define DEF_LOCKFILE "@localstatedir@/log/netmrg/lockfile" #define DEF_RUNTIME_FILE "@localstatedir@/log/netmrg/runtime" #define DEF_RRDTOOL "@RRDTOOL@" #define DEF_RRDS "@localstatedir@/lib/netmrg/rrd" #define DEF_LIBEXEC "@libexecdir@/netmrg/" #define DEF_LOCALE "@datarootdir@/netmrg/locale" // Threading #define DEF_THREAD_COUNT 5 // number of simultaneous threads // Database Credentials #define DEF_DB_HOST "localhost" #define DEF_DB_USER "netmrgwrite" #define DEF_DB_PASS "netmrgwrite" #define DEF_DB_DB "netmrg" #define DEF_DB_SOCK "" #define DEF_DB_PORT 0 #define DEF_DB_TIMEOUT 10 // Other #define DEF_POLL_INTERVAL 300 #define DEF_MAX_DEV_LOG 500 #define DEF_SYSLOG_FACILITY "LOG_DAEMON" #endif netmrg-0.20/src/include/config.h.in0000664000076400007640000000765410772570211017370 0ustar silfreedsilfreed/* src/include/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the header file. */ #undef HAVE_CSTDIO /* Define to 1 if you have the header file. */ #undef HAVE_CSTDLIB /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define if you have the iconv() function. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the `intl' library (-lintl). */ #undef HAVE_LIBINTL /* Define to 1 if you have the `snmp' library (-lsnmp). */ #undef HAVE_LIBSNMP /* Define to 1 if you have the `stdc++' library (-lstdc++). */ #undef HAVE_LIBSTDC__ /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_LIST /* Define to 1 if you have the `llround' function. */ #undef HAVE_LLROUND /* scanf supports long long */ #undef HAVE_LONG_LONG_SCANF /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Net-SNMP Version */ #undef HAVE_NET_SNMP /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Old MySQL version */ #undef OLD_MYSQL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned int' if does not define. */ #undef size_t netmrg-0.20/src/include/db.h0000664000076400007640000000106110004763733016066 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * db.h * NetMRG Gatherer Database Library Header * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_DB #define NETMRG_DB #include "common.h" #include "types.h" #include int db_connect(MYSQL *connection); MYSQL_RES * db_query(MYSQL *mysql, const DeviceInfo *info, const string & query); void db_update(MYSQL *mysql, const DeviceInfo *info, const string & query); string db_escape(const string & input); #endif netmrg-0.20/src/include/devices.h0000664000076400007640000000105510522144106017116 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * devices.h * NetMRG Gatherer Devices Library Header * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_DEVICES #define NETMRG_DEVICES #include "types.h" #include "db.h" // Device processing void process_device(int dev_id); void do_properties_recache(DeviceInfo info, MYSQL *mysql); // Sub-device processing uint process_sub_devices(DeviceInfo info, MYSQL *mysql); uint process_sub_device(DeviceInfo info, MYSQL *mysql); #endif netmrg-0.20/src/include/types.h0000664000076400007640000000535710522722116016654 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * types.h * NetMRG Data Structures * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_TYPES #define NETMRG_TYPES #include "common.h" #include #include using std::string; using std::list; // ValuePair // // Used to store a name and value for a parameter used in // to expand parameters beforing being passed to external // scripts or used as part of a query. struct ValuePair { string name; string value; ValuePair(string setname, string setvalue) { name = setname; value = setvalue; } }; // DeviceInfo // // Used to provide any subroutine working on a device or // a component of one with all information necessary. // This allows the information to be added to in only this // location and where it is needed, not as a parameter // in all interim functions. struct DeviceInfo { int device_id; int property_id; int subdevice_id; int monitor_id; int event_id; int response_id; uint status; void * mysql; void * snmp_sess_p; uint snmp_avoid; uint snmp_recache; uint snmp_ifnumber; uint counter_unknowns; long long int snmp_uptime; uint device_type; uint subdevice_type; int test_type; int test_id; string name; string ip; string subdevice_name; string test_params; string curr_val; string last_val; string delta_val; string rate_val; long long int delta_time; unsigned short snmp_version; string snmp_read_community; unsigned long snmp_timeout; unsigned int snmp_retries; unsigned short snmp_port; list parameters; DeviceInfo() { device_id = -1; property_id = -1; subdevice_id = -1; monitor_id = -1; event_id = -1; response_id = -1; status = 0; mysql = NULL; snmp_avoid = 0; snmp_recache = 0; snmp_ifnumber = 0; snmp_uptime = 0; counter_unknowns= 0; subdevice_type = 0; test_type = -1; test_id = -1; //test_params = ""; delta_time = 0; curr_val = "U"; last_val = "U"; delta_val = "U"; rate_val = "U"; snmp_version = 0; snmp_timeout = 1000000; snmp_retries = 4; snmp_port = 161; snmp_sess_p = NULL; } }; // RRDInfo // // Provides the information needed for creating // or updating an RRD file. struct RRDInfo { string max_val; string min_val; int tuned; string value; string data_type; RRDInfo() { max_val = "U"; min_val = "U"; tuned = 0; data_type = ""; } }; // SNMPPair // essentially the same as ValuePair, but for // oid/value pairs needed for SNMP walks struct SNMPPair { string oid; string value; SNMPPair(string setoid, string setvalue) { oid = setoid; value = setvalue; } }; // Schedule enum ScheduleType { schOnce, schWait }; #endif netmrg-0.20/src/include/gettext.h0000664000076400007640000000575110157157500017175 0ustar silfreedsilfreed/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String #endif /* _LIBGETTEXT_H */ netmrg-0.20/src/include/snmp.h0000664000076400007640000000145607730216415016470 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * snmp.h * NetMRG Gatherer SNMP Library Header * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_SNMP #define NETMRG_SNMP #include "common.h" #include "types.h" #include #include void snmp_init(); void snmp_cleanup(); void snmp_session_init(DeviceInfo & info); void snmp_session_cleanup(DeviceInfo & info); string snmp_get(DeviceInfo info, string oidstring); string snmp_diff(DeviceInfo info, string oid1, string oid2); list snmp_trim_rootoid(list input, string rootoid); list snmp_swap_index_value(list input); list snmp_walk(DeviceInfo info, string oidstring); long long int get_snmp_uptime(DeviceInfo info); #endif netmrg-0.20/src/include/monitors.h0000664000076400007640000000165310357050352017357 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * monitors.h * NetMRG Gatherer Monitors Library Header * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_MONITORS #define NETMRG_MONITORS #include "types.h" #include "db.h" // global monitor processing uint process_monitor(DeviceInfo info, MYSQL *mysql, RRDInfo rrd); // processing for specific monitor types string process_internal_monitor(DeviceInfo info, MYSQL *mysql); string process_sql_monitor(DeviceInfo info, MYSQL *mysql); string process_script_monitor(DeviceInfo info, MYSQL *mysql); string process_snmp_monitor(DeviceInfo info, MYSQL *mysql); // support functions void update_monitor_db(DeviceInfo info, MYSQL *mysql, RRDInfo rrd); string expand_parameters(DeviceInfo &info, string input); void params_to_env(DeviceInfo &info, char ** &env); void free_env(DeviceInfo &info, char ** &env); #endif netmrg-0.20/src/include/rrd.h0000664000076400007640000000160007656016503016274 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * rrd.h * NetMRG Gatherer RRDTOOL integration * * see doc/LICENSE for copyright information ********************************************/ #ifndef NETMRG_RRD #define NETMRG_RRD #include "types.h" #include // create a connection to RRD void rrd_init(); // clean up connection to RRD void rrd_cleanup(); // send a string to RRDTOOL void rrd_cmd(DeviceInfo info, string cmd); // returns the file name for the .rrd file string get_rrd_file(string mon_id); // creates a new rrd file void create_rrd(DeviceInfo info, RRDInfo rrd); // alters the parameters of an rrd file void tune_rrd(DeviceInfo info, RRDInfo rrd); // updates the data in an rrd file void update_rrd(DeviceInfo info, RRDInfo rrd); // create, update, and/or tune an rrd file as needed void update_monitor_rrd(DeviceInfo info, RRDInfo rrd); #endif netmrg-0.20/src/utils.cpp0000664000076400007640000003261610772576215015574 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * utils.cpp * NetMRG Gatherer Utilities Library * * see doc/LICENSE for copyright information ********************************************/ #include #include #include #include #include #include #include "utils.h" #include "db.h" #include "settings.h" // vt100_compatible // // returns true if our terminal seems to be VT100 compatible bool vt100_compatible() { if (!isatty(STDOUT_FILENO)) return false; char *term = getenv("TERM"); if (!term) return false; if (!strncasecmp(term, "linux", 5)) return true; if (!strncasecmp(term, "xterm", 5)) return true; if (!strncasecmp(term, "vt", 2)) return true; return false; } // file_exists // // evaluates to true if filename specifies an existing file int file_exists(string filename) { struct stat file_stat; return !(stat(filename.c_str(), &file_stat)); } // remove_surrounding_quotes - removes leading and trailing quotes, if present string remove_surrounding_quotes(string input) { if (input[0] == '"') input.erase(0,1); if (input[input.length() - 1] == '"') input.erase(input.length() - 1, 1); return input; } // strstripnl - given a string, return a string without new line at the end string strstripnl(string input) { string temp_str; if (input[input.length() - 1] == '\n') { temp_str = input.substr(0, input.length() - 1); } else { temp_str = input; } return temp_str; } // end strstripnl // token_replace - replace a token with a value throughout a string string token_replace(string &source, string token, string value) { string::size_type i; while ((i = source.find(token)) != string::npos) { source.replace(i, token.length(), value); } return source; } // u_string - cast a string into a u_char array u_char *u_string(string source, u_char *out) { return (unsigned char *)source.c_str(); } // formatting functions // inttostr - converts an integer to a string string inttostr(long long int int_to_convert) { char temp_str[100]; snprintf(temp_str, 100, "%lld", int_to_convert); return string(temp_str); } // end inttostr // strtoint - converts a string to an integer long long int strtoint(string string_to_convert) { return strtoll(string_to_convert.c_str(), NULL, 10); } // end strtoint // timetostr - converts a unix timestamp to a nice format string timetostr(const time_t timestamp) { struct tm atm; char tempstr[255]; localtime_r(×tamp, &atm); strftime(tempstr, 255, "%F %T", &atm); return string(tempstr); } // inttopadstr - converts a string to an integer, adding 0s to pad to a given length string inttopadstr(int integer, int padlen) { char tempstr[255]; string format = string("%0") + inttostr(padlen) + string("d"); snprintf(tempstr, 255, format.c_str(), integer); return string(tempstr); } // end inttopadstr // debuglogger - NetMRG's version of syslog // Debugging Options static int debug_components = DEBUG_DEFAULT; static int debug_level = LEVEL_DEFAULT; static int log_method = LOG_METHOD_STDOUT; static int syslog_facility = LOG_DAEMON; static bool debug_safety = false; // Debugging Options Manipulations void set_debug_level(int level) { debug_level = level; } int get_debug_level() { return debug_level; } void set_debug_components(int components) { debug_components = components; } int get_debug_components() { return debug_components; } void set_debug_safety(bool safety) { debug_safety = safety; } bool get_debug_safety() { return debug_safety; } void set_log_method(int method) { log_method = method; } int get_log_method() { return log_method; } int text_to_facility(string facility) { if (facility == "LOG_KERN") return LOG_KERN; else if (facility == "LOG_USER") return LOG_USER; else if (facility == "LOG_MAIL") return LOG_MAIL; else if (facility == "LOG_DAEMON") return LOG_DAEMON; else if (facility == "LOG_AUTH") return LOG_AUTH; else if (facility == "LOG_SYSLOG") return LOG_SYSLOG; else if (facility == "LOG_LPR") return LOG_LPR; else if (facility == "LOG_NEWS") return LOG_NEWS; else if (facility == "LOG_UUCP") return LOG_UUCP; else if (facility == "LOG_CRON") return LOG_CRON; // these are not universally available // until we autoconf this, uncomment to restore /* else if (facility == "LOG_AUTHPRIV") return LOG_AUTHPRIV; else if (facility == "LOG_FTP") return LOG_FTP;*/ else if (facility == "LOG_LOCAL0") return LOG_LOCAL0; else if (facility == "LOG_LOCAL1") return LOG_LOCAL1; else if (facility == "LOG_LOCAL2") return LOG_LOCAL2; else if (facility == "LOG_LOCAL3") return LOG_LOCAL3; else if (facility == "LOG_LOCAL4") return LOG_LOCAL4; else if (facility == "LOG_LOCAL5") return LOG_LOCAL5; else if (facility == "LOG_LOCAL6") return LOG_LOCAL6; else if (facility == "LOG_LOCAL7") return LOG_LOCAL7; else return LOG_USER; } // init_logging void init_logging() { if ( (log_method & LOG_METHOD_STDOUT) || (log_method & LOG_METHOD_VT100) ) setlinebuf(stdout); if ( log_method & LOG_METHOD_SYSLOG ) syslog_facility = text_to_facility(get_setting(setSyslogFacility)); } int level_to_priority(int level) { switch (level) { case LEVEL_EMERG: return LOG_EMERG; case LEVEL_ALERT: return LOG_ALERT; case LEVEL_CRITICAL: return LOG_CRIT; case LEVEL_ERROR: return LOG_ERR; case LEVEL_WARNING: return LOG_WARNING; case LEVEL_NOTICE: return LOG_NOTICE; case LEVEL_INFO: return LOG_INFO; case LEVEL_DEBUG: return LOG_DEBUG; default: return LOG_INFO; } } int level_to_color(int level) { switch (level) { case LEVEL_EMERG: return COLOR_MAGENTA; case LEVEL_ALERT: return COLOR_RED; case LEVEL_CRITICAL: return COLOR_RED; case LEVEL_ERROR: return COLOR_BROWN; case LEVEL_WARNING: return COLOR_BROWN; case LEVEL_NOTICE: return COLOR_CYAN; case LEVEL_INFO: return COLOR_WHITE; case LEVEL_DEBUG: return COLOR_GREEN; default: return COLOR_WHITE; } } int level_to_attrib(int level) { switch (level) { case LEVEL_EMERG: return ATTR_BRIGHT; case LEVEL_ALERT: return ATTR_BRIGHT; case LEVEL_ERROR: return ATTR_BRIGHT; case LEVEL_NOTICE: return ATTR_DIM; case LEVEL_INFO: return ATTR_RESET; default: return ATTR_RESET; } } // censor_message - replace the contents of braces with a 'Field Omitted' message string censor_message(const string & message) { string tempmsg = string(message); string::size_type pos; while ((pos = tempmsg.find("{")) != string::npos) { tempmsg.replace(pos, tempmsg.find("}") - pos + 1, ""); } return tempmsg; } // end censor_message // remove_braces - erase braces from a string string remove_braces(const string & message) { string tempmsg = string(message); string::size_type pos; while ((pos = tempmsg.find("{")) != string::npos) { tempmsg.erase(pos, 1); } while ((pos = tempmsg.find("}")) != string::npos) { tempmsg.erase(pos, 1); } return tempmsg; } // end remove_braces // debuglogger // // component - the sum of the components this message pertains to // level - the sum of the levels this message pertains to // file, line, // function - provided by the LEVEL_* macros // info - the DeviceInfo struct, used to display the context of the message // message - the message, sensitive information enclosed in braces will be censored when desired // void __debuglogger(int component, int level, const char * file, int line, const char * function, const DeviceInfo * info, const string & message) { // only proceed if this message is qualified for display if ((debug_level & level) && (debug_components & component)) { string tempmsg = ""; // debug the debugging information if ((debug_level & LEVEL_DEBUG) && (debug_components & DEBUG_LOGGING)) { tempmsg = tempmsg + string("[L: ") + inttopadstr(level, 4) + ", C: " + inttopadstr(component, 4) + "] "; } // display context information if (info != NULL) { if (info->device_id != -1) { tempmsg = tempmsg + string("[Dev: ") + inttopadstr(info->device_id, 4) + string("] "); } if (info->property_id != -1) { tempmsg = tempmsg + string("[Pro: ") + inttopadstr(info->property_id, 4) + string("] "); } if (info->subdevice_id != -1) { tempmsg = tempmsg + string("[Sub: ") + inttopadstr(info->subdevice_id, 4) + string("] "); } if (info->monitor_id != -1) { tempmsg = tempmsg + string("[Mon: ") + inttopadstr(info->monitor_id, 4) + string("] "); } if (info->event_id != -1) { tempmsg = tempmsg + string("[Ev: ") + inttopadstr(info->event_id, 4) + string("] "); } if (info->response_id != -1) { tempmsg = tempmsg + string("[Resp: ") + inttopadstr(info->response_id, 4) + string("] "); } } // end display context information string context = tempmsg; string fullmessage; string content; // censor or remove censoring data as appropriate if (debug_safety) { content = censor_message(message); } else { content = remove_braces(message); } if ( (debug_components & DEBUG_FILELINE) || (debug_components & DEBUG_FUNCTION) ) context = context + "["; if (debug_components & DEBUG_FILELINE) context = context + file + "(" + inttostr(line) + ")"; if (debug_components & DEBUG_FUNCTION) context = context + ":" + function; if ( (debug_components & DEBUG_FILELINE) || (debug_components & DEBUG_FUNCTION) ) context = context + "] "; fullmessage = context + content; if (log_method & LOG_METHOD_STDOUT) printf("%s\n", fullmessage.c_str()); // print the formatted message in color if (log_method & LOG_METHOD_VT100) printf("%c[%d;%dm%s%c[%d;%dm%s\n%c[%dm", ESC, ATTR_BRIGHT, COLOR_BLACK, context.c_str(), ESC, level_to_attrib(level), level_to_color(level), content.c_str(), ESC, ATTR_RESET); // syslog the message if (log_method & LOG_METHOD_SYSLOG) syslog(level_to_priority(level) | syslog_facility, "%s", fullmessage.c_str()); } // log message to database, if possible, and if important enough if (info && info->mysql && (level < LEVEL_INFO)) { string device, subdevice, monitor; if (info->device_id == -1) device = "NULL"; else device = inttostr(info->device_id); if (info->subdevice_id == -1) subdevice = "NULL"; else subdevice = inttostr(info->subdevice_id); if (info->monitor_id == -1) monitor = "NULL"; else monitor = inttostr(info->monitor_id); db_update((MYSQL *) info->mysql, NULL, string("INSERT INTO log SET date=NOW(), dev_id=") + device + ", subdev_id=" + subdevice + ", mon_id=" + monitor + ", level=" + inttostr(level) + ", component=" + inttostr(component) + ", message = '" + db_escape(remove_braces(message)) + "'"); } } // end debuglogger // count_file_lines string count_file_lines(DeviceInfo info) { FILE *fhandle; char ach; int linecount = 0; if (file_exists(info.test_params)) { fhandle = fopen((info.test_params).c_str(), "r"); if (fhandle != NULL) { while ((ach = fgetc(fhandle)) != EOF) { if (ach == '\n') { linecount++; } } fclose(fhandle); } else { debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Internal Test: Line Count: Unable to read file (" + info.test_params + ")"); return "U"; } } else { debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Internal Test: Line Count: File does not exist (" + info.test_params + ")"); return "U"; } return inttostr(linecount); } // read value from file string read_value_from_file(DeviceInfo info) { FILE *fhandle; char ach; string buffer = ""; int charcount = 0; if (file_exists(info.test_params)) { fhandle = fopen((info.test_params).c_str(), "r"); if (fhandle != NULL) { while (isdigit(ach = fgetc(fhandle)) && (charcount <= 20)) { buffer += ach; charcount++; } fclose(fhandle); if (charcount > 20) { debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Internal Test: Read Value from File: Value over 20 digits; ignoring."); return "U"; } if (buffer == "") return "U"; } else { debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Internal Test: Read Value from File: Unable to read file (" + info.test_params + ")"); return "U"; } } else { debuglogger(DEBUG_MONITOR, LEVEL_WARNING, &info, "Internal Test: Read Value from File: File does not exist (" + info.test_params + ")"); return "U"; } return buffer; } void U_to_NULL(string & input) { if (input == "U") { input = "NULL"; } else { input = string("'") + db_escape(input) + string("'"); } } uint worstof(uint a, uint b) { return (a > b) ? a : b; } string format_time_elapsed(long long int num_secs) { char temp[80]; string temp1 = ""; // Makes a string from a 'seconds elapsed' integer long long int the_secs = num_secs; long long int new_secs = num_secs % 86400; int days = (num_secs - new_secs) / 86400; num_secs = new_secs; new_secs = num_secs % 3600; long long int hours = (num_secs - new_secs) / 3600; num_secs = new_secs; new_secs = num_secs % 60; long long int mins = (num_secs - new_secs) / 60; if (the_secs > 0) { if (days > 0) { temp1 = inttostr(days) + " days, "; } snprintf(temp, 80, "%02lld:%02lld:%02lld", hours, mins, new_secs); return temp1 + string(temp); } else { return "Zilch"; } } // end format_time_elapsed string remove_nonnumerics(string input) { string temp; for (string::size_type pos = 0; pos < input.length(); pos++) { if (isdigit(input[pos]) || (input[pos] == '.') || (input[pos] == '-') || (input[pos] == 'U')) temp += input[pos]; } return temp; } double strtodec(string input) { return strtod(input.c_str(), NULL); } netmrg-0.20/src/snmp.cpp0000664000076400007640000002303610447570244015400 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * snmp.cpp * NetMRG Gatherer SNMP Library * * see doc/LICENSE for copyright information ********************************************/ /* NetMRG SNMP Functions Copyright 2001-2003 Brady Alleman, All Rights Reserved. Some of this code was originally part of net-snmp's application and example code. */ #include "utils.h" #include "locks.h" #include "snmp.h" #ifdef HAVE_NET_SNMP #include #include #include #include #define SNMP_SET_OIDS netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, NETSNMP_OID_OUTPUT_NUMERIC) #define SNMP_SET_LIBS netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM, 1) #define SNMP_SET_QKPR netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICK_PRINT, 0) #else #define DS_APP_DONT_FIX_PDUS 0 #include #include #include #include #define SNMP_SET_OIDS ds_toggle_boolean(DS_LIBRARY_ID, DS_LIB_PRINT_NUMERIC_OIDS) #define SNMP_SET_LIBS ds_toggle_boolean(DS_LIBRARY_ID, DS_LIB_PRINT_NUMERIC_ENUM) #define SNMP_SET_QKPR snmp_set_quick_print(0) #endif void snmp_init() { debuglogger(DEBUG_GLOBAL + DEBUG_SNMP, LEVEL_INFO, NULL, "Initializing SNMP library."); init_snmp("NetMRG"); SOCK_STARTUP; struct snmp_session session; snmp_sess_init(&session); SNMP_SET_OIDS; SNMP_SET_LIBS; SNMP_SET_QKPR; } void snmp_cleanup() { SOCK_CLEANUP; debuglogger(DEBUG_GLOBAL + DEBUG_SNMP, LEVEL_INFO, NULL, "Cleaned up SNMP."); } string snmp_value(string input) { input = input.erase(0, input.find(":",0) + 1); input = input.erase(0, input.find("=",0) + 1); while (!input.empty() && input[0] == ' ') { input = input.erase(0, 1); } while (!input.empty() && input[input.length() -1] == ' ') { input = input.erase(input.length() - 1, input.length()); } //input = token_replace(input, " ", ""); // handle an "empty" SNMPv2 response. input = token_replace(input, "No Such Object available on this agent at this OID", ""); return input; } string snmp_oid(string input) { input = input.erase(input.find(" ",0), input.length()); return input; } string snmp_result(variable_list *vars) { u_char *buf = NULL; size_t buf_len = 256, out_len = 0; buf = (u_char *) calloc(buf_len, 1); sprint_realloc_variable(&buf, &buf_len, &out_len, 1, vars->name, vars->name_length, vars); string result = (char *)buf; free(buf); return result; } void snmp_session_init(DeviceInfo &info) { struct snmp_session session; u_char u_temp[250]; char temp[250]; void * sessp; debuglogger(DEBUG_SNMP, LEVEL_DEBUG, &info, "Starting SNMP Session."); // initialize session structure snmp_sess_init(&session); // set hostname or IP address (and port) snprintf(temp, 250, "%s:%d", info.ip.c_str(), info.snmp_port); session.peername = temp; // set the SNMP version number switch (info.snmp_version) { case 1: session.version = SNMP_VERSION_1; debuglogger(DEBUG_SNMP, LEVEL_DEBUG, &info, "SNMPv1"); break; case 2: session.version = SNMP_VERSION_2c; debuglogger(DEBUG_SNMP, LEVEL_DEBUG, &info, "SNMPv2c"); break; case 3: session.version = SNMP_VERSION_3; debuglogger(DEBUG_SNMP, LEVEL_ERROR, &info, "SNMPv3 - not yet supported."); break; } // set timeout/retry parameters session.timeout = info.snmp_timeout; session.retries = info.snmp_retries; char log[255]; snprintf(log, 255, "Port: %d; Timeout: %ld; Retries: %d.", info.snmp_port, info.snmp_timeout, info.snmp_retries); debuglogger(DEBUG_SNMP, LEVEL_DEBUG, &info, log); // set the SNMPv1/2c community name used for authentication session.community = u_string(info.snmp_read_community, u_temp); session.community_len = info.snmp_read_community.length(); netmrg_mutex_lock(lkSNMP); sessp = snmp_sess_open(&session); netmrg_mutex_unlock(lkSNMP); if (!sessp) { debuglogger(DEBUG_SNMP, LEVEL_ERROR, &info, "SNMP Session Error."); } else { info.snmp_sess_p = sessp; } } void snmp_session_cleanup(DeviceInfo &info) { debuglogger(DEBUG_SNMP, LEVEL_DEBUG, &info, "Cleaning up SNMP Session."); snmp_sess_close(info.snmp_sess_p); info.snmp_sess_p = NULL; } // snmp_get - perform an snmpget on a host using the provided information string snmp_get(DeviceInfo info, string oidstring) { struct snmp_pdu *pdu; struct snmp_pdu *response; oid anOID[MAX_OID_LEN]; size_t anOID_len = MAX_OID_LEN; struct variable_list *vars; int status; string result; char tempname[128]; debuglogger(DEBUG_SNMP, LEVEL_DEBUG, &info, "SNMP Query ({'" + info.ip + "'}, {'" + info.snmp_read_community + "'}, '" + oidstring + "')"); if (!info.snmp_sess_p) { debuglogger(DEBUG_SNMP, LEVEL_ERROR, &info, "SNMP Session Failure."); return string("U"); } else { // Create the PDU for the data for our request. pdu = snmp_pdu_create(SNMP_MSG_GET); strcpy(tempname, oidstring.c_str()); if (!snmp_parse_oid(tempname, anOID, &anOID_len)) { return(string("U")); } else snmp_add_null_var(pdu, anOID, anOID_len); status = snmp_sess_synch_response(info.snmp_sess_p, pdu, &response); if (response == NULL) status = STAT_ERROR; /* * Process the response. */ if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR) { vars = response->variables; if (vars->type == SNMP_NOSUCHINSTANCE || vars->type == SNMP_NOSUCHOBJECT || vars->type == SNMP_ENDOFMIBVIEW) { result = string("U"); } else { result = snmp_result(vars); result = snmp_value(result); } } else { result = string("U"); } if (response) snmp_free_pdu(response); if (result.length() == 0) { result = "U"; } return result; } } string snmp_diff(DeviceInfo info, string oid1, string oid2) { string val1 = snmp_get(info, oid1); string val2 = snmp_get(info, oid2); if ( (val1 == "U") || (val2 == "U") ) { return "U"; } return inttostr( strtoint(val1) - strtoint(val2) ); } list snmp_trim_rootoid(list input, string rootoid) { for (list::iterator current = input.begin(); current != input.end(); current++) { current->oid = token_replace(current->oid, rootoid, ""); } return input; } list snmp_swap_index_value(list input) { for (list::iterator current = input.begin(); current != input.end(); current++) { string oid = current->oid; string value = current->value; current->oid = value; current->value = oid; } return input; } list snmp_walk(DeviceInfo info, string oidstring) { struct snmp_pdu *pdu, *response; variable_list *vars; oid name[MAX_OID_LEN]; size_t name_length = MAX_OID_LEN; oid root[MAX_OID_LEN]; size_t rootlen = MAX_OID_LEN; int running; int status; int check = 0; int exitval = 0; list results; if (!info.snmp_sess_p) { debuglogger(DEBUG_SNMP, LEVEL_ERROR, &info, "SNMP Session Failure."); } char tempoid[128]; strcpy(tempoid, oidstring.c_str()); if (!snmp_parse_oid(tempoid, root, &rootlen)) { debuglogger(DEBUG_SNMP, LEVEL_ERROR, &info, string("SNMP OID Parse Failure (") + tempoid + ")"); } memmove(name, root, rootlen * sizeof(oid)); name_length = rootlen; running = 1; while (running) { pdu = snmp_pdu_create(SNMP_MSG_GETNEXT); snmp_add_null_var(pdu, name, name_length); status = snmp_sess_synch_response(info.snmp_sess_p, pdu, &response); if (response == NULL) status = STAT_ERROR; if (status == STAT_SUCCESS) { if (response->errstat == SNMP_ERR_NOERROR) { for (vars = response->variables; vars; vars = vars->next_variable) { if ((vars->name_length < rootlen) || (memcmp(root, vars->name, rootlen * sizeof(oid)) != 0)) { running = 0; continue; } string result = snmp_result(vars); debuglogger(DEBUG_SNMP, LEVEL_DEBUG, &info, "OID: '" + snmp_oid(result) + "' VALUE: '" + snmp_value(result) + "'"); results.push_front(SNMPPair(snmp_oid(result), snmp_value(result))); if ((vars->type != SNMP_ENDOFMIBVIEW) && (vars->type != SNMP_NOSUCHOBJECT) && (vars->type != SNMP_NOSUCHINSTANCE)) { if (check && snmp_oid_compare(name, name_length, vars->name, vars->name_length) >= 0) { debuglogger(DEBUG_SNMP, LEVEL_WARNING, &info, "SNMP Error: OID not increasing"); running = 0; exitval = 1; } memmove((char *) name, (char *) vars->name, vars->name_length * sizeof(oid)); name_length = vars->name_length; } else { running = 0; } } } else { running = 0; if (response->errstat == SNMP_ERR_NOSUCHNAME) { debuglogger(DEBUG_SNMP, LEVEL_NOTICE, &info, "End of MIB"); } else { debuglogger(DEBUG_SNMP, LEVEL_WARNING, &info, string("SNMP Packet Error: ") + snmp_errstring(response->errstat)); exitval = 2; } } } else { if (status == STAT_TIMEOUT) { debuglogger(DEBUG_SNMP, LEVEL_WARNING, &info, string("Timeout: No Response from ") + info.ip); running = 0; exitval = 1; } else { debuglogger(DEBUG_SNMP, LEVEL_ERROR, &info, string("SNMP Walk Error (") + inttostr(status) + ")"); running = 0; exitval = 1; } } if (response) snmp_free_pdu(response); } return results; } long long int get_snmp_uptime(DeviceInfo info) { string uptime; char unparsed[100]; char * parsed; uptime = snmp_get(info, string("system.sysUpTime.0")); if (uptime != "") { strcpy(unparsed,uptime.c_str()); parsed = strtok(unparsed, "()"); return strtoint(string(parsed)); } else { return 0; } } // end get_snmp_uptime() netmrg-0.20/src/netmrg.cpp0000664000076400007640000003501710772574472015731 0ustar silfreedsilfreed/******************************************** * NetMRG Integrator * * netmrg.cpp * NetMRG Gatherer * * see doc/LICENSE for copyright information ********************************************/ /* NetMRG Monitoring Procedure Copyright 2001-2006 Brady Alleman. All Rights Reserved. MySQL examples from http://mysql.turbolift.com/mysql/chapter4.php3 pthreads examples from http://www.math.arizona.edu/swig/pthreads/threads.html net-snmp examples from http://net-snmp.sf.net/ Thanks to Patrick Haller (http://haller.ws) for helping to debug threading in the original gatherer. */ #include "common.h" #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int active_threads = 0; bool netmrg_terminated = false; // Include the NetMRG Headers #include "types.h" #include "utils.h" #include "locks.h" #include "settings.h" #include "snmp.h" #include "db.h" #include "rrd.h" #include "mappings.h" #include "devices.h" ScheduleType schedule = schOnce; #ifdef OLD_MYSQL #define MYSQL_THREAD_INIT #define MYSQL_THREAD_END #else #define MYSQL_THREAD_INIT mysql_thread_init() #define MYSQL_THREAD_END mysql_thread_end() #endif // child - the thread spawned to process each device void *child(void * arg) { int device_id = *(int *) arg; MYSQL_THREAD_INIT; process_device(device_id); netmrg_mutex_lock(lkActiveThreads); active_threads--; netmrg_cond_signal(cActiveThreads); netmrg_mutex_unlock(lkActiveThreads); MYSQL_THREAD_END; pthread_exit(0); } // end child // remove lock file void remove_lockfile() { unlink(get_setting(setPathLockFile).c_str()); } // SIGTERM signal handler void handle_sigterm(int signum) { netmrg_terminated = true; } // Say we're going away due to SIGTERM void saydie() { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, "Caught signal, shutting down."); } // set things up, and spawn the threads for data gathering void run_netmrg() { init_logging(); debuglogger(DEBUG_GLOBAL, LEVEL_NOTICE, NULL, "NetMRG starting."); pid_t mypid = getpid(); FILE *lockfile; int lockfile_res; // check for existing lockfile if (file_exists(get_setting(setPathLockFile))) { lockfile = fopen(get_setting(setPathLockFile).c_str(), "r"); pid_t otherpid; lockfile_res = fscanf(lockfile, "%d", &otherpid); fclose(lockfile); // if we could have sent the signal, or if the problem wasn't finding the PID, die. if ( (kill(otherpid, 0) != -1) || (errno != ESRCH) ) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, "Critical: Another instance of NetMRG appears to be running. (PID " + inttostr(otherpid) + ")"); exit(254); } else { debuglogger(DEBUG_GLOBAL, LEVEL_NOTICE, NULL, "Removing stale lock file."); remove_lockfile(); } } // create lockfile debuglogger(DEBUG_GLOBAL, LEVEL_INFO, NULL, "Creating Lockfile."); if ((lockfile = fopen(get_setting(setPathLockFile).c_str(),"w+")) != NULL) { fprintf(lockfile, "%d", mypid); fclose(lockfile); atexit(remove_lockfile); } else { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, string("Critical: Lockfile creation failure. (") + strerror(errno) + ")"); exit(2); } // SNMP library initialization snmp_init(); atexit(snmp_cleanup); // RRDTOOL command pipe setup rrd_init(); atexit(rrd_cleanup); // Setup SIGTERM/SIGINT catching struct sigaction term_sigaction; term_sigaction.sa_handler = &handle_sigterm; if (sigaction(SIGTERM, &term_sigaction, NULL)) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, "Failed to add signal handler."); exit(10); } if (sigaction(SIGINT, &term_sigaction, NULL)) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, "Failed to add signal handler."); exit(10); } do { time_t start_time = time(NULL); // open mysql connection for initial queries MYSQL mysql; MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; if (!db_connect(&mysql)) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, "Critical: Master database connection failed."); exit(3); } // verify the database version matches the gatherer version mysql_res = db_query(&mysql, NULL, "SELECT version FROM versioninfo WHERE module = 'Main'"); mysql_row = mysql_fetch_row(mysql_res); if (string(mysql_row[0]) != string(NETMRG_VERSION)) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, string("Critical: Database version (") + mysql_row[0] + ") and gatherer version (" + NETMRG_VERSION + ") do not match."); debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, "Log into the web interface to perform the database upgrade."); exit(4); } mysql_free_result(mysql_res); // request list of devices to process mysql_res = db_query(&mysql, NULL, "SELECT id FROM devices WHERE disabled=0 ORDER BY id"); long int num_rows = mysql_num_rows(mysql_res); pthread_t* threads = new pthread_t[num_rows]; int* ids = new int[num_rows]; // reading settings isn't necessarily efficient. storing them locally. int THREAD_COUNT = get_setting_int(setThreadCount); int dev_counter = 0; // deploy more threads as needed int last_active_threads = 0; netmrg_mutex_lock(lkActiveThreads); while (dev_counter < num_rows) { debuglogger(DEBUG_THREAD, LEVEL_INFO, NULL, "[ACTIVE] Last: " + inttostr(last_active_threads) + ", Now: " + inttostr(active_threads)); last_active_threads = active_threads; while ((active_threads < THREAD_COUNT) && (dev_counter < num_rows)) { mysql_row = mysql_fetch_row(mysql_res); int dev_id = strtoint(string(mysql_row[0])); ids[dev_counter] = dev_id; pthread_create(&threads[dev_counter], NULL, child, &ids[dev_counter]); pthread_detach(threads[dev_counter]); dev_counter++; active_threads++; } netmrg_cond_wait(cActiveThreads, lkActiveThreads); if (netmrg_terminated) { saydie(); break; } } // wait until all threads exit while (active_threads != 0) { netmrg_cond_wait(cActiveThreads, lkActiveThreads); debuglogger(DEBUG_THREAD, LEVEL_INFO, NULL, "[PASSIVE] Last: " + inttostr(last_active_threads) + ", Now: " + inttostr(active_threads)); last_active_threads = active_threads; } netmrg_mutex_unlock(lkActiveThreads); // free active devices results mysql_free_result(mysql_res); delete [] threads; delete [] ids; // clean up mysql mysql_close(&mysql); debuglogger(DEBUG_GLOBAL, LEVEL_INFO, NULL, "Closed MySQL connection."); // determine runtime and store it long int run_time = time( NULL ) - start_time; debuglogger(DEBUG_GLOBAL, LEVEL_INFO, NULL, "Runtime: " + inttostr(run_time)); FILE *runtime; if ((runtime = fopen(get_setting(setPathRuntimeFile).c_str(),"w+"))) { fprintf(runtime, "%ld", run_time); fclose(runtime); } else { debuglogger(DEBUG_GLOBAL, LEVEL_ERROR, NULL, "Failed to open runtime file for writing."); } if ((schedule == schWait) && (!netmrg_terminated)) { if ( time(NULL) > (start_time + get_setting_int(setPollInterval))) { debuglogger(DEBUG_GLOBAL, LEVEL_ERROR, NULL, "We're running behind!"); } else { timespec tosleep, unslept; tosleep.tv_sec = start_time + get_setting_int(setPollInterval) - time(NULL); tosleep.tv_nsec = 0; while (nanosleep(&tosleep, &unslept)) { if ((errno == EINTR) && (netmrg_terminated)) { saydie(); break; } tosleep.tv_sec = unslept.tv_sec; } } } } while ((schedule != schOnce) && (!netmrg_terminated)); } void show_version() { printf("\nNetMRG Data Gatherer\n"); printf("Version %s\n\n", NETMRG_VERSION); } void show_usage() { show_version(); printf("General:\n"); printf("-v Display Version\n"); printf("-h Show usage (you are here)\n"); printf("-C Use alternate configuration file \n"); printf("-t Limits number of simultaneous threads to \n"); printf("-X Become a daemon.\n"); printf("-M Scheduling mode, is:\n"); printf(" once = return after one gather cycle (default).\n"); printf(" wait = gather once every interval, waiting between intervals.\n"); printf("\nMode of Operation:\n"); printf("-i Recache the interfaces of device \n"); printf("-d Recache the disks of device \n"); printf("-P Recache the properties of device \n"); printf("-K Parse config file , or default if omitted (for syntax checking)\n"); printf("If no mode is specified, the default is to gather data for all enabled devices.\n"); printf("\nLogging:\n"); printf("-S Syslog; output logs to syslog instead of stdout.\n"); printf("-b Bland; disable color output.\n"); printf("-a All; display all debug messages.\n"); printf("-m Most; display more than the default.\n"); printf("-q Quiet; display no debug messages.\n"); printf("-c Use debug component mask .\n"); printf("-l Use debug level mask .\n"); printf("-s Safe; omit potentially sensitive information.\n"); printf("\nDatabase Settings:\n"); printf("-H Use database server on \n"); printf("-D Use database named \n"); printf("-u Use database user name \n"); printf("-p Use database password , will prompt for password if is omitted\n"); printf("\n"); } void external_snmp_recache(int device_id, int type) { MYSQL mysql; MYSQL_RES *mysql_res; MYSQL_ROW mysql_row; DeviceInfo info; if (!db_connect(&mysql)) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, NULL, "Critical: Master database connection failed."); exit(3); } info.device_id = device_id; mysql_res = db_query(&mysql, &info, string("SELECT ip, snmp_read_community, snmp_version, snmp_port, ") + "snmp_timeout, snmp_retries, dev_type FROM devices WHERE id=" + inttostr(device_id)); mysql_row = mysql_fetch_row(mysql_res); if (mysql_row == NULL) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, &info, "Device does not exist."); exit(1); } info.snmp_version = strtoint(mysql_row[2]); if (info.snmp_version == 0) { debuglogger(DEBUG_GLOBAL, LEVEL_CRITICAL, &info, "Can't recache a device without SNMP."); exit(1); } info.ip = mysql_row[0]; info.snmp_read_community = mysql_row[1]; info.snmp_port = strtoint(mysql_row[3]); info.snmp_timeout = strtoint(mysql_row[4]); info.snmp_retries = strtoint(mysql_row[5]); info.device_type = strtoint(mysql_row[6]); info.parameters.push_front(ValuePair("ip", info.ip)); info.parameters.push_front(ValuePair("snmp_read_community", info.snmp_read_community)); mysql_free_result(mysql_res); snmp_init(); snmp_session_init(info); switch (type) { case 1: do_snmp_interface_recache(&info, &mysql); break; case 2: do_snmp_disk_recache(&info, &mysql); break; case 3: do_properties_recache(info, &mysql); break; } snmp_session_cleanup(info); snmp_cleanup(); mysql_close(&mysql); } // daemonize - make us lurk around the system void daemonize() { pid_t pid; int chdir_res; pid = fork(); if (pid < 0) { // failed to fork, keep going with this process fprintf(stderr, "Failed to fork; unable to daemonize.\n"); fprintf(stderr, "Continuing in the foreground.\n"); return; } else if (pid != 0) { // fork successful, and we're the parent, time to die. exit(0); } else { // we're the child, keep going setsid(); chdir_res = chdir("/"); umask(0); return; } } // main - the body of the program int main(int argc, char **argv) { int option_char; load_settings_default(); load_settings_file(DEF_CONFIG_FILE); string temppass; if (vt100_compatible()) { set_log_method(LOG_METHOD_VT100); } while ((option_char = getopt(argc, argv, "hvXSqasmbM:i:d:P:c:l:H:D:u:p::t:C:K::")) != EOF) switch (option_char) { case 'h': show_usage(); exit(0); break; case 'v': show_version(); exit(0); break; case 'M': if (strcmp(optarg, "once") == 0) schedule = schOnce; else if (strcmp(optarg, "wait") == 0) schedule = schWait; else fprintf(stderr, "I don't know what schedule '%s' is. Using default.\n", optarg); break; case 'i': external_snmp_recache(strtoint(optarg), 1); exit(0); break; case 'X': daemonize(); break; case 'S': set_log_method(LOG_METHOD_SYSLOG); break; case 'b': set_log_method(LOG_METHOD_STDOUT); break; case 'd': external_snmp_recache(strtoint(optarg), 2); exit(0); break; case 'P': external_snmp_recache(strtoint(optarg), 3); exit(0); break; case 'c': set_debug_components(strtoint(optarg)); break; case 'l': set_debug_level(strtoint(optarg)); break; case 'q': set_debug_level(0); break; case 'a': set_debug_level(LEVEL_ALL); set_debug_components(DEBUG_ALL); break; case 'm': set_debug_level(LEVEL_MOST); set_debug_components(DEBUG_MOST); break; case 's': set_debug_safety(true); break; case 'H': set_setting(setDBHost, optarg); break; case 'D': set_setting(setDBDB, optarg); break; case 'u': set_setting(setDBUser, optarg); break; case 'p': if (optarg != NULL) { // if password specified, use it temppass = string(optarg); // obscure password from process listing while (*optarg) *optarg++= 'x'; } else { /* Make sure stdin is a terminal */ if (!isatty(STDIN_FILENO)) { fprintf(stderr, "Not bound to a terminal. Using empty string for password.\n"); temppass = ""; } else { // Save terminal settings struct termios saved_tattr; tcgetattr (STDIN_FILENO, &saved_tattr); // don't echo input struct termios tattr; tcgetattr (STDIN_FILENO, &tattr); tattr.c_lflag &= (ICANON|ECHONL|ISIG); tattr.c_lflag &= -ECHO; tcsetattr (STDIN_FILENO, TCSANOW, &tattr); // if password not specified, prompt for it cout << "Password: "; cin >> temppass; // Restore terminal settings tcsetattr (STDIN_FILENO, TCSANOW, &saved_tattr); } } set_setting(setDBPass, temppass); break; case 't': set_setting(setThreadCount, optarg); break; case 'C': load_settings_file(optarg); break; case 'K': set_debug_level(LEVEL_DEBUG); set_debug_components(DEBUG_GLOBAL); if (optarg != NULL) { load_settings_file(optarg); } print_settings(); exit(0); break; } run_netmrg(); } netmrg-0.20/UPGRADE0000664000076400007640000000305311000015417014115 0ustar silfreedsilfreed Chapter 6. Upgrade Procedure After doing a 'make install' as described in the chapter on Installing NetMRG, the next step is to run the web-based updater. This is accomplished by logging into NetMRG with administrator privileges, and following the prompts. NetMRG's web interface will not operate normally and the gatherer will not run until the web-based upgrade is performed. Non-administrator users will only receive a message directing them to contact their NetMRG administrator. If you need to perform an upgrade, the updater will prompt you to apply all updates. Clicking this link will perform all necessary updates for this release. If for some reason an update fails, or you would like to re-apply an update for any reason, you can goto the updater and goto View all available updates. This will present you a list of the updates that are available and their status (applied, not applied, or error). If you have problems updating from one version to the next, you can force individual updates that fail so that they're considered 'applied'. Once all updates are applied for a particular version, the database will be automatically updated to the latest version that has all updates applied. References Visible links . file:///home/silfreed/src/netmrg/share/doc/txt/index.html . file:///home/silfreed/src/netmrg/share/doc/txt/installation.html . file:///home/silfreed/src/netmrg/share/doc/txt/install.html . file:///home/silfreed/src/netmrg/share/doc/txt/reference.html netmrg-0.20/config.sub0000775000076400007640000006710007702667001015111 0ustar silfreedsilfreed#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-09-07' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dsp16xx \ | fr30 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el | mips64vr4300 \ | mips64vr4300el | mips64vr5000 | mips64vr5000el \ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ | mipsisa32 \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | s390 | s390x \ | sh | sh[34] | sh[34]eb | shbe | shle \ | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ | stormy16 | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 \ | we32k \ | x86 | xscale \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alphapca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armv*-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c54x-* \ | clipper-* | cray2-* | cydra-* \ | d10v-* | d30v-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | m32r-* \ | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | s390-* | s390x-* \ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | v850-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [cjt]90) basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: netmrg-0.20/contrib/0000775000076400007640000000000011000016355014544 5ustar silfreedsilfreednetmrg-0.20/contrib/linuxpmu.sh0000775000076400007640000000050010627026156016775 0ustar silfreedsilfreed#!/bin/sh # Author: Uwe Steinmann # usage linuxpmu.sh # battery number can be 0 or 1 # command can be 'charge', 'max_charge', 'current', 'voltage' if [ -f /proc/pmu/battery_$1 ]; then cat /proc/pmu/battery_$1 | grep "^$2 *:" | awk -F: '{print $2}' else echo "U" fi netmrg-0.20/contrib/maillogstats/0000775000076400007640000000000011000016355017247 5ustar silfreedsilfreednetmrg-0.20/contrib/maillogstats/README0000664000076400007640000000324110107410537020136 0ustar silfreedsilfreed== maillogstat filters a syslog maillog == == into separate counter files for hosts == Usage: maillogfilter.php | maillogfilter.php -? | -h | --help : this message This program takes a maillog syslog feed in, and puts some nifty stats back out. You'll need to make a fifo (`mkfifo /var/log/maillog-pipe.log` - probably `chmod 600 /var/log/maillog-pipe.log` also), and send your syslog feed to it; with a line similar to this: --- syslog.conf start --- mail.* |/var/log/maillog-pipe.log --- syslog.conf stop --- It's very useful to put this into your inittab, with a line similar to this: --- inittab start --- # maillog stats ml:3:respawn:/usr/local/bin/maillogfilter/maillogfilter /var/log/maillog-pipe.log --- inittab stop --- make sure you setup your mysql database with the table in maillog.mysql. To setup the NetMRG side of things, you'll need to add an SQL test. The test I commonly use uses this query (be sure to fill in the rest of the info): SELECT %parameters% FROM maillogstats.stats WHERE hostname = '%mailloghost%' Then, I create a sub-device for the device that I want to monitor with a parameter named 'mailloghost' and the hostname that shows up in your tables. When you add your monitors to this sub-device, add a parameters field for each column you want to graph, I usually add a monitor for each of the following columns as parameters: connect received delivered forwarded deferred bounced rejected Next, you'll want to create a template graph out of these using whatever colors, etc that you want (see http://demo.netmrg.net/ for an example). If you experience any problems, be sure to demand your money back. netmrg-0.20/contrib/maillogstats/maillogstats0000775000076400007640000003213310323611462021711 0ustar silfreedsilfreed#!/usr/bin/php -q */ /********** Config **********/ //error_reporting(E_ALL); error_reporting(E_WARNING | E_ERROR); set_time_limit(0); // make a new $CFG object class object {}; $CFG = new object; $CFG->dbhost = "localhost"; $CFG->dbuser = "maillog"; $CFG->dbpass = "maillog"; $CFG->dbname = "maillog"; $CFG->errorlog = "/var/log/maillogerror"; ## check arguments if ($argc == 2 && ($argv[1] == '-h' || $argv[1] == '-?' || $argv[1] == '--help')) { Usage(); exit(); } // end if not enough command line args /* the stats array will look like this: * array("host" => array( * "connect" => value, * "received" => value, * "delivered" => value, * "forwarded" => value, * "deferred" => value, * "bounced" => value, * "rejected" => value, * "rbld" => value, * "spamcount" => value, * "spamscore" => value, * "viri" => value * )); * where host is the hostname and the array is all counters */ $stats = array(); // a counter for the number of relevant mail log lines parsed $mailloglines = 0; // after how many lines should we flush the counters $flushnumlines = 50; // connect to mysql mysql_connect($CFG->dbhost, $CFG->dbuser, $CFG->dbpass) or die("ERROR: cannot connect to server\n"); mysql_select_db($CFG->dbname) or die("ERROR: cannot connect to database\n"); /********** Core **********/ if ($argc == 1) { $logfile = "php://stdin"; // set the logfile as stdin } elseif ($argc == 2) { $logfile = $argv[1]; // set the logfile as the second parameter } // end which logfile to use // initializes the $stats array w/ any old counter values that exist CheckOldCounters($stats); // try to open the file $logptr = fopen($logfile, "r"); if (!$logptr) { Error("ERROR: File Not Found '$logfile'"); exit(); } // end if file not found // lets do some parsing! while (!feof ($logptr)) { $line = fgets($logptr, 4096); // if this line is about postfix, do stuff w/ it if (preg_match("/postfix/", $line)) { $mailloglines++; $linehalves = preg_split("/\[\d*\]: /U", $line); // $basicinfo will have the following: // month, day, time, host, "postfix" $basicinfo = split("[ ]+", $linehalves[0]); $statusinfo = $linehalves[1]; unset($linehalves); // check to see if the $basicinfo section has // the correct # of items in it if (count($basicinfo) != 5) { Error("POSTFIX: $line"); } else { if (!HostInStats($basicinfo[3], $stats)) { AddHostToStats($basicinfo[3], $stats); Error("POSTFIX ADDHOST: $line"); } // end if host in stats or not PostfixStats($basicinfo[3], $statusinfo, $stats); } // end if line is okay } else if(preg_match("/spamd/", $line)) { $mailloglines++; $linehalves = preg_split("/\[\d*\]: /U", $line); // $basicinfo will have the following: // month, day, time, host, "spamd" $basicinfo = split("[ ]+", $linehalves[0]); $statusinfo = $linehalves[1]; unset($linehalves); // check to see if the $basicinfo section has // the correct # of items in it if (count($basicinfo) != 5) { Error("SPAMD: $line"); } else { if (!HostInStats($basicinfo[3], $stats)) { AddHostToStats($basicinfo[3], $stats); Error("SPAMD ADDHOST: $line"); } // end if host in stats or not spamdScannerStats($basicinfo[3], $statusinfo, $stats); } // end if line is okay } else if(preg_match("/MailScanner/", $line)) { $mailloglines++; $linehalves = preg_split("/\[\d*\]: /U", $line); // $basicinfo will have the following: // month, day, time, host, "MailScanner" $basicinfo = split("[ ]+", $linehalves[0]); $statusinfo = $linehalves[1]; unset($linehalves); // check to see if the $basicinfo section has // the correct # of items in it if (count($basicinfo) != 5) { Error("MAILSCANNER: $line"); } else { if (!HostInStats($basicinfo[3], $stats)) { AddHostToStats($basicinfo[3], $stats); Error("MAILSCANNER ADDHOST: $line"); } // end if host in stats or not MailScannerStats($basicinfo[3], $statusinfo, $stats); } // end if line is okay // if imap log line } else if(preg_match("/imapd/", $line)) { $mailloglines++; $linehalves = preg_split("/imapd: /U", $line); // $basicinfo will have the following: // month, day, time, host, "MailScanner" $basicinfo = split("[ ]+", $linehalves[0]); $statusinfo = $linehalves[1]; unset($linehalves); // check to see if the $basicinfo section has // the correct # of items in it if (count($basicinfo) != 5) { Error("IMAPD: $line"); } else { if (!HostInStats($basicinfo[3], $stats)) { AddHostToStats($basicinfo[3], $stats); Error("IMAPD ADDHOST: $line"); } // end if host in stats or not ImapScannerStats($basicinfo[3], $statusinfo, $stats); } // end if line is okay // if tpop3d log line } else if(preg_match("/tpop3d/", $line)) { $mailloglines++; $linehalves = preg_split("/\[\d*\]: /U", $line); // $basicinfo will have the following: // month, day, time, host, "MailScanner" $basicinfo = split("[ ]+", $linehalves[0]); $statusinfo = $linehalves[1]; unset($linehalves); // check to see if the $basicinfo section has // the correct # of items in it if (count($basicinfo) != 5) { Error("TPOP3D: $line"); } else { if (!HostInStats($basicinfo[3], $stats)) { AddHostToStats($basicinfo[3], $stats); Error("TPOP3D ADDHOST: $line"); } // end if host in stats or not tpop3dScannerStats($basicinfo[3], $statusinfo, $stats); } // end if line is okay } // end if line is relevant // if we've seen enough log lines, flush them if ($mailloglines % $flushnumlines == 0) { OutputAllStats($stats); } // end if it's time to output stats } // end for each line in maillog fclose ($logptr); OutputAllStats($stats); exit(); /********** FUNCTIONS **********/ /* Usage(); output how to use this script */ function Usage() { echo "\n"; echo "== maillogstats filters a syslog maillog ==\n"; echo " into separate counter files for hosts ==\n"; echo "\n"; echo " Usage: maillogstats \n"; echo " | maillogstats"; echo "\n"; echo " -? | -h | --help : this message\n"; echo "\n"; echo "\n"; } /* Error($errortext); outputs $errortext to stderr */ function Error($errortext) { error_log($errortext."\n\n", 3, "/dev/stderr"); } /* OutputCounters($host); outputs all the counters for a host to their own file */ function OutputCounters($hostname, $counters) { global $CFG; // if counters are too big, wrap them around reset($counters); while (next($counters)) { $countertype = key($counters); $maxval = pow(2, 31); if ($counters[$countertype] > $maxval) { $counters[$countertype] = $counters[$countertype] - $maxval; } // end if coutner is too big } // end while still keys reset($counters); // replace data in db $host_query = "REPLACE INTO stats SET hostname = '$hostname', connect = '{$counters['connect']}', received = '{$counters['received']}', delivered = '{$counters['delivered']}', forwarded = '{$counters['forwarded']}', deferred = '{$counters['deferred']}', bounced = '{$counters['bounced']}', rejected = '{$counters['rejected']}', rbld = '{$counters['rbld']}', spamcount = '{$counters['spamcount']}', spamscore = '{$counters['spamscore']}', viri = '{$counters['viri']}'"; $host_result = mysql_query($host_query) or die("ERROR: cannot perform query\n$host_query\n\n"); } // end OutputCounters(); /* OutputAllStats($stats); write all the files for each host */ function OutputAllStats($stats) { while (list($key, $val) = each($stats)) { OutputCounters($key, $val); } // end for each host in array } // end OutputAllStats(); /* CheckOldCounters($stats); reads in counter values that have already * been set to initialize the stats variable */ function CheckOldCounters(&$stats) { global $CFG; // check if host exists $host_query = "SELECT * FROM stats"; $host_result = mysql_query($host_query) or die("ERROR: cannot perform query\n$host_query\n\n"); while ($r = mysql_fetch_array($host_result)) { $stats[$r['hostname']] = array( "connect" => $r['connect'], "received" => $r['received'], "delivered" => $r['delivered'], "forwarded" => $r['forwarded'], "deferred" => $r['deferred'], "bounced" => $r['bounced'], "rejected" => $r['rejected'], "rbld" => $r['rbld'], "spamcount" => $r['spamcount'], "spamscore" => $r['spamscore'], "viri" => $r['viri'] ); // end of array } // end while each result } // end CheckOldCounters(); /* HostInStats($hostname, $stats); check to see if we're already * keeping stats on a host */ function HostInStats($hostname, $stats) { global $CFG; while (list($key, $val) = each($stats)) { if ($hostname == $key) { return true; } // end if key == hostname } // end for each host in array return false; } // end HostInStats(); /* AddHostToStats($hostname, &$stats); initializes array for host in stats */ function AddHostToStats($hostname, &$stats) { global $CFG; $stats[$hostname] = array( "connect" => 0, "received" => 0, "delivered" => 0, "forwarded" => 0, "deferred" => 0, "bounced" => 0, "rejected" => 0, "rbld" => 0, "spamcount" => 0, "spamscore" => 0, "viri" => 0 ); // end of array } // end AddHostToStats(); /* PostfixStats($hostname, $statusinfo, &$stats); increment the correct counter */ function PostfixStats($hostname, $statusinfo, &$stats) { global $CFG; // mail was rbl'd if (eregi("reject:", $statusinfo) && eregi("blocked", $statusinfo)) { $stats[$hostname]["rbld"]++; $stats[$hostname]["rejected"]++; // mail was rejected } elseif (eregi("reject:", $statusinfo)) { $stats[$hostname]["rejected"]++; // mail was accepted } elseif (eregi("message-id=<", $statusinfo)) { $stats[$hostname]["received"]++; // mail was forwarded } elseif (eregi("forwarded as", $statusinfo)) { $stats[$hostname]["forwarded"]++; // mail was sent } elseif (eregi("status=sent", $statusinfo)) { $stats[$hostname]["delivered"]++; // mail was deferred (can't deliver) } elseif (eregi("status=deferred", $statusinfo)) { $stats[$hostname]["deferred"]++; // mail was bounded (no local user) } elseif (eregi("status=bounced", $statusinfo)) { $stats[$hostname]["bounced"]++; } // end bounced // connection from client // Mar 30 11:19:21 mx02 postfix/smtpd[15978]: connect from 69.37.28.78.adsl.snet.net[69.37.28.78] else if (preg_match("/connect from/", $statusinfo)) { $stats[$hostname]["connect"]++; } // end connection } // end PostfixStats(); /* MailScannerStats($hostname, $statusinfo, &$stats); increment the correct counter */ function MailScannerStats($hostname, $statusinfo, &$stats) { global $CFG; // mail was spam // Message 3D65D1870 from 193.111.199.194 (excite.com) is spam according to SpamAssassin (score=19.5, required 6, ALL_CAP_PORN, BEST_PORN, BIG_FONT, CTYPE_JUST_HTML, DATE_IN_FUTURE_06_12, FAKED_UNDISC_RECIPS, FREE_PORN, HTML_FONT_COLOR_CYAN, HTML_FONT_COLOR_GREEN, HTML_FONT_COLOR_YELLOW, INVALID_DATE_TZ_ABSURD, LINES_OF_YELLING, MANY_EXCLAMATIONS, MIME_LONG_LINE_QP, NORMAL_HTTP_TO_IP, SPAM_PHRASE_03_05, SUBJ_FREE_CAP, SUBJ_HAS_SPACES, TO_HAS_SPACES, WEIRD_PORT) if (preg_match("/from [\d\.]*.*SpamAssassin \(score=([\d\.]*),/", $statusinfo, $matches)) { $stats[$hostname]["spamcount"]++; $stats[$hostname]["spamscore"] += $matches[1]; // mail had a virus // Virus Scanning: Found 1 viruses } else if (preg_match("/Virus Scanning: Found (\d+) viruses/", $statusinfo, $matches)) { $stats[$hostname]["viri"] += $matches[1]; } // end if (what is this log) } // end MailScannerStats(); /* ImapScannerStats($hostname, $statusinfo, &$stats); increment the correct counter */ function ImapScannerStats($hostname, $statusinfo, &$stats) { global $CFG; // connection // Jun 23 09:50:46 imap0 imapd: LOGIN, user=zlove@va.net, ip=[::ffff:205.166.61.177], protocol=IMAP if (preg_match("/LOGIN, user=/", $statusinfo, $matches)) { $stats[$hostname]["connect"]++; } // end connection } // end ImapScannerStats(); /* tpop3dScannerStats($hostname, $statusinfo, &$stats); increment the correct counter */ function tpop3dScannerStats($hostname, $statusinfo, &$stats) { global $CFG; // connection // Mar 30 11:14:56 pop0 tpop3d[4811]: authcontext_new_user_pass: began session for `obslaw7' with mysql; uid 8, gid 12 if (preg_match("/authcontext_new_user_pass: began session for/", $statusinfo, $matches)) { $stats[$hostname]["connect"]++; } // end connection } // end tpop3dScannerStats(); /* spamdScannerStats($hostname, $statusinfo, &$stats); increment the correct counter */ function spamdScannerStats($hostname, $statusinfo, &$stats) { global $CFG; // spam // Oct 13 22:02:20 argo.pyxos.net spamd[3822]: identified spam (19.7/10.0) for dlittle:501 in 1.8 seconds, 1668 bytes. if (preg_match("/identified spam \(([\d\.]+)\/[\d\.]+\)/", $statusinfo, $matches)) { $stats[$hostname]["spamcount"]++; $stats[$hostname]["spamscore"] += $matches[1]; } // end spam // Oct 13 22:03:13 argo.pyxos.net spamd[3888]: clean message (-0.9/5.0) for silfreed:500 in 2.1 seconds, 1195 bytes. } // end spamdScannerStats(); ?> netmrg-0.20/contrib/maillogstats/maillog.mysql0000664000076400007640000000122310076047333021774 0ustar silfreedsilfreed-- MySQL dump 9.10 -- -- Host: localhost Database: maillog -- ------------------------------------------------------ -- Server version 4.0.17-Max -- -- Table structure for table `stats` -- CREATE TABLE stats ( hostname varchar(128) NOT NULL default '', connect int(11) default NULL, received int(11) default NULL, delivered int(11) default NULL, forwarded int(11) default NULL, deferred int(11) default NULL, bounced int(11) default NULL, rejected int(11) default NULL, rbld int(11) default NULL, spamcount int(11) default NULL, spamscore int(11) default NULL, viri int(11) default NULL, PRIMARY KEY (hostname) ) TYPE=MyISAM; netmrg-0.20/contrib/maillogstats/CHANGELOG0000664000076400007640000000106210076047333020474 0ustar silfreedsilfreed2004.07.15 silfreed - changed name from 'maillogfilter' to 'maillogstats' 2004.06.23 dwarner updated imap connection logging 2004.03.30 dwarner added `connect` column to table renamed `postfix` table to `stats` add support for imap/postfix/tpop3d connections 2003.07.03 dwarner 'from=<' counts too many things for Received; trying 'message-id=<' instead 2002.11.21 dwarner wrap counters manually by doing this: if ($i > pow(2, 31)) { $i = $i - pow(2,31); } add mailscanner processing OutputCounters() - change to a 'REPLACE INTO' netmrg-0.20/contrib/surfboard/0000775000076400007640000000000011000016355016533 5ustar silfreedsilfreednetmrg-0.20/contrib/surfboard/surfboard5100-signal.html0000664000076400007640000000723010401170272023176 0ustar silfreedsilfreed
Configuration Manager
Status Signal Addresses Configuration Logs Help
This page provides information about the current upstream and downstream signal status of your Cable Modem.

Downstream Value
Frequency 723000000 Hz Locked
Signal to Noise Ratio 37 dB
Power Level 2 dB
The Downstream Power Level reading is a snapshot taken at the time this page was requested. Please Reload/Refresh this Page for a new reading

Upstream Value
Channel ID 3
Frequency 30992000 Hz Ranged
Power Level 46 dBmV

Status | Signal | Addresses | Configuration | Logs | Help

© Copyright 1997-2002
netmrg-0.20/contrib/surfboard/surfboard4100-signal.html0000664000076400007640000001146310401170272023200 0ustar silfreedsilfreed
Configuration Manager
Status Signal Addresses Configuration Logs Help
This page provides information about the current upstream and downstream signal status of your Cable Modem.

Downstream Value
Frequency 723000000 Hz Locked  
Signal to Noise Ratio 34 dB 
QAM 256
Network Access Control Object ON
Power Level 2 dBmV  
The Downstream Power Level reading is a snapshot taken at the time this page was requested. Please Reload/Refresh this Page for a new reading
Upstream Value
Channel ID 3
Frequency 30992000 Hz Ranged
Ranging Service ID 239
Symbol Rate 3.200 Msym/s
Power Level 46 dBmV

Status | Signal | Addresses | Configuration | Logs | Help

Copyright 1997-2000
netmrg-0.20/contrib/surfboard/surfboard.php0000775000076400007640000000465310401170272021251 0ustar silfreedsilfreed#!/usr/bin/php url direction variable\n"; echo " url: full path to the signal page (not the frame!)\n"; echo " ex: $signalpage\n"; echo " direction: downstream\n"; echo " variable: frequency, snr, qam, power_level\n"; echo " direction: upstream\n"; echo " variable: channel_id, frequency, ranging_service_id, \n"; echo " symbol_rate, power_level\n"; exit(1); } // end if not proper arguments // assign variables $signalpage = $_SERVER['argv'][1]; $direction = $_SERVER['argv'][2]; $variable = $_SERVER['argv'][3]; // grab page conents $signalpage_contents = file_get_contents($signalpage); switch ($direction) { case 'downstream': switch ($variable) { case 'frequency': $regex = '/Downstream.*?Frequency.*?(\d+)\s*Hz/s'; break; case 'snr': $regex = '/Downstream.*?Signal to Noise Ratio.*?(\d+)\s*dB/s'; break; case 'qam': $regex = '/Downstream.*?QAM.*?(\d+)/s'; break; case 'power_level': $regex = '/Downstream.*?Power Level.*?(\d+)\s*dB(?:mV)?/s'; break; } // end switch variable break; case 'upstream': switch ($variable) { case 'channel_id': $regex = '/Upstream.*?Channel ID.*?(\d+).*?/s'; break; case 'frequency': $regex = '/Upstream.*?Frequency.*?(\d+)\s*Hz/s'; break; case 'ranging_service_id': $regex = '/Upstream.*?Ranging Service ID.*?(\d+)/s'; break; case 'symbol_rate': $regex = '/Upstream.*?Symbol Rate.*?([\d\.]+)\s*Msym\/s/s'; break; case 'power_level': $regex = '/Upstream.*?Power Level.*?(\d+)\s*dBmV/s'; break; } // end switch variable break; } // end switch direction // lookup appropriate value if (!empty($regex) && preg_match($regex, $signalpage_contents, $matches)) { $outputval = $matches[1]; } // end if regex and regex match // check output if (!empty($outputval)) { echo "$outputval\n"; } // end if we had output to pass along ?> netmrg-0.20/contrib/killspike20000664000076400007640000000227010350364450016552 0ustar silfreedsilfreed#!/bin/sh # # killspike2 # Remove (presumably erroneous) peaks from RRD files # # Matt Zimmerman , 05/2002 # set -e usage() { >&2 echo "Usage: $0 ..." >&2 echo >&2 echo "Remove all peaks above from in the RRDs ..." exit $1 } backupdir=/tmp/backup.killspike2 ds=$1 max=$2 if [ -z "$ds" -o -z "$max" ]; then usage 1 fi shift 2 rrds=$* if [ "$ds" = "-h" -o -z "$rrds" ]; then usage 1 fi if [ ! -e "$backupdir" ] ; then mkdir $backupdir 2> /dev/null echo "Making backups in $backupdir" fi if type tempfile >/dev/null 2>&1; then tempfile=`tempfile` else tempfile=killspike2.$$ fi for rrd in $rrds; do echo $rrd oldmax=`rrdtool info "$rrd" | awk '$1 == "ds['$ds'].max" { print $3 }'` if [ -z "$oldmax" ]; then >&2 echo "Could not determine current max for DS '$ds' in $rrd" exit 1 elif [ "$oldmax" = "NaN" ]; then oldmax=U fi cp "$rrd" "$backupdir" rrdtool tune "$rrd" --maximum "$ds:$max" rrdtool dump "$rrd" > "$tempfile" rm -f "$rrd" rrdtool restore -r "$tempfile" "$rrd" rrdtool tune "$rrd" --maximum "$ds:$oldmax" done rm -f "$tempfile" netmrg-0.20/contrib/apachestats/0000775000076400007640000000000011000016355017044 5ustar silfreedsilfreednetmrg-0.20/contrib/apachestats/README0000664000076400007640000000337710213401420017732 0ustar silfreedsilfreed==== apachestats v0.1 ==== Usage: apachestats [(-i|--input) (|STDIN)] [(-h|--hostname) ] [(-r|--hostnamere) ] --input specify the file to read in or STDIN if input is on the command line [STDIN] --hostname needed when log is a named query log - specifies the host to log stats for in the database and to use as the 'host' in the apache log --hostnamere regex for the hostnames to match This program is a direct rip from dnsstats. This program takes an apache log in and puts some nifty stats back out. The apache log can either be in combined log format or combined log with virtualhost. It's probably easiest to pipe the combined log w/ vhost directly to this script from apache so you get logs for all hosts without any post-processing and without setting it up in each virtualhost. Make sure you setup your mysql database with the table in apachestats.mysql. To setup the NetMRG side of things, you'll need to add an SQL test. The test I commonly use uses this query (be sure to fill in the rest of the info): SELECT counter FROM apachestats.apachestats WHERE host like "%apachehost%" AND type like "%parameters%" Then, I create a sub-device for the device that I want to monitor with a parameter named 'apachehost' and the hostname that shows up in your tables. When you add your monitors to this sub-device, add a parameters field for each type of stat you want to monitor; I usually monitor these, but there are many more: 2% 3% 4% 5% bytes Next, you'll want to create a template graph out of these using whatever colors, etc that you want (see http://demo.netmrg.net/ for an example). If you experience any problems, be sure to demand your money back. netmrg-0.20/contrib/apachestats/apachestats0000775000076400007640000001266110222324566021313 0ustar silfreedsilfreed#!/usr/bin/perl # # apachestats # # read in an apache log from stdin or a file and # keep stats on # of responses per type (2xx, 3xx, etc) and total bytes # per server in a database # ##### # LIBRARIES ##### use strict; use DBI; use Getopt::Long; use Date::Parse; use POSIX qw(strftime pow); ##### # VARIABLES ##### ## program variables our $progname = "apachestats"; our $version = "0.1"; our $mysql = { "host" => "localhost", "user" => "root", "pass" => "", "dbname" => "apachestats", }; # %typestats = ( # "www.silfreed.net" => ( # "2xx" => 349303, # "3xx" => 9332, # "bytes" => 392343, # ), our %typestats; our $dbh; my $logline; my $linenum = 0; my $logat = 100; my $getopt_result; ## args our $input = "STDIN"; our $hostname = ""; our $hostnamere = qr{.*}; # ^ns\d+\.pa\.net$ ##### # FORWARD DECLAIRATIONS ##### sub Usage(); sub Stop(); sub MySQLConnect(); sub ReadStats(); sub StatsLog(); ### ## Sig Handlers ### $SIG{INT} = sub { close(LOG); StatsLog(); Stop(); }; ##### # MAIN ##### $getopt_result = GetOptions( "i|input=s" => \$input, "h|hostname=s" => \$hostname, "r|hostnamere=s" => sub { $hostnamere = qr{$_[1]}; }, ); Usage() if (!$getopt_result); ## check to see if input method works if ($input eq "STDIN") { open(LOG, "-"); } # end if stdin else { # if the file is readable if (-r $input) { open(LOG, $input); } # end if file readable else { print "File '$input' not readable\n\n"; Usage(); } # end if file not readable } # end if not stdin ## Connect to database MySQLConnect(); ## read in old stats ReadStats(); ## read in the log and do stuff while (chomp($logline = )) { # info we're interested in my $type; my $size; # keep track of # of lines seen $linenum++; # this is a combined log # 127.0.0.1 - - [04/Mar/2005:11:20:32 -0500] "GET /netmrg/img/show.gif HTTP/1.1" 200 67 "http://localhost.localdomain/netmrg/device_tree.php" "Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)" if ($logline =~ /^(\S+)\s+\S+\s+(\S+)\s+\[(.+?)\]\s+"(\S+)\s+(\S+)\s+(\S+)"\s+(\S+)\s+(\S+)\s+"(.*?)"\s+"(.*?)"$/) { #$loghash{remote_host} = $1; #$loghash{remote_user} = $2; #$loghash{request_time} = $3; #$loghash{request_method} = $4; #$loghash{request_uri} = $5; #$loghash{request_protocol} = $6; #$loghash{status} = $7; #$loghash{bytes_sent} = $8; #$loghash{referer} = $9; #$loghash{agent} = $10; $type = $7; $size = $8; # if we don't have a hostname for the log if ($hostname eq "") { print "Hostname needed for combined log\n\n"; Usage(); } # end if no hostname } # end if combined log # this is a combined log w/ vhost # vhost.name 127.0.0.1 - - [04/Mar/2005:11:20:32 -0500] "GET /netmrg/img/show.gif HTTP/1.1" 200 67 "http://localhost.localdomain/netmrg/device_tree.php" "Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)" if ($logline =~ /^(\S+)\s+(\S+)\s+\S+\s+(\S+)\s+\[(.+?)\]\s+"(\S+)\s+(\S+)\s+(\S+)"\s+(\S+)\s+(\S+)\s+"(.*?)"\s+"(.*?)"$/) { $hostname = $1; $type = $8; $size = $9; } # end if vhost combined log # log info to a file if (defined($type) && $hostname =~ $hostnamere) { # increment stats for this type on this host $typestats{$hostname}{$type}++; $typestats{$hostname}{"bytes"} += $size; } # end if we have data to log # if we've seen enough log lines, dump the info to database &StatsLog() if ($linenum % $logat == 0); } # end while log left close (LOG); ## make sure we log some stats StatsLog(); # exit nicely Stop(); ##### # SUBROUTINES ##### ### # Usage(); # # howto use this program # sub Usage() { print <|STDIN)] [(-h|--hostname) ] [(-r|--hostnamere) ] --input specify the file to read in or STDIN if input is on the command line [STDIN] --hostname needed when log is a named query log - specifies the host to log stats for in the database and to use as the 'host' in the apache log --hostnamere regex for the hostnames to match END Stop(); } # end Usage(); ### # Stop(); # # exits nicely # sub Stop() { exit(); } # end Stop(); ### # MySQLConnect() # # connects to database # sub MySQLConnect() { $dbh = DBI->connect("DBI:mysql:database=$mysql->{dbname};host=$mysql->{host}", $mysql->{user}, $mysql->{pass}); if (!$dbh) { print "MySQLConnect: ERROR: couldn't connect to database\n\n"; Stop(); } # end if we didn't connect } # end MySQLConnect(); ### # ReadStats() # # read in old stats from database # sub ReadStats() { my $db_stats = $dbh->prepare("SELECT host, type, counter FROM apachestats"); $db_stats->{'PrintError'} = 0; $db_stats->execute(); while (my $r = $db_stats->fetchrow_hashref()) { $typestats{$r->{host}}{$r->{type}} = $r->{counter}; } # end while each row $db_stats->finish(); } # end ReadStats(); ### # StatsLog() # # logs statistics for $host of $type # sub StatsLog() { my $maxval = pow(2,31); # foreach host foreach my $host (keys(%typestats)) { # foreach type foreach my $type (keys(%{$typestats{$host}})) { # wrap counters around if they're too big $typestats{$host}{$type} = $typestats{$host}{$type} - $maxval if ($typestats{$host}{$type} > $maxval); # insert into database $dbh->do("REPLACE INTO apachestats SET host = '$host', type = '$type', counter = '$typestats{$host}{$type}'"); } # end foreach type } # end foreach host } # end StatsLog(); netmrg-0.20/contrib/apachestats/apachestats.mysql0000664000076400007640000000022110213401420022422 0ustar silfreedsilfreedcreate table apachestats ( host varchar(64) not null, type varchar(16) not null, counter int not null, primary key (host, type) ); netmrg-0.20/contrib/powerconnect27xx/0000775000076400007640000000000011000016355020003 5ustar silfreedsilfreednetmrg-0.20/contrib/powerconnect27xx/powerconnect27xx.php0000664000076400007640000000232010252634074023764 0ustar silfreedsilfreed netmrg-0.20/contrib/bindstats/0000775000076400007640000000000011000016355016537 5ustar silfreedsilfreednetmrg-0.20/contrib/bindstats/README0000664000076400007640000000505210107411532017424 0ustar silfreedsilfreed==== dnsstats v0.1 ==== Usage: dnsstats [(-i|--input) (|STDIN)] [(-o|--ouput) ] [(-h|--hostname) ] [(-r|--hostnamere) ] --input specify the file to read in or STDIN if input is on the command line [STDIN] --output specify the file to write the apache log file to --hostname needed when log is a named query log - specifies the host to log stats for in the database and to use as the 'host' in the apache log --hostnamere regex for the hostnames to match This program takes a syslog feed or named query log in, and puts some nifty stats back out. You'll need to make a fifo (`mkfifo /var/log/querylog-pipe.log` - probably `chmod 600 /var/log/querylog-pipe.log` also), and send your syslog feed to it; with a line similar to this: --- syslog.conf start --- local3.info |/var/log/named/querylog-pipe.log --- syslog.conf stop --- You'll also need to setup Bind to send its query logs to syslog, so add something similar to this to you named.conf: --- named.conf start --- logging { channel query_log { syslog local3; severity info; print-category yes; print-time yes; }; category queries { query_log; }; }; --- named.conf stop --- And you'll have to toggle query logging on using rndc: $ rndc querylog $ rndc status It's very useful to put this into your inittab, with a line similar to this: --- inittab start --- ds:3:respawn:/usr/local/bin/bindstats/dnsstats -i /var/log/named/querylog-pipe.log -o /dev/null -r '^localhost$' --- inittab stop --- make sure you setup your mysql database with the table in dnsstats.mysql. To setup the NetMRG side of things, you'll need to add an SQL test. The test I commonly use uses this query (be sure to fill in the rest of the info): SELECT counter FROM dnsstats.dnsstats WHERE host = "%dnshost%" AND type = "%parameters%" Then, I create a sub-device for the device that I want to monitor with a parameter named 'dnshost' and the hostname that shows up in your tables. When you add your monitors to this sub-device, add a parameters field for each type of stat you want to monitor; I usually monitor these, but there are many more: IN A IN MX IN PTR IN TXT IN A6 IN AAAA IN SOA IN SRV IN LOC IN AXFR Next, you'll want to create a template graph out of these using whatever colors, etc that you want (see http://demo.netmrg.net/ for an example). If you experience any problems, be sure to demand your money back. netmrg-0.20/contrib/bindstats/dnsstats0000775000076400007640000001273310233165325020347 0ustar silfreedsilfreed#!/usr/bin/perl # # dnsstats.pl # # read in a query log from stdin or a file and # keep stats on # of types of queries per server in a database # and rewrite the query log to a file in apache common log format # to be parsed later by something like webalizer # ##### # LIBRARIES ##### use strict; use DBI; use Getopt::Long; use Date::Parse; use POSIX qw(pow strftime); ##### # VARIABLES ##### ## program variables our $progname = "dnsstats"; our $version = "0.1"; our $mysql = { "host" => "localhost", "user" => "root", "pass" => "", "dbname" => "dnsstats", }; our $dnslog = "dns-apache.log"; # %typestats = ( # "ns1.pa.net" => ( # "IN A" => 349303, # "IN PTR" => 9332, # ), our %typestats; our $dbh; my $logline; my $linenum = 0; my $logat = 100; my $getopt_result; ## args our $input = "STDIN"; our $hostname = ""; our $hostnamere = qr{.*}; # ^ns\d+\.pa\.net$ ##### # FORWARD DECLAIRATIONS ##### sub Usage(); sub Stop(); sub MySQLConnect(); sub ReadStats(); sub StatsLog(); ### ## Sig Handlers ### $SIG{HUP} = sub { close(APLOG); open(APLOG, ">>$dnslog")}; $SIG{INT} = sub {close (LOG); close (APLOG); StatsLog(); Stop(); }; ##### # MAIN ##### $getopt_result = GetOptions( "i|input=s" => \$input, "o|output=s" => \$dnslog, "h|hostname=s" => \$hostname, "r|hostnamere=s" => sub { $hostnamere = qr{$_[1]}; }, ); Usage() if (!$getopt_result); ## check to see if input method works if ($input eq "STDIN") { open(LOG, "-"); } # end if stdin else { # if the file is readable if (-r $input) { open(LOG, $input); } # end if file readable else { print "File '$input' not readable\n\n"; Usage(); } # end if file not readable } # end if not stdin ## open the apache log file unless (open(APLOG, ">>$dnslog")) { print "Could not open '$dnslog' for apache logfile\n\n"; Usage(); } # end if we couldn't open the apache log ## Connect to database MySQLConnect(); ## read in old stats ReadStats(); ## read in the log and do stuff while (chomp($logline = )) { # info we're interested in my $time; my $client; my $query; my $type; # keep track of # of lines seen $linenum++; # this is a named query log # Aug 22 19:53:31.963 queries: client 199.224.127.102#33132: query: www.pa.net IN A if ($logline =~ /^(\w+\s+\d+\s+\S+)\s+queries:\s+client\s+(\S+)#\S+:\s+query:\s+(\S+)\s+(\S+\s+\S+)$/) { $time = $1; $client = $2; $query = $3; $type = $4; # if we don't have a hostname for the named query log if ($hostname eq "") { print "Hostname needed for named query log\n\n"; Usage(); } # end if no hostname } # end if named query log # this is a syslog query log # Aug 23 11:08:43 ns1.pa.net named[24527]: Aug 23 11:08:41.181queries: client 209.12.32.106#39468: query: ns1.pa.net IN A elsif ($logline =~ /^(\w+\s+\d+\s+\S+)\s+(\S+).*?client\s+(\S+)#\S+:\s+query:\s+(\S+)\s+(\S+\s+\S+)\s*$/) { $time = $1; $hostname = $2; $client = $3; $query = $4; $type = $5; } # end if syslog query log # log info to a file if (defined($client) && $hostname =~ $hostnamere) { # increment stats for this type on this host $typestats{$hostname}{$type}++; $typestats{$hostname}{$type} = 1 if ($typestats{$hostname}{$type} > pow(2,31)); my $fmttime = strftime("[%d/%b/%Y:%H:%M:%S %z]", localtime(str2time($time))); my $get = "$query $type"; $get =~ s/\s+/\//g; print APLOG "$hostname $client - - $fmttime \"GET /$get HTTP/1.0\" 200 100\n"; } # end if we have data to log # if we've seen enough log lines, dump the info to database &StatsLog() if ($linenum % $logat == 0); } # end while log left close (LOG); close (APLOG); ## make sure we log some stats StatsLog(); # exit nicely Stop(); ##### # SUBROUTINES ##### ### # Usage(); # # howto use this program # sub Usage() { print <|STDIN)] [(-o|--ouput) ] [(-h|--hostname) ] [(-r|--hostnamere) ] --input specify the file to read in or STDIN if input is on the command line [STDIN] --output specify the file to write the apache log file to --hostname needed when log is a named query log - specifies the host to log stats for in the database and to use as the 'host' in the apache log --hostnamere regex for the hostnames to match END Stop(); } # end Usage(); ### # Stop(); # # exits nicely # sub Stop() { exit(); } # end Stop(); ### # MySQLConnect() # # connects to database # sub MySQLConnect() { $dbh = DBI->connect("DBI:mysql:database=$mysql->{dbname};host=$mysql->{host}", $mysql->{user}, $mysql->{pass}); if (!$dbh) { print "MySQLConnect: ERROR: couldn't connect to database\n\n"; Stop(); } # end if we didn't connect } # end MySQLConnect(); ### # ReadStats() # # read in old stats from database # sub ReadStats() { my $db_stats = $dbh->prepare("SELECT host, type, counter FROM dnsstats"); $db_stats->{'PrintError'} = 0; $db_stats->execute(); while (my $r = $db_stats->fetchrow_hashref()) { $typestats{$r->{host}}{$r->{type}} = $r->{counter}; } # end while each row $db_stats->finish(); } # end ReadStats(); ### # StatsLog() # # logs statistics for $host of $type # sub StatsLog() { # foreach host foreach my $host (keys(%typestats)) { # foreach type foreach my $type (keys(%{$typestats{$host}})) { $dbh->do("REPLACE INTO dnsstats SET host = '$host', type = '$type', counter = '$typestats{$host}{$type}'"); } # end foreach type } # end foreach host } # end StatsLog(); netmrg-0.20/contrib/bindstats/dnsstats.mysql0000664000076400007640000000021610055724153021503 0ustar silfreedsilfreedcreate table dnsstats ( host varchar(64) not null, type varchar(16) not null, counter int not null, primary key (host, type) ); netmrg-0.20/aclocal.m40000664000076400007640000007734311000016357014764 0ustar silfreedsilfreed# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # 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])]) # Copyright (C) 2002, 2003, 2005, 2006 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) 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], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_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_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # 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 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # 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 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # 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 dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 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 # 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. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 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 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 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 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # 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 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 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 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 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 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) netmrg-0.20/www/0000775000076400007640000000000011000016361013725 5ustar silfreedsilfreednetmrg-0.20/www/webfiles/0000775000076400007640000000000011000016355015530 5ustar silfreedsilfreednetmrg-0.20/www/webfiles/images/0000775000076400007640000000000011000016354016774 5ustar silfreedsilfreednetmrg-0.20/www/webfiles/images/default/0000775000076400007640000000000011000016354020420 5ustar silfreedsilfreednetmrg-0.20/www/webfiles/images/default/status-unknown-untrig.png0000664000076400007640000000115110173042724025464 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ÀIDATxÚSÍ+ƒqÿüžmòM£ˆ©©]$‡ Ë(Eb\”(µ#—(Û_ ¹pQ®R†´R¬Dv’ƒ‹—¼å@í²”íÙãóÛo1ÏоõÝïûöiß—Ï#ðCbÀû0 Úè4FßG¾çŒíÞ×ÜjñmzèÎP% Æ÷ŠªéF‚=*n¬½‡&°jokÀøÇÏŽ6 ¬ž¦1DÈ:гgZ]&­õ­ø|A{2iÌ .æ‹ 6›…ÃÁ êgl€µ³¬}´c ¸€×ŸÏUžJgrnÔSkh·¦Ó˜r:½;××eQ t]ò7bšZNúT¶ªëÆ"-È;ç]RãˆcúnŽb!Øh,·²‚-ºñ‡0×®,íž?e@CCáb5dÛw€Þœõ/ÿgsòtHÏoš"€Ö)Ï¡ë"ÄÄË/ÀP'“7—<× .!sÀ­;ü‘HðÉjôÃTɦ8õ„Àî½½PLÝZpÓúnIŽúhÎFl¦[&z°ýI¶•T§“ø¢'Ç•¹@XÊq-ÇeأΑ‘„š1¹ôßüña˜%Zq'Ïñü1”|ò”uk'ÌXIEND®B`‚netmrg-0.20/www/webfiles/images/default/edit.png0000664000076400007640000000102610173042724022064 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+mIDATxÚc` p(I0dÝŸÏ `&R£€Š_Qu4sÓ_A•‚ßnÞû¶“‰2&&bùçyÆ}cäáÔ×gHÉõñI°Ш¦’<§ß0âï·aa* 'ß~Ý·øü:Bš-Ê u“j Uÿ|~ÏòçÛ'†Û7ßoÍí|Ûûðéà Œ84zLì2I “ˆþóõßoŸV¬:«yêË®WîÂahæãc‹\6Ç:Í΄ÓáÏ—O Þ|xÙ3ãqß´U§¥¿ «EѬ Ë“¹r¡u¼¦£ùŸ/.]~}oò¼g¹k÷Û†Íyp?Š4-n+-ôGá÷ç ë6?9xììÇ, Æk¸¬YGKxñú…^‚ì?…^>yûgÝ–§S*ú^–¥þà‹ f…ºk“W_±°ýûüùòÕ÷•@S‰I9,N œœlŒÇOþ»(Ïù¥ ¿íÙ9†á % ”ÜßCzIEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow_limit-up.png0000664000076400007640000000057310332536345024123 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ÒIDATxÚcd``°bÒÀf"@¬€.ËÂÂÂñïß?^ ~EóÁˆÍX æÝgÏž•ùÿÿ¿%L1:`Â¥¨Éˆ%€Bû±¹ C3²F$aÆÃØ `†1LMM%˜˜˜¶#k|þü9ŒÉÄ@¼ˆß¡Ø Ò ˜íh6¢Í»‘]ÀÓr5Q¤ pÔ²m³addÜdoüúõ«Â¯_¿à&333³üýû÷RôÀB”6î GU×ã°µ*;ªHCT3E*KgüyzIEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow_limit-down-disabled.png0000664000076400007640000000057310332536345026213 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» pHYsÃÃÇo¨dÒIDAT(ÏÕ‘!1E_›fÍÚÅs·`O²³·à@H‰¨@ $é`ZÒ,»@‚¢¦“?ÿÿNÿÀÇt à·±€ýåå?YãˆSmŒqUUÝÙ9ç‹¢ðÖÚ½PÕ1¦É ˆ8eYæÐ4Þ»ÂÚ´m{æ€ÿbÚª.ëº>=ÿ,"^U ¶IøX6Áq@¸HÂÞ´EÄ“ÎIxɹ½«Šsà4$ÌW5fݦµv¤ªWU½õçbqé *„ð.¼ó‰\‚]òIEND®B`‚netmrg-0.20/www/webfiles/images/default/status-critical-untrig.png0000664000076400007640000000106010173042724025556 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+‡IDATxÚ“±JA†g/‰(Bˆhc%‹”"‘h+Áh|QRja* ïž@ÄFÅ^ðHÁFS©…(jÀÂB!—cý'™“Ë%J>vvvÿÛ9E>ÓDQ `Œ€P7  ˆ>üû•O˜Æ°&‚ x.ˆSsãûœ·ˆE˜gàÁïÀX¸ æÁ!ÖOb¹ê._ Á=3›iÇÙ"¥¦ë%­ïT$b™¶ýн9ÄæÀ:öV ɱOlëõk71O‚qø+ˆÝš™Ló#ð–ødC犯ª]w~‚Ú-†Sw$ þ0æ!‚§fr:I™Ö“â½€~0hP÷Xü Æd~ÿØ[‹KÞŸ†4@ŠË¡\ׂÿÞAXÇÃå¥d\Ö òwY\!3Ëå7OÁ·©ÙM5p áŒU,V¤ÖQÑü6É,†.›äë'Áö\İ .TÀkÏð [Äòai€´”ƒäqøÊ%l~ìøc´••hHªQ ¦áÙDYqÚ³ŸIEND®B`‚netmrg-0.20/www/webfiles/images/default/view.png0000664000076400007640000000133310173042724022112 0ustar silfreedsilfreed‰PNG  IHDR¯TV cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+2IDATxÚc` !`„1ÒÓÓù¸¸888ÔþþýûöçÏŸ{'NœØ ”âb ~“˜˜"((R£ Róãǘš?Ø g¥¥¥“TUU;?~üöÑ£Gg>þ̤¤¤ÍÌÌœòòåK†ß¿K6{{{—ù¬/^¼¸ñåË^99¹p333_ %Gž={öÃåyyy‰@ƒg¯]»¶ûÀµ0WHHH„%$$´þùóçàÕ«W÷ ž»fÍš~\jzzz*@¾Cq¹‹‹K×­[·žnذ!Ù{@—]}óæ ],ÐåRÏŸ?»~ýú8t5ïÞ½²±±‰:|øð1 %÷‘ gíïß¿_ÃnÀ`:óéÓ' >>>e š ØÔ<|øðØÇ%”••EÑå˜þýû÷‘ÜØ"DRR’èš?ÀÈýŒDœj€‘ûçõë×?0 âýbbb^æææZhrZZZ©@o_ýúõë6 7cccet5êêê! 5¯^½:ƒ‘ZšššŽÜ¼y3SXX8 ¨ù0•¼ÐÖÖ–“••4<èòåËÍÀHï¹qãFšPPÍ`¼RQQ‘“‘‘iªMªiÏ^¬é<<<ܨ¸ýׯ_À¤ÆÌÆÆŠŒû÷îÝ›´gÏž 5z@ƒ» jØYYY€Iõþ;w&íÛ·oÞL"ÒÒÒššš*À”ñ˜üvÅ^ ©5Õ××WÇ£f `øQ!–J IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow_limit-right.png0000664000076400007640000000063010332536345024606 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» pHYsÃÃÇo¨dïIDAT(Ï•¯ŽÂ@Æ¿9V\šTœ¸¤'Hz1¢§àzÏ„@œá<¢°‚ÔuÝ3,Ù´Û=øÌ$3óûæÏ#*Šb“eÙ¹išk ¼ðö‚qÍ­µ»²,ß5ðƒ€#P·Xõ mÛÎ’$‘-3¯êº¾ø=t‹Ò‡ó<ÿMÓtqo$:t]ç *ú¿µï‘B)õÃÌ©Ë= ûJ©Wÿæ´ÖÊ3ÈÑM£“1]ÈSD¾¬µ§g×>XÐ.áÖþ4ϸoë>èÃU®sîï~ï¹çÜûsˆEÖ1/NdK ÖE˜Ødm9b¢ƒ`ÔŸÀNꇀp“ƒn؃r*+òº*rGÐý0B|ÂüG5ñ2î6´A |w5»ïbÒp ÃP}‡7@#;ˆ>u½ ï3gÐn\Y9ÏɵQ /³Ð«Ç·X›˜©fKަ:ýNø7!a=ñ!tÂ…Õ\ ”ž8USï‚]Û9ŒÙæC0HÇèÖW03ÂLÞº:mG]ƒ{»Æ\03ÂfÌ)´jÃ^‹¿— pg ÿ)ë¯ñOf}žúÒŠ“»;_†…ùØ¿0/¶g7gÇÍ„ÃK˜KhцÆÞþfÖNí.K þ‹yx_bZþ;~óÏT£Ô‡ë IEND®B`‚netmrg-0.20/www/webfiles/images/default/applytemplate.png0000664000076400007640000000115310173042724024021 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ÂIDATxÚcfÀþocyòC-ðüõ·ð&l‚÷^q[«} 266!Ióÿý 6na0þË&Ëpþ™ Hã11–PGGÆ?pÍâ|?£¸À|Ý­ Œ@a8þüŸ‘áá·ß¿þüûèè¨ùUKkD½´e¾¡„ / fã`gp58ùÿè¾F=eÿ˜}®?ãºĈ¨gb``òYl¶Ÿ@ú5þË «£j T°‰ cƒ)·öIEND®B`‚netmrg-0.20/www/webfiles/images/default/viewgraph-on.png0000664000076400007640000000066510167357434023567 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ IDATxÚcd``(â ¤ ÞÀÕx€ ÀÄ@8Í,ähÒ•bàϰb°&Ùæ§M †•N Ó±Úü²‰Aÿï?ÇÿL ¥ëÎ#˽¨cÿÿ—¡‹™AHÿk~ÕÀÀó‡‘Á•á?Cà¿¿ .@!IÆ Ÿ50a`d˜-ùŸaå‹ Åÿ˜jj¸á~îôaˆþýŸ¡•é?ƒÙ ÿ?Læ?3´ÒöÏ&122ðÙp—>ûÂðšEQˆ!š‘ó?~¯ ¡Ë¯½Êð„éÿ†ï䄸Íg ?)‹çËÏX™I4âê ¨fI†ÌŸþ¢+øòƒáë£Ï ïÏ>bxwòÃ7,f<½T@zkÏ‹IEND®B`‚netmrg-0.20/www/webfiles/images/default/status-critical-trig.png0000664000076400007640000000107110173042724025215 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+IDATxÚ“=KA†gó!Bðˆh¡ ˆ"D°±ˆDm¬ѳ°!¥6©L~ˆ6‚}À3A‚¢˜J,lŒ¢,,Ò¤1¹¬ïÞÍÉå%³;»ï1³3'Èe’Hƒ[c ´"¸Aôé¾/\Âi¸uäÁ#0ÁÙg*~ÁE˜… püöd¤„k`áüÄsª{*5÷¥®‡©RÙ"!&k')ï)L ÃxÃÝ8b³`w‹þ$Ñ26#`;©ëT­ÞB¨êî=XR­¶šŒDN©P¸Dlh)”æãǹ±R5ͬ‡©ÑÂ`—˹QdáWâAðl'£ô—I9ΫW]>jÝÞ€¿€!Þ?ü#vÎTëÊàËdzÚašxúh"¬âáÜ2ÕÖ<ê7•8ü .r¹w &°6Èž¦¸†pJd³yîµÆšß!™ÛlqHŽqžöŽç"Ü ¨¨ÖqœñŒN·°NÌè…[âºB.ó¬ŸáòSÓ£¡­DÝÜ’· Ç~ÌKmÞ³IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow-up-disabled.png0000664000076400007640000000051210173042724024457 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+¡IDATxÚcfÀ,XPc``àzàÀý¸Ô0cœ?~##cã‡ìXpÀŒÍFF¨Dá4€›0>T3Ì ;‘Õ3"Û¤š‘%ýÛùà‹ÂWŠ ªsÙØ2ÑG¢’"¨¬øû÷.ö¬6ì33²#ÿ3]R`eÕ¾˜‰‰•‡X‘Ëš‘|)Í–2IEND®B`‚netmrg-0.20/www/webfiles/images/default/status-good-untrig.png0000664000076400007640000000111210173042724024712 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+¡IDATxÚ“;,DQ†¿{– ‘x„Få…RDA°J"R"‘è<*zñlhˆV$dD#ÄV…FˆG¢ !¡Ðx]ÿ9÷bw=bnfÏÜ™ùgÎÜÖ#UæÉçvYµÒ2iKù’¼g„ÛÔtïÓš%†OŸuî4œë7;Š ÿ¬L—‘óLgUXýèÎA, î‘bîlç¤ 4::²õUáúà‹rF]NÀy‚n^zÇõ¡@4œr¥`ƒtS>»M÷:÷lQ‰ë|iükIæhQÒп–İÊëéë9M‡=²žu–õô5–GQ*0Œc²Tž.7—¥#G7£aK{uòó#S¦(Üp£¹3Çå¶zwÞÕR>IEND®B`‚netmrg-0.20/www/webfiles/images/default/status-good-trig.png0000664000076400007640000000112310173042724024351 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ªIDATxÚ“K(´aÇï3šHæ#”Y¨o#YËÆB.‘KQÊîC±¢°—1lØ([)LYPR"³š,lD.eA}ÂÂÆmüß fÆ%§ÎûœÛÿ9ç<ç¼ñ4M€Z$•‰ Ä~,Îe‹òL˜AþLJ[ïÒµÄè‘ů3"Ë!>A^(”lûüféc3laHÜ1Ç  ˜I·¤f!æuÁ² vK e€‚ ƒayªu¦Š÷å—ïLIz%7¨ž>µpvüUÆZÉhOl÷/ΗJUnØ"FéÖ‰çqbì:¥ZŒJ/á3e*[Ðkg[q,â3ÉpìUð=•;_é¾é\“mø=¥$ŒJ8ÑYì½ýÁ`×çŽîžl®íÌQªœqXzU¸üø¤4CNŒ;ó<ÃR|üÑþq!¹R+b{›nÅ;Š©‘/âÍ: ,Iˆ:úµ$†]´”¸ž“š²¡SÒ£3:{oëS[YñÀD°MAòdisú²ÇáÒ½Ó£aM{uôõ‘Län¸RßÉmxô ÎFv÷×R:IEND®B`‚netmrg-0.20/www/webfiles/images/default/status-unknown-trig.png0000664000076400007640000000115510173042724025125 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ÄIDATxÚSM+„Q~î;còPD‰e#YŒ0J‘ 6ÊG©)6³¢äH6l”­”ARÊLMdV²°ñ‘¢ÊFÊÌ;×sçN̼ƒœ:sÏ9÷<Ísîy^4‹ï}€hdR HÏ;ž'¬mžçÔnñ¸™NÐ Âóœnñ*‚ݺ.—Ž X ?÷—`è#Ñ:%ã z YÚ7“àÕEI­sÉë 9£QcFÙÊûl)qš•%çÏ-ò±ÖÍÞ)öÞÙ€áAêçY¯w2?ÇB€s£‚^ʸ!cµµ£[O! ·‡,ù‡kC?NüHQ5McŽ€:dš“} zfîâ(6‚e5`»RRJ~1ÒoÒ‘qß< ¼ÈÀÿÍn-(Ú×€Y“ÌÏþ'ïÔêð<¼ZF‹Z‡iÊy^<þŒñõýzejçJC&Á9TøêE¾½=ϽÝ.›™èJM¯ôCÛvv<½kÁ—6·SDìd8ý?‘`2ݰÈ3ØOú#¤Õ«Sø’'Ç…©@ XY¸Œã °ìÖëHØ›ž1º t]þòaX-T 8ø&¯™chû¾“4LÑçëIEND®B`‚netmrg-0.20/www/webfiles/images/default/status-warning-untrig.png0000664000076400007640000000117310173042724025436 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ÒIDATxÚ“½K›QÆŸ÷MЀ*šøX:YŠT°ø±8)jqpEœšÅIAü”Ò¥]*Ý Õ€‹ ‚(fD± * d4m´¿#oJ’Úâ'÷ÜsŸçÜsßsâ¨ÀÒiïî4€ÛTÆz vG‰ÚZ]ò¼sq¡.–1€¤Ï§ƒû{å5±ï²¸ß¯O‘ˆÖŠÄ&äp w5“ÑçXLÙÂö÷UkNɾPÁ÷G±•z{«VZ]>..*DéÓì; 삹ÉIpÉ~ñ÷$8õÅã‚ãÆ™ÖVUf³ÚæpÔ°¾#ýýZ®®Öz  ^çç•t½³e¥"œÅoÖß Æ!Ñh#Ïåç¥ëêÈømú·½ñ8?X*./õÂÕóÍ_p)ᘖ¼züzŽöþ#Þó8M,755JÛÍ; ÝÚAùsø©'„¿8›2Ž×ó$Irny¹öøPHãã:£Š·—€MSl"ìä,i½fÌ唸3$©”º ÄŸ3$$úê[ÑxžŸë¥ Cøi­³äÇÓžE<\(,›]])J¯qmÎ+¼ð½¬44èðÉ?F©1ŠUÜä2¾™Ògäí7–o¶_Ô*j\IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow_limit-right-disabled.png0000664000076400007640000000061510332536345026356 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» pHYsÃÃÇo¨däIDAT(Ï‘!Â@Eÿ4MŠ!A"$AÁö$lO²é $¤AÒ tÓÌ`X²lw!ðå̼ÿv E±eæ‹Rêæï´Öuƒ™yJDcÌ0°ž˜Da{ôÁ鳆öMÓŒ³,³{cÌZ)uïÀv>ܶíù ÀœˆŽ¾Á·Ú®¬Áàøe@D=·vGu]§UU…V£$Iú"O‘60.,˜¹úµöÀJk]Ú­ŽÇ–Nâø‚CÿìÌJYçy^ú7ÑsCà78šààþÃ{uõ?r[H…a\IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow-left.png0000664000076400007640000000051410173042724023222 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» oFFsÿÿÿñ}t“¢ pHYsÃÃÇo¨dŽIDATxÚ¥Ò1ƒ0 Ðo”ƒpç`€ªEe©×Ê¿ k'3¡(*)¸–2xxŠóผ¼þæÁÓbù»¬*vΛgvã™ÓzáŽ=дAUßG"Y ¬!9ŠÈG5Rz¸]Åû$9ƃ™ÝO®j)÷ Uí·AR*ø3v’;ƒr‚j­#„Hi(&ÒVIEND®B`‚netmrg-0.20/www/webfiles/images/default/status-warning-trig.png0000664000076400007640000000122110173042724025065 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+èIDATxÚS¿K[QþÞ}ñ%Í´˜hBQ„,¥8TªYt±ˆÒ¡CŠ!c1S ¥ÿ@Jq±‹à.X]D1”Rt¥©Ð„Ä4˜EÐÔøüNHJÛâóÎ{¾sνç< T,Âqu…)ªÉMå)ù›¦!ÙÓƒ_ñZ]Éf¤˜9¥ë8º¹A… >ÚAñ[,Xòx°Ù ãT7J%| Pn¬pxÃíÆc&™l™¬UÁÒêå%>Hk½½XL§á2 ¼¦=ÂÌ6ØW ï¼^ü`‘0L0A„ Nõh/`Å7ñ8:¬öš"ûè÷P>‚‰ÙØÖÏϱe³á8 ¤Tíqv¥UkÞRÄ]r1Á{‰aÕmò&Ð?ýlëD"L:ñoªÆ˜HSØóyt*ÜŸ,­Å¾s$µ§?ø¸z&££¸èîFQÅð€Æx(„¤ÕН<œ¡ÝÞ¼V&^Î…pÆ‹°õ/N'öI¹¼Ë…°Ï‡ŸšÂ0ƒ?‘e›JäG=>¤dÖ´• ’–$—ÃÑû, w…3_mZÏLÓlù~Ëèdõõ¤ý”~w#° ,T(À[.ã9UÙs{Í}!»Nþì÷ãø¯?F+q»XIq}K­×¨Ó-…ͭüe³IEND®B`‚netmrg-0.20/www/webfiles/images/default/parameters.png0000664000076400007640000000066610173042724023313 0ustar silfreedsilfreed‰PNG  IHDR“´Ø cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ IDATxÚåÓ±JÃPÆñ%ƒ-89Ä"g_¡KÍä ¨àÒA±Ð¡àcTèPÚ¡n‚ZÁAhqs,”ºø‚ -"(”ŽþœÂ¥{6?øArBr’›ssn]äÔ¥Öæ‰1Àš3ÈòÞù¦Ö$<`Û¢Ñ 6¼‡K^°®Ç-´ñdÕì¯&&(ã×Î(!¦¨¢‡gxD‚}g˜Pü ì  š8Ç.†ø\¶Y²¬}]F™¾C­wp…Ûeÿ™Y”P×:EÝb@摽•Õ¥“ }^˜Ðت™ì£céù8eBß-†DþÍÈÛ[’Üa‘~íE³{Sꉾ„4ݲhüñ¾Ù/×"÷ïòªn.Ì×—IEND®B`‚netmrg-0.20/www/webfiles/images/default/netmrg-logo-large.png0000664000076400007640000003143710173042724024472 0ustar silfreedsilfreed‰PNG  IHDRúúˆìZ=sBIT|dˆtEXtTitleMade with SodipodiŸô/'tEXtAuthorUnknownŒ! òzTXtDescriptionxœKT(ÈL.)-J_~êô , IDATxœíy|TåÙ÷¿³e2I °ïVAK€ ›ìk­RmëV[ûÙhyàŸø øo`ˆ¡ï@"‘4ÉBD;eÊå±ÇSF­Øl6­Âÿø+0púŽ$I{ é믿®ÔqâÄ åå—_VæÎ«x<­¢?,æ­ }w‰„þˆÒáp(ÅÅÅŠeeeÊâÅ‹•Ûn»MIOO×*új`pÐÓÈ7+‘´Tî#@ˆÙÙÙª"Äëõ*7nTî¿ÿ~eàÀÑÜÛïþŒlF¾y‰¤¥°žá-\¸0,¡²ÿ~å©§žR&Nœ¨8N­¢?¼ÌBdèI$’(ix ÛÞ½{5 ½!§OŸVÞzë-åúë¯WRSSµŠ¾x¸H3ðs‘Hš· ®ŒŒŒ¨EHUU•²bÅ å®»îRºwï®Uô^`°È0òC’Hâ÷ Ô‚ tz Û·oWyäeĈÑlÝíEl f#~$‰ ‰ˆÐØO@ëׯ¹ÐrôèQå…^PfΜ©¸Ýn­¢/^®EΑH$™E€`ÒÒÒ¯×k¨ÐráÂå½÷ÞSn¾ùf%--M«è+eÀ@gC?Q‰Ä‚¼H€Hn¹åÓDˆ×ëUÖ­[§,X°@ÉÈÈÐ*zð9ð;`¨¡Ÿ®Dblˆm,?a¼ÿþûfë;${÷îU.\¨dgg+‡C«ðÏS‘)¹’ÀHDàv»•ÒÒR³õEEEÊk¯½¦\{íµJJJŠVÑŸþ Ü´1ôÓ—H â\ø³fÍ2[¿š¨¬¬T–-[¦ÜyçJ—.]´Š¾X üèeè7!‘Ä\ì/¾ø¢ÙšÕ…­[·*=ô2lØ0­¢W€]ÀcÀhdJ®$NéAÀ…m³Ù”cÇŽ™­QÝ9|ø°òÜsÏ)Ó¦MS´Šþðw`2%WGÜMÀÅœ™™i¶&cιsç”wß}W¹é¦›”¶mÛj}ð!p+ÐÁÐoM"‰•\À>ú¨Ù:4”šš%??_¹÷Þ{•>}úh½Øü0ÀÐoP"i‚Öˆ³à~íŽ;ÌÖž©(?þ¸’••¥Øív­Âß< L@¦äJLf>h=ÌÖ™¥(,,T^}õUeÞ¼yJRR’VÑo×!Sr%&°ˆ€‹ò®»î2[[–¥¼¼\ÉËËSî¸ã¥cÇŽZE_ ,~t5ôÛ–´Hœˆºm~âŠ+ÌÖS\àóù”Í›7+>ø 2xðàh¶î¶¿†ùåKš¦¹ì£NF$…Ô“ššJqq1.—Ì”o¿ý–ÜÜ\rssùôÓO©­­Õ2Í ÷âßZÄú‰D!À»Üpà f;ÊfÁ™3g”E‹)óçÏWZ·n­ÕÓŸC4¹¼ hkè•!iV$àâzûí·ÍÖH³£ººZYµj•rÏ=÷(={öÔ*ú ¸ècèUÒ‚i¡û`DZg=N§“S§NѶ­t±d×®]äææ²xñb¶nÝŠ¢(Z¦)àRˆ¿ñc ‘ñ ^cÒ¤If;¿ÇñãÇ•—^zI™={¶’˜˜¨ÕÛŸ^r¡W‘ÄòÔyú¿§Ÿ~Úìë¾ESVV¦|ðÁÊ­·Þª´oß^«èËÅÀí@º¡WT3$ÞC÷ŽÀqÞÇèÝ»·9Iüðù|lÞ¼¹~Ïž=š¦A4¸\Œñ¿ÒÓÆ–@¼ ýÄé«z ÄîÝ»M2GÒû÷ï¯ýúõëñz½Z¦9À¥ûúõ€¦ý?IüG@È÷À˜¹J¤¤¤Dyã7”ë®»NiÕª•Öÿ4ð&ð •¡W_Ï= ‘wí·h³iÓ&ÆŒcŽEÍTWW“ŸŸOnn.yyy9rDÓ4ˆäœ:o¯i’æH< }âüt=éééœ8q›-žß–`ûöíõ!þ_|¡y.‰^ó$sy•€0îöÛo7;•Ä€#GŽ(Ï?ÿ¼2cÆŒhaž¦ †^© ^]ŸQɯÊâÅ‹ÉÉÉ1Ç"‰!”––òñÇ“››ËÒ¥K)))Ñ2Íàc„§_ЏÏoÖīг€ <%%%x<2Ï¢¥àõzÙ°aC}ˆ¿oß>MÓ ªéÔmÝí×ÓF«¯Bÿ¢ÌQ=sçÎ%77×$s$Và믿®ý¦M›ðù|Z¦ÙÃ¥ûú͈=ü¸'^…þµÌ^~ùe~úÓŸšdŽÄj±téRrssY±beeeZ¦9,Aˆ~%"[/.‰G¡÷EÔ0«Çf³qâÄ ÒÓe¦¤$˜ÊÊJÖ¬YS¿uwüøq-ÓT jä"ò7Nêic¬‰G¡ÿøsÃ1cưiÓ&“̑Ċ¢°mÛ¶úSw_~ù¥¦i)¹u!¾åS1ãQèk«üñä0ÇI\søðáúûúO>ù„šš-Ó|‹üb`LÉ7¡_†¸oò+9¼{÷n dŽE’fÃùóçY¾|9¹¹¹,[¶Œ³gÏj™æ,¢‡}.¢pæy=mÔJ¼ ýGˆ¼æzz÷îÍL2GÒ\©­­eݺuõÞþàÁƒZ¦©áRJnpXG#"Þ„þ.âðB=¿úÕ¯xúé§M2GÒR(((¨ý–-[´VÓÙÉ¥ûúmXM'ž„ž€8ÄâwBiÍš5Lš4É‹$-’ÂÂBòòòÈÍÍeÕªUTTTh™æÂËçk€*=m $ž„>ø¨á@›6m(**Âétšd’¤¥SQQÁÊ•+ÉÍÍeÉ’%j™¦Xý@S^ocÄ“ÐÿüGÃo¼‘·ß~Û$s$EaË–-õ!~AA–i¼ˆôîºÿ=l‹'¡tk8ðÏþ“n¸Á$s$’Æ9xð`½è×­[§µÆ^.åáoBcJn¼ýJλ\.Š‹‹IMM5É$‰åðÕBÍp[¯Ì÷™3gê·î–/_ÎùóšvÝŠ§ír¡~Øy½ñ"ôß7˜:u*+W®4ljõ¨­„U³ õ@ÈzÎlk¥¦¦†µk×Ö§ä>¬i×­ÿ”Ü=9^„¾ Þpà™gžáî»ï6ɉ¥¨¹Ë'Ù]`³Ã Ç,éÕC±sçÎúÛ¶mZ¶î`+—²óv>!„Þ•Ú_‡¢G&˜#±•Ű,.| ¾*px`ðoaø£f[¦‰ãÇ×oÝ­^½šª*M»n‡¸´˜÷)PBÿÄŠ{=W\q;wî4ɉe(;KÇBù Pä¨;[ÁO‚3É<Ût ¬¬Œ+VÔoÝk™æðž]gÛbAPm¨yóæ™a‡ÄJœß¹WBù1‘àƒ½/›b–ž$''ó½ï}üã²~ýz,X@FFF$Ó´Ò¬îÑ[!²áüŠù}þùçdffšc‘Ä|N ˯‚ês„Ì"u§Áü`ožÉTß|óMý}ýÆ›j„ñS« ý:à_ :wîÌÑ£GeIç–JáFX1jKž3²ž‡¾?6Æ.)))aéÒ¥¼ñƬ^½:ðaèdõÐ=(lŸ;w®yKåØ øøê¦Eâ9_ü´>‰+ÚµkÇO~ò&Ož¬öð ÐÊBw³e9çÊ·ÿ‚ÕßoeÛªJàÈ’ØÙd1BGÍko¯M>i8œœLqq1‰‰‰&™$ ‹Âõpþt› ‰iÑÏ·÷eØòKðj8%Öv\£©\T\qòäI:w?(°òJEëž6mšy<°ñN¸p6ú µ/ôþ!t¿Új¨ôå°ãQm"aÇÉuÐ1[Ûÿ–,Y¢&òƒ@ˆŽ'V%Hè2lN®ƒÒCB˜¾*8[;þKFâö°ágpl%x«›žëóû`磑…ëÔ–Áÿ£ýÿÇ …í`ÝÐ}Íîív;'Ož¤}ûö&™$ ‹åáä'<Á®ðUCúè}#t›‰ ¾WE ?…oßB‡æl†Ë®ˆ~. R^^NZZšZŒIˆRVX5trÝYYYRäVçL}ÖÄ“|PsñäÖñpj#l¬!~¯ùÐ=v<G?ŠÎ“7Ä[Û‚)6ýÜ8$D•›3ÀúºÄÐeØìxDxêH¨Û*;[;ÿvýIxt½D€Ž},òá[õÒq^k°xñbµáe4(;mÅ{ôöÀ˜ÀA)t‹SvŽäÒh†VãøªD¨®«ÈëæöÂŽÿÕ^“ñù|,]ºTí!¿›v+ }v]~ùåôïßß$s$a±ë P,ÜP©oAÅ)³-Ñ•-[¶¨Õ©«& ¾¢….Ãöx£ê,|ójäa»Ñ( ì^h¶ºbµýGXMè‰À´ÀÁ-ôùpb­ÙV4ÎkWt©ÇW_¿ U4šÚV«ÃjBŸø"n×®ãÆ3É“¹pV_«æ@Ñçf[£Ž· v?©=¡Åhöü­éçÅ૯¾R{ÈòB:h>{öl‡Ús›75eðñT¨) TOÛWVcßëÑ-À·\¬'xcÚ/ÁBxóˆŠÉ~XIè6ÄBœ-6l_{ƒ(ªPWÝ·æ,› ¶ˆ¬‚â[jáœ&³¾ñçäþë ÕaµA+ }$Щá€Ûífúôé&™c"Û†“ùà­l0¨@õYXš%J'Yï_J~‰'jË`ÇÃÖÞ%h‚3ßndý–jY^èA®{Ò¤I¤¤¤˜a‹yY»þÔªí%û ²DÔI«Ô½kOä|ñ»øóæuÔ\€Cïé3בepòS}æ ‡òã,{r:µÁ¿SÇèP‡¥…ÞâÂö³_ÃÚù/l)µPv\T>5sõ¸îðJ¼R[ýa—3»aé8X{=¬œeÌ‚iÍXv¹Ÿ«žÈ#Dm-«½'0$ppîܹÆ[bUgÅ‚›ª'@©Ç/?š"˜Áÿ£Ï3)?.NÒEJe¬»òFÁ©Íâs0bÁÔW +gS}î;>Ú¥ªgÕ°¬#ô ×=|øpºvíªï«Yǃjj™âƒÕóÄnËl_•ð(«f‹ ÀHÎ@±E·û"¡¶¾øïðŸï­†Ã¿zÂÁ^Œ¼ÄÏ5`ùñ# ÖÝ Å[ùdO5çƒßKí—U±¬ÐuÛET)É¿Î÷· ùì7P¼5òÌ2o…ð(ù?0vaIËá«r¶ ¼ûÐ{ðnwøò1uùÔ¶ç¨:'ÂùòãúÚ¹ãQ8ü>x+ÈÝ®úŒ4ÒcÝ Boƒ(å‡îB?ô/‘ç\[ŸüPß¹£áÀ"Øûwí9¼åâ¸çúÛõµ+z^±µß«‹GÀº›¡²0ŒÛïÅÓqú9”‹àË?Õ_#¹ª‹í¨a«Ã BŸ ¸tëÖ+¯¼R¿Wðy…׬-žèÔFøúEýæ×JÉvØpGô§µjËÅÙg¿ÖǮưúᕈQ ðS8·×¸ü8ä_ËÆÃéí‘­G(5b tù„èL ׋"hw|ßz–q,5$VºjIg]9ð–Øƒ®£¶L?ðË5’Ê"øxš~G2kË`ïK±=Š/‡W"ÅW+rࢇþÝxQ`JFûªDrÓGSÄœZ8·VÌôÛ… ¶oD4: ‰ÙBw!<ºº†í¾Øz_ð~¯·VÍ ¯v™Þøj`ÅŒ‹Ft¤¶¾|}: jÏoUãû½ÞrñC`ä–Û×/À¡wbSE¥o…¸÷׳yA¼^‰_uìòjKáøªðL×ß&¶NÿmÓ¼ª7{oššÒrB×5lßó·¦O)y+į­[n….. ÆPäux+ ÿÑá$ZâõðŠ•¨-…Cÿ†-÷6þ¼]OŠ­<•ÈIkØæ }"#®‡ÃÁìÙA]˜´QSvñâ ãWº¶4ö[neGŹr#C_o¹ðÿ¾7ºûÒ8ñzxÅjÔ–ŠrÇ£êY&ªÕªD{¥•°fêÿ²¼Ðƒ\÷øñã¹ì²Ëô™½àéð3Æb½åV[)šš‘›^[ öç?Ò.øx>¼b5jKÅ¡¥¯6ψœùŽ`ET_Îň÷&1SèAE&t Û«Ï_,.Aˆ«-·ÒïÄ^léasïqµ þä§ñ}xÅŠÔ–ÁÖûaÿ›âßÕçÅ.L#·t!¶Õ–à—ƒ³„Þ È ÔM軞Ð&*½·Üö¿  „Ó;¬³Z©à¿ø]ü^±"ÞrÑ£î»\ñ]TŸ%Ô~½ÏKÕûD†¶ƒy-™~¼Ôp`À€¡ê_EFe‰ÈIÖºªíH‚~·Ã˜g´ÛPuF¤LžXmÌÂ[48SÀÓF> =‚¬37Ò:?RÍG¢øk˜ÐÀúo ûOAÕ@Ö¯°Y=v«í;ÿ]ˆí–ÛñÕð^_8¶Âú"‡Æ=|s:¼bU¼•ŠB®¶¯!L‘ƒ9BOFT{õC¡—ŸDTOE€–-·ÚJØø X•#’.¢µÁhÿÍÿm^‡Wâ˜h¶Õê0#t¿ø á@ûöí9yò$v{”¿;~û_ÓÇ Ù ãU0}EÓÏ=½S”e®(l>a®óbÇSéÑM囓ñ`аtÂ> k†GrÝsæÌ‰^ä¥GàÀ›ú]˜ál¹)>Qˆ`IÖ¥žàÍ…º“~S áÍ·ÈÁønªvbUÒyÛƒúWZ©Ûrë4 Zgø?Vú¬¹Î}ݼ.±!¶Õ" ÛÁøÐ} z6$&&RRRBRRRˆÿçÀ‡ƒÊ#ë…Môî¾f78.æàï6ýB¼ž¼‡•Ĉâ ÐñWà Þu ¨o¸…ÀèÐ=ÈuO™2%:‘lý¯ÖMkpÊ­êŒXlÛt§ðöRä’²ôKU‘&B‘ƒñ¡»þÛjg÷ÀÑeA'}t¥nËíÀ›¢ˆ@¼­¨Kâ½Âv0Vè—~MÎm6[ôÕd>û1}´¼ò^\bU5"¿]MB72trÝ™™™têÔIí¹áQ²N®%Ìt_‰$nX³Jƒý×9Dïóˆ1Uèóæk‰ŒÏîÑœDb.!¶Õ>4•%2Jèí+î~Du~jóÅ& ÷I$'O‡l¸†%ôY€_“óž={2dHP¦ðÙòËøÈ%—H"dÛ!8œþ^K%Ã(¡ë{öüÄZÑaC"i†„Û??ýÒFÝ 59Jè[~)ÏHKš-zn«Õa„Ð'~MÎ[·nÍ„ A]˜Âãèr¸p@³$ëñ] ì8¢úPTB7b=ÈuÏœ9—Ë¥öÜДŸ‹o[~%½¹¤Ùbn7ðm4ó!ô Œ˜&Ãöª³P²жÀ‰|(ùB,¼9ÜRä’fgÏÕˆõ¡–áˆ#uõ8NŠŠŠhÓ¦¨-B.Þ 'Ö¯]U"J:ՖǦ›‰DbAÎW@û{ :øÅ`K4sÇÚ£¹î &Цf¬} Nm]+‘ÆÚ0‡Ü§s_2‰Äâ|¼[Uä'Ï¢Ûp¡çÌ™-Îq—½4X#½¶D²8tI稳Âb¹êÞ jrž3ð,TŸ‰áËJ$ñG­–EYÒ¹1b)ô o>xàzzZ.¨I$¬ßg‚=ËUzÌo¨Ðs2=1,!‘Ä/!VÛWºœŽÕ=z+`bà`NÏY´A"Q!Ùp ‰•GŸø59ïØ6Q=墛DÈWÇà@Qа±§ ±zPØ>w¨›,!‘"lßœÒë5b!tâXª9WÈBЉ±Ê†kH,„>ðkrž”SÆà•$’8çÔyØrPõ!Ë =(l¿z xÔž*‘´l–ì_p:Ì@‡Ö—ˆ…Ѓ‹L¥ÍH$¹ÚÞDÓúÈÑ[è>~/`ƒ9Cu~‰¤PQ +Õý¶®a;è/ô °}toèªó«H$Í€Õ_AypËÓ´-Ó½f‚Ó^»ÀÚ¯u~‰¤ðâZÕáe€î[TzžGïœÀœVÌIsázà_zOª§(çè<ŸDÒ¢°‰æ Åbn=C÷àúP£®i?Óñ%$’fBþë°á¿!ò ±x9½„î®ö3˜­ÓKH$͈×~£6ªûj{z…ÚSÿ&çÉm #K§é%’fÄ©CptÚ#–zpØ>l8Œn¿.‘ÄÛT;+mÔ+ºë€B·!âü<$‘H€mKÕFcæÍA¡:ú8\pŦ–Hšegáë jX^èÁaûÀlH’épI;W‚/(æ(ðE,_66B1[‡i%’fˆzØžë—Vè½€ÁA£ÃgF9­DÒ ©­+Õ‰iØÑ =Ø›÷iÝ¢œ64$;b6½D;¾ÞçGK‰21E¡Ç0lOrÀSW&°vЇTgìÇI$º¢¶ ļ4r4Bo79T.N’ps/'w^ž@f;›§%qY‚L®—Äêû纙P#Ì"0…¶m'è­9·F¶³ó\¦»~l@k;[§'‘žhÃ)]»Äê|WÅߎzÇRcN4BÛcàÍí@'¼ ì6E÷L±³}†‡É6¤k—Xõ°}PbÄËk•‡ ѤÁŸú ½• ò'{håRwÛéáÙû·²“(Å.±*&dÃ5D«4®Zû¸“aÐUQÔ–^å¡gJãf¶I°±qš‡—Ùñ4“y—M¼ÿA­mr—!Þ9sªæÃX^èÁaûSÀåVyª6’ð|fãÚ‡w•';m¬™ìabIq,ŒVNñ÷Ÿ—»ørf»g%3ü2»\tŒg¾P½ ÿØg” ú ]ǰ=É?ïëâ–Þ‘ƒOpØÈ›È¼®Î¸{÷μÌÎ+£Ü_›ÌÓ#Üôm%¾ž—G%⎣÷# @}µÝ0oÚ„~ÐÃoÄf‡aÓu1(ÑãÚ;øó•Ú:>8ì6MäÖÞÖ{ ÷þ|z×÷p‘àð_ÈHµss/§\ƒˆGªÊ¡`­Ú#† ]Ëñ  ŽŒ18Ú¤QeE‡ º&Ùø ;›-º=³ç2IsW±pO åjûæ²ÓƒZÛYÐßÅ5]AÂVãñ¡nÞ>TK¥ìS_|¹jòalöÓ(¾MFš¡ÅG…í¿¿ù¾×5ú{ãT'¬™ì!Y§ñ‡‡¸y|h‚%èê¼÷4á½CÑ&ÁÆÃH–µ<â µûsÅ·Œm-©¢:#ŽÔùý¿½{÷Ò¯_?>:^Ë6URZ U¾ ÖNñ0ªþª|óÛ~þy&yö$<5ÜÍ­½ÂóÞ¡ðú2––s 4¸Y—Ä<ÜvpÙ¡´6àŸ~Ñ.þ—ïc R>—‘gddЯ_?ftvr0'™tÌ»'9àÕQàǽ\¼3.Ñ”{ö;Ììäàç}Ã÷Þ¡pØm¼2Êmùµ‡–†Ã¯Id|šØÞ­H÷,r›½P=ÂK"zPØž“ã?”ê²ñf–‡²¹,&3Ö’ðË ?ìéŠÐ”ȘÛÅÉ¿Ç/öD;¼8*Q·ù&¦;™ÐÁ!Ó~-‚Ç¿îïâûÝœ¬»:‰mÓ“˜ßÃA¢ja»Ã™”mg$BO& ½Žiœ˜›Ì¬N¡½»Ç“ÒÓK®À[—þkÀ¥ëw@k;ofy8rM2mw©½¶ú=Í«'’ËeàçšÒÒÒ;vlÈÿÐ&ÁÆ<üc´›VNü¼Ó=Sl¼;.úöHxz¸›ö: O ‡ †µµóã^úG*½Rìüçå.K,2¶d’ð‡! ¤¨¤gŸ=r€âo÷ªý·˜W“Q#¡¹îÙ³gc·7=Åõ=\|3'‰±iöútÎÖ.X=ÙƒÇà4Ñacñ„Ę‹Äm‡·²ô ÙyxH‚ÜW7™—_\®þCž›«²Mn³oCô'4œp/;*%C…íjtôØùdjO K µ VNòÐÉcΕ:¬­ƒºbv¿žì€G†$4™£Õk8müe¸Ün3‹§(‚ⲫ;*U¡+¾blVHÂu§ãu Ün7ÅÅŤ¤¤Dü¢µŠáž<Ÿ¢0⣠vóáÕq·Êd¤ÚØ=3 Gˆ‹@/EaȲr ÎËí6£é“bcßœ$ÕÛÎÓ§OÓ¡C¼Þ ýÜ+€]FØH¸.'ÈuOž|x³9À[cIŠrQ+Éou.r€ÎIvî»ÅE‰Àaƒ«:8ÍàÌÏÏWù9àÓXÚÖš„ÞÂö†¤¹ÅÑV­BqÛa^“ÒÍ[¿`‚n‡$ê¸ìð—áW ¶/jbaS¸4%ô4 (#¦¹ DÖÜ ÝhÙñKtÀßFÆnÏ<<l¼0Ò-·Ûb„Ë×us‘Úø’—§šcêý94-ôY€ŸŸëÞ½;Æ ‹E&ò\¦›Ë"ÌšKvÀßGºi›`¾7ý~7'Rí²±E pÚቡ{óíÛ·säHP‹ó„G7•¦„Td¢9zó:’œbË-Üí*§ F·sp}Øȉ„WF¹IŒâ^=Å)nEF´µË¢”I´Ã/úºèœÔ¸\B„íŸgcaW$4f¹‘ßîGs:ÀÈv~Ó?¼…­;¼ž¥_AL=ÚÖÁº9qGp R'îI¼éæÔµÉl‘Äå­dŽ-oþ»ÁM¼²â¶ZEy3 è"‘ššJQQ Æœ63 ¯OaØGå|uN Y$Ù Mà—Öû,Š*zå•QX¡)N¨ñÁØ4·õv’ÓÕIjÀfüÆ"/WçWXªWc¸íbe\O{“ð?ƒ\<0¨ñô£GÒ­›jsÑ^ˆdSiì';ÈuϘ1£Ù‹D‡²=!C`Ð;ÅÎÝý¬²7¤}¢‡'©yî5S<ü¨—+HäcÛ;“戛RÓÜÑWßS}‰¸·Ó×|ˆE¸]X@äZè6D5?š{ØÞ¾­ìüùJõ¬¹Dü¿±î QVâ—.Ú$ØHrD&î@žž¥¦=øíîfqv"©.!ühHvÂCÂʰrØ¡C÷ÀÖ†N§“S§NѶmÛØ[e!&¯.g}‘š‹YsI+âü±‰X+°¾ÈË¡RŸjX 7l¨àý#^j-|v¦ Ž]“LÒÅ\‚cå>fRÉÞó>Í•s»%ÙøvnÓ‡“JKKIKK£ª*¨ûñhà3m¯®/¡Áë%N»g3ݼ3V$Eò­õH¶qM×ð²B„íKËÄ@jï½;p8ppÿþýôéÓ'öY”›6Và²ÛxmŒ¹pfQR¥Ðcqe[OqÂ?F'r]÷ÆEy¨ÔÇ̵*W¨lâ=$9`ùD:4 x½^ÒÓÓ)) ê~<Pm¡jj¿ÑA®{àÀ-Zä/Lä™Ö¿/íÜ6Kœé–dkRä Ž$9+‰Ÿönü=Ø=ðÂ9À† ÔD^މ'ÕÔKè-5loHŠËõ½n¼óÛ M–ï6’d<Á¯ëb(ÿïñ‰´v¡Zt$ÑÏF0gˆ°}Pö$øVS½ÏýB—€H~l¨5êÔÙUv'wŒÜ˜™|5+‰amí´mpkï´‰fWDP8ÄêÛju }à·¤œžžÎèÑ£³Hbi~ÖÇEªŽÃz"ô¼tN²³áj¿Êp‘r±¹Ó¾2ü9¿þúköí jqîC,ÄYŠ@¡k.é,i8í6þ:ÂMЉ^Ýiƒ«;:¸ò²è ì6 q“?ÙC¯d·ôrFT¹7„7ß EeX hø®œˆc©~Ì›t€MÒ¹®›ƒ.ó¼º+BÏÛ™í|37™ç3#›3^ÂvðúxÀ/#Æãñ0uêTc-’X›ÍÆß2ݦcM´Ã=œô‰ÁɺH:±i“j‹sË =ÈuO:•¤¤$Í‘Ä S::¹¢ñE.ì6 ëÕ×K—.Åç Ê­Ýì1Áœ&i(t¹­&‰ˆç2£+r)I¸»Ÿ‹t“:ü4$žÂv¸”7Øí÷€ÍÆñãÇ騱£ñVI↹ŸT°ü„W×n7¡Hq‘yÉ´1¹lWee%iii”•u?¾ “«½†¢î§1Èu5JŠ\Ò$O7æÀK²îà2]äkÖ¬Qùi`ƒ æ„EH¡Ë°]}[Ù¹±‡“XëÏi‡_‡QÂB„íK‹¸„Hž&à€KÝ d×®]傜¤QF·³ó쾚˜WOqŠî´:˜Ÿ’§( wÞy§Z“†ÿ¾2Á¤°°·¯„z‚Ãá`ìØ±äää““C¿~ýŒ³N7Ü¿£Šg¾©‰I[¨v ¢¨„Žoݺ•‘#GW#z ©ß*ØQ ÛâõzY·n , ##ƒþýûsß}÷±aõíI åÁA Q—nR£•š` ‘CȰ= ‹„Gø>Ð:Òÿœ––Æœ9sÈÉÉaÚ´i$''ën $~xrO5ïªÖõÌz§DßÍKÂi@êp:t(_~ùeàðÏ›`NØÔ}z.`»ç=#Èív3eÊrrr˜;w.;wÖÏJI\PåU躸Œâ ªJÚHqÂK#ÝÜØÓÕv>LÏž=Õê5ÖšÈõ39‘)—d6ò<õIm6FŒQ_?tèÐ(Í”Ä ¯¬æîmÕ”6RS>\z%ÛØ?7É2ÕvŸ}öYî¹çžÀá/ÅT-M8Ÿ`'Déç` q-¥=z0wî\rrr˜8q".—5~¡%úãSúä•s¨,º%ød¼ž•È÷»™¿Ò^ÇÕW_ͪU«‡1ޚȈô§2Ѧ)˜ ´ôSSS™9s&999Ìœ9³EV–mî|^â层j>9å¥Ú>…ˆK.wñØ82/)¢ƒ&±äüù󤥥QSÔýx8°Ý“""šOÑd!D?Ȉt§ÓIvvv}ˆß»wï(Ì‘X‘}|äzùðh-мÔ(P룾N¾n;¼<ÊÍ{Y'ò{çw˜?~àðD1UË£çÏe?.-æ% Ýr8 4¨^ô£G¶Ì¯¹D?öž÷±æd-¹Ç½l.öRá5‘«xüËàÔ÷’ê©n7Ýt‹- ~±ânybõI¶C”»ÍA„ú)‘Nžž^¿uwõÕWãñxô¶Qb¾+ó±¾ÈKÞ1/[J¼.S¸«Ÿ‹¿Z¨ânmm-íÛ·çìÙ îÇ3€M0)bŒøÉt“¢Ÿ t‰t‚ºu[wééézÛ(±^Ÿ‚ÝYˆX“ŸŸÏäÉ“‡/ ²áª·(rŒþ4mˆ­ˆº?â}7›ÍÆèÑ£ëCüAƒém£Dâǽ÷ÞË_þò—Àá×›`Ž&ÌþÙìÁ¥­»‰ˆÄˆèÝ»w½è³³³q:­³#iôéÓ‡ƒÿxËs4a¶Ð’ ÌDˆ~Ð&Ò Ú´iìY³ê·îRSSõ¶QÒÂ(((`ðàÁÃ^ â z\`%¡7Ä ds);¯W¤¸\.®ºêªzoߣG½m”´üq|ðÁÀáOhÜ`U¡2˜K÷õ£Ð`÷W\Á¼yóÈÉÉaĈ–Zì‘X—¬¬,6oÞ8üà)ÌÑL<^íñOÉxß­sçÎõ)¹“'O&1±evH•4Naa!:uBQ‚²{.ö›`’fâQè I®Fˆ~â¾)"’““™6m999Ìž=›öí#Îê•4S^yåî¸ãŽÀá=À@̉ŠxzCìÀ.…ø"žÀn'++«þ¾¾ÿþzÛ(‰#rrrÈËË ~¸ßs¢¢9 =¾\Êdž”ÜË/¿¼^ôãÆÃá°XspĮ¨¨ ]»vTTT>4PmÑbeš³Ðrâ´]0héíÚµcöìÙäää0}útRR"Îê•Ĺ¹¹j}O!ŽmËjq@BìÏ#N)‘þ¹ÝneÆŒÊóÏ?¯9rD‘4?n¿ývµïþUC¯Ti)½1†sé¾þJM ^â_y¥¦)$BQ:uêDaaaàC׋M0)j¤ÐýéÆ%ÑODxÿÈ&èÖ­~ënÒ¤I$$X£é€$|6oÞLVVVàpâK¹ñIbI+àÀ›ˆTLjCüV­Z)×]wòÆo(%%%fG£’0yàԾϠå÷xBzôðp"úÇ×yû>‘Nàp8?~|}ˆß·o_½m”èÄàÁƒ)((þð² æè‚º6riënþí§ÃbÀ€õ¢3f v»ù­€%pðàAúô úW€ÎÀIã-’X…tD[«Åˆû·ˆCüöíÛ+·Þz«òÁ(eeefG®-š§Ÿ~Zí;Úbè%±<„§ñë±è•Ù³g+/½ô’rüøq³¯ûǤI“Ô¾— ãkñ† Ýc‡ Í¥ûúˆKáØl6233ëOÝ 2Do% 8sæ :t ¶6¨ûÄ`· &Iâ>À½ˆ†|5hðö={öTî¹çeÕªUJuuµÙίÙñöÛo«}îA¥e$’pi ܼ œCƒè[·n­ÌŸ?_Y´h‘ræÌ³5Ò,¸á†Ô>ë bqñˆ ÝÍ'‘œSâw‹t§ÓÉ„ êWñ{õЏ O‹§¦¦†´´4Ο?øÐ` &Iš9ÀßÛÐàéeðàÁʃ>¨lÞ¼Yñù|f;ʸ`ÅŠjŸåD…DSº¿–•h}ÇŽ•;î¸CÉËËSÊËËÍÖ“e¹ë®»Ô>¿ Ö,I¬I®ÞŠÑ ú¤¤$eÞ¼yÊ«¯¾ªš­-KÑ£GµÏ,¨ÙšDb$`ð$° ¢·ÛíJVV–òøã+fëÌTvìØ¡öU­üR%’¦ü°Qsªö™¬4ô”H"¤p+ð!P†Ñ·mÛV¹é¦›”wß}W9wîœÙ:Œ9™™™jŸÃ݆~kI$"ªãþ8Ñ'$$(Ó¦MSž{î9åðáÃfkRwŽ;¦Øl6µ÷ÞÃÐoJ"щº”ÜÇ€]hܺ6l˜òÐC)[·n5[£ºðâ‹/ª½ÏF~1I,éüXÆ”Ü.]º(wÞy§²lÙ2¥²²ÒlÍjbÖ¬Yjïí†~‰A´nþ œEƒèSRR”k¯½Vyíµ×”¢¢"³õ¥¥¥ŠÛíV{?# ýô%pSg€Ch½ÃáP²³³•… *{÷î5[Ï!yÿý÷Õì?†L —´@†¿>GÔ3XøÊ‚ ”uëÖ)^¯×l}×sË-·¨Ùû¢¡Ÿ®DbA:wËИ’›––¦Ü|óÍÊ{ï½§\¸pÁ4‘{½^%--MÍÆY†~¢‰ÅI®^ŠÐ z·Û­Ìœ9Syá…”£G*ôõë׫ÙTŠØ’”H$*8€l`!° ¢·Ùlʈ#”GyDÙ±cGÌ…¾`Á5;Þ7ôS“H✠`°)¹Ý»wWîºë.eÅŠJUU•îBÏÈÈP{Ý[Œü$’æDB@ï#BãˆEŸššª\ýõÊ[o½¥œ>}:j‘ïÝ»Wíu¼@{?‰¤Ù’ˆXìz ±±èN§2qâDå©§žRöï߯Iè .T›{½¡Ÿ„DÒB°!Sþ€H9Xô€2pà@åþûïW6nÜöÖ]vv¶Ú\÷ùæ%’–JOà`â,xÄ¢OOOWn»í6eñâÅ!a+‡Cíÿ÷7òÍJ$Qða>¢”Ó4ˆÞãñ(sçÎU^~ùeåĉõBýõ×Õž¿×Ðw'‘H‚p!*±þø[w£GV{ì1eÊ”)jÏYhè;’H$M2øoà34¦äªüeú$IDtB´3^T Mäň„‰D$×ÿN¾Ð_7ÃX‰D=v`ð°‡Æ…þ}“l”H$:Óø-ð)PË%‘W"ç4{ä{IK£0ÑçÎ\o®9ÆðÿØæaÃó¿ ”IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow-up.png0000664000076400007640000000046410173042724022720 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+‹IDATxÚc`ÀŒk€T3À‚MÐÄĤáÿÿÿõHBµØÔ1ã°±Ä~þü9ˆ²ƒZ²¯f0HšañN¬š‘mÄ¢, ìâpÍè6âÐ 3@ˆwƒ `Æf#Í `3€Mä‚z1Ó•‡& À¨fzT @16ðŠá3¶'ei˹IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow-right-disabled.png0000664000076400007640000000054210173042724025153 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» oFFsÿÿÿñùÖ<ï pHYsÃÃÇo¨d¤IDATxÚ‘± ƒ0EŸ#¤´ŒÀhö¡HÄGa€ôf4FÈHNŠâØñU–¿Ÿüî5Ïó-–R0p÷Þ«ÆÓ30’jà›¦é·sapÎíP=õ6X­µc¶vlU¼$áeYbѹD`”Ô•À£¤nëù ?7ñØ@“úFR8€í1ËÕž€ëçe<­¤õïéHŠ®óí.3>:…IEND®B`‚netmrg-0.20/www/webfiles/images/default/imagespec.php0000664000076400007640000000374510522144106023104 0ustar silfreedsilfreed "applytemplate.png", "edit" => "edit.png", "logo" => "netmrg-logo-small.png", "delete" => "delete.png", "disk" => "disk.png", "duplicate" => "duplicate.png", "arrow-up" => "arrow-up.png", "arrow-right" => "arrow-right.png", "arrow-down" => "arrow-down.png", "arrow-left" => "arrow-left.png", "arrow-up-disabled" => "arrow-up-disabled.png", "arrow-right-disabled" => "arrow-right-disabled.png", "arrow-down-disabled" => "arrow-down-disabled.png", "arrow-left-disabled" => "arrow-left-disabled.png", "arrow_limit-up" => "arrow_limit-up.png", "arrow_limit-right" => "arrow_limit-right.png", "arrow_limit-down" => "arrow_limit-down.png", "arrow_limit-left" => "arrow_limit-left.png", "arrow_limit-up-disabled" => "arrow_limit-up-disabled.png", "arrow_limit-right-disabled" => "arrow_limit-right-disabled.png", "arrow_limit-down-disabled" => "arrow_limit-down-disabled.png", "arrow_limit-left-disabled" => "arrow_limit-left-disabled.png", "parameters" => "parameters.png", "view" => "view.png", "recachedisk" => "recachedisk.png", "recacheproperties" => "recacheproperties.png", "viewdisk" => "viewdisk.png", "recacheinterface" => "recacheinterface.png", "viewinterface" => "viewinterface.png", "viewgraph-on" => "viewgraph-on.png", "viewgraph-off" => "viewgraph-off.png", "slideshow" => "slideshow.png", "status-good-trig" => "status-good-trig.png", "status-good-untrig" => "status-good-untrig.png", "status-warning-trig" => "status-warning-trig.png", "status-warning-untrig" => "status-warning-untrig.png", "status-critical-trig" => "status-critical-trig.png", "status-critical-untrig" => "status-critical-untrig.png", "status-unknown-trig" => "status-unknown-trig.png", "status-unknown-untrig" => "status-unknown-untrig.png" ); ?> netmrg-0.20/www/webfiles/images/default/arrow-right.png0000664000076400007640000000053210173042724023405 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» oFFsÿÿÿñùÖ<ï pHYsÃÃÇo¨dœIDATxÚ‘A Â0E_´àÖu²ñéÁt¯´P÷ ^H÷™3¸Ë)„¸IDJÛ4fxß? kíyn¶ÍÁZë—1FyïŸãÙ&„º) °Ž+v mÛ6ι>5pÞ 7[¹®–=¡ O²‹#zðÉÂ"27Úo…9¤ ¥ðTä_ÕýÕwàTäOÌ[•¹ÀƒÊÏTƒ,_Ã!•)„!Ç}Ñw¸ ÓëõYt',œ€€€6›í~!¿ ŽþöC;дø÷7»oÜ´pÝ—þžµ´´ôªŒH$ÊHKKópôþîÜyhÜT®FLúÕuÀƒ«Îì<è[›;€òh`ìqÜp#ô—ÞÉÎÎ~àÃ`0²’““íÆÀ5 &Pߘl ¹ Üʈ Ð5W¡z{]k1@\\]f P!š¿†ÿ*7Ú¿k›1löQ°Î„¡X,–€ÇãÙ­æ}€E(ó€Gzàþ¯öNLê)pÀùx nÐ]êä‰,†Éòàmà\, kA{Ÿ¹SÛÉ …}‰jž {ÅppInŸ‘³™[Ç€ÖƒîAœi܈þq¾eíç7~€i™ár¹§(V1ÐwP}ØÆ'+‡n¹^‚Pϯ€˜‘X ’ˆ&9 2Ïù ®Ô5Djž”'2ÃápD+ã~°¾:^£/)®h›øÎOÁ‚U‰çL‚D¯%!¯ ÆOsOsûØOì‰eÒiuRMî.€b€@<ŸÂíK{a8wNÜœj?Y¦×É‚%> ìl¹K™¨z×ɋߨ =iXÍ{ÁÛ\Û¾ö»§`Äbqîg[6PÑ èˆçRøn9 ¾4œ^é…Ä@ ™èHòÆe™VùÏè#!AÝuÆÁ²Ã¿8ÀX­ÖMŸ¼§@m‚7J¤,x=ƒÍ.g!ˆmO h {ßfaÓ¾Õ¾ZæÏçä‰[HÇ÷Ñ,¬­? €Ì„ñær¹‹8¼)€ç9ýPæ³éØ#f“"Ø#fÁgÊa°r!…­K™úÐÆg€éìÚÀaL>UòÞdbXý”JeCC¡P¸¥¨¨Èú´—Á™n‹Sÿè8!V›½œY7FpjdÚ'⼑4ë­duõ(y§r”BÈþýûïðšÉÂ`³Ù[ׯ_ïbN“J[Âpê÷š²L_Dx ¼Ï í£Éìê·^£ãÂ*/tm•JÕ'¿¹èƒ!´°°ׯ_‡Íf{“[ûб-„9aGͧ#G`·)Ê¡cppmmm7ÅS:®Çã5VWWûíÛ·ÏO©T²(Š¢ñù|0γáNËýèðó Ãσ†\!"ßé;üرcÚâââ,Ƨv–™˜˜øsLLLojjªùäÉ“D«Õ>çÛÓµ222êŸ{† ¸III±±±-kÖ¬)**"½½½³"ñññ?Î f†Xr¹|«T*ýC&“ X›››Ÿ æðáæÀÀÀås3U4‰D²Z&“•ÅÇÇ÷äçç›ëêêˆÍfs “’’òÏ\ƒ8(888L&“’J¥m¹¹¹†‹/³Ù< D£Ñ¸¸¸ /f†ü¤Réθ¸¸úM›6©KJJlƒ=zÔ&‰6º œÛ¿.ŋ޽½³ÕjuhGGÇRWÿH¶æ¨—/=IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow_limit-left-disabled.png0000664000076400007640000000062210332536345026171 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» pHYsÃÃÇo¨déIDAT(Ï¥’1NÃ@EߌV¾ÅÀH“‚‚3ÀžÄs#E(h((()RP ¹‰„,Q M9ÖØ1åîÿÏÌ.ü§Ì¬6³Et×4Í¥™ÝM± ÔÀ"0Í"rä98LÖs @Šab63 t–ð¸gà6Z—ŽÀõœ-PÕ3à)šQDÒœÜý3çüœ}ßw]7ìî_Ûò(¥lÿjp4O)eÛ¶ír÷9®RJàá$<0¸‘PWUµ‰Þù¨í‘Á‡»_/§f~‹D{U}‚0ãQóF/9IEND®B`‚netmrg-0.20/www/webfiles/images/default/disk.png0000664000076400007640000000107010173042724022070 0ustar silfreedsilfreed‰PNG  IHDR ?#Ew cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+IDATxÚ•RÏKQþÖ]K²ƒ—0P!Ñ¢[$ŒÊcg!0¢C„túêb‡uÉKÑ¥AIÂÌ[? ËÈÌ´…E•¹ºÛ1ïÃÕj “D‡.4aD\ψ0± 3hÞLНŽÀÀ¯Š c•~·sª‚>F24&œT.¨¸ÑÐhh¤YÎúóT[Œp™ë™ëµf äz’Ä^Šhh÷r–Œ†BGøÔ¹¤¯—Ö±Å.hum7KP»1 ÅJ{ŽqóÁM¼Ðüsll?äs*Þ¿ŒHJv\ß;НæÉƒHö‘gIZØEÀ‡s‚ò¶z¢\ÏØ>žž[ZÏâŸþt:}Ç×’Á’³ÓX€[ŽD 'èëõòâNÄÒŸÏç-Ñh”ä*o\3u»Ý˱X, Ë2ÕÄÂ?>:É»ø»D„©o$IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow_limit-left.png0000664000076400007640000000061210332536345024423 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» pHYsÃÃÇo¨dáIDAT(Ï¥’¡nÃ0†?;VHð¤€>€AÃK ú{”¼UAAËR`PØH•60hi¤ÀÒ¸RRÙiªt²,ÿßÝý¶áŸaUæl|ä@=×À.®Y8×q?˜k MèZ¢§v üd‡»ý-Gc×qÔ7f†ÐZ¿(¥>S‹¢09ØDø×Zû-"¯÷ï}èû>ß9„p !¬•Rǹ#<;çü³F~œsÞZ»6ÆìDd P–å%Þø4|+Ð4ÍFD¶€­ªêBúÓ?¬ëº­õ;ày>§Dƒ§ü·TK—sˆ½(IEND®B`‚netmrg-0.20/www/webfiles/images/default/recacheproperties.png0000664000076400007640000000060610522144106024644 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ÝIDATxÚc` "`#E1#;ˆ¿ñ#(ÿ âׄ4—±7¯âP450÷ñn ~“`Òo ôs .„²y X ˆ8 ˆc€x6o)`†*¼Äÿ Î<Ä/€ø!T±âr âX ~ ÄwнÁƒÄþ¥Õ€ø’x?¯Bv6R 1 òs#’Ø nÀ¦_lÀÀGƒ‰Œ´ÀO®f3 Îâ³ÈΔ ÅBP›@ÑeUs ˆ«@·i6€†"6ðˆŸñe >µõ/À©),Ž\,öIEND®B`‚netmrg-0.20/www/webfiles/images/default/recachedisk.png0000664000076400007640000000133410173042724023406 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+3IDATxÚ­SMˆaþæG§™ gýA•Ñ]0±­C'Zèæ¡ Ã²DBg!ØÓÞ¢.ÜÓ²‡®uj½t —Ñ[EÛÚAÁd$ÀAíù$£ŽÁ~ðÎç|ßû<ïó>ïHÈ%.ëÿ$3ô 7æóù±ÝnßEÑß2ÏóKY–»Ø¿O&“Sìòùüüp*•zX,3º®³>Ÿt»Ý˲Sz7›ÍšBât:Á`p»R©üXƒù@ °‡ÙñxLB¡‰ÅbçN§²X,ddz‹ªV’V«%Õjµ×Àœ ÞQ0ö‚Íf»…ª›‹…Çã×¢ÑèH$²0çp8ä¸{Q.—ÏÙGüDT¹d2yÂ0ÌX$PÂ7Ífóªg‡Ã¡Öï÷¯,—K«¢(÷‰ÄÓ\.·‰ ‘áQù-¤ï¹\.¦$>žN§û蛡J(¤“^¯wsZñ=âùªg°[Ñ ‡€€PӠ„Žö #W`·Ûm©V«3üÛ°G\]À¨¡ªÀ3Äún#õ`\Ê:—ÃLs‚ ÜÁŒU˜Ãz½ÞëX÷A—$É d4Fã(NëÀ ʈ3^Ó´£v»½[*•Vlpþ3æù =‹x} h†Œž¡æ.<ú‚ó—+Ù¦ifàd²P(H¿eï@M©aHî‰ßïïÛ€?!Íüóyn`¡Ÿ'ªªÞ„tmØ&HtÄ×z½~šÍf/.óOD~T"ô*´XŸ&IEND®B`‚netmrg-0.20/www/webfiles/images/default/slideshow.png0000664000076400007640000000065210173042724023144 0ustar silfreedsilfreed‰PNG  IHDRDô, cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+IDATxÚctppøÍÀÀðˆ¿0X€Xˆ8ð]â[%ˆ5Œè€óØÄ™€ø )AÁ\N†ƒ†† åBȤ§OŸ* ]3ô Pï4u.ÿÿÿ·fdd\ŠÏ°@ð÷ïß' _Õ»iy Æ0ŒdЖÂ,þñãÇk@Tûh`<,̨¯a 03†A(0?þ¬ðë×/ ß ÖÁeX/Lòû÷ï ?þEGLÅ–ÖX€1Ò‚K @êÁܹsP+ÌH4ƒk‚?À4Ó\__ïO¬I@õ@j6Ãz€‰v >‡X–c~±ŠA÷IEND®B`‚netmrg-0.20/www/webfiles/images/default/viewgraph-off.png0000664000076400007640000000064310167357434023721 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+úIDATxÚcd``(â ¤ ÞÀÕx€ ÀÄ@8Í,ähæ×ÕÕµ&ÙæäädC##£éXmNOO×ÿùó§#33óÁ¹sçžG–KLL ÿóçOPNòÇÁš³²²x€×ÿþiFFFI ¢¿ G˜˜˜fËÉÉ­|ðàA1P¾(Ç 3ŒÑÊÊj¶šššÖÿÿÿÍ€¸ÂàPž&ÿâÅ †—/_º°ðððDùœ@ |^B—üøñP€}''Äß¼yó“²x~÷î+0PHÒÔÑ ôsæ×¯_ÿ¢+øýû÷×ïß¿¿Ì;`}ÃbƤ«c:¯Oª1IEND®B`‚netmrg-0.20/www/webfiles/images/default/recacheinterface.png0000664000076400007640000000110410173042724024407 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+›IDATxÚ­’¿KÃPÇ¿yï¥ÍKbM+Bñ n‚"ÅÁÍÿÀÍÉA\ÅIœ\±³‹àâ&¸‰‹â"VÝüD‰±Öjë½4ÖXE¼ðáŽÜ}ïòîøj0Íí BsÄ q@x±üñùÅjª5™Š›í…ØÉçó'¹\n·P(œ©—Z”L³ÄqÚ$TM{‰Q)eO©TšR~úû—#&R©ÔùµÅ²¦‚Ç_Ä/®ënFKí¬Ÿy«äLÝ„ä¶nÃfˆ%,XºÕˆƒ½ ¥X,R}†¸P ËRÂUɰ(V•ÊAü Ô¤o…z$ŽÅe¯ŒÓ­p—jòU]œ°!+ü†Cãj¼†ª¨¢"*xðpïßÿôá{°e¸Ïâ­.6˜Çp½r ¦1p7¼Â° dÝ,†Ç†±¿¾©¡ØI´è¢;‰¶‰6Ü€2ôŽã “Î í¤GêïëÇäÈäç6n¹ÓC¦¿È:4¼Ö’¥$“L{¦;¼EP}ÚÚfK­z+ zÎÏλð_ö›jbpÄÖ©IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow_limit-up-disabled.png0000664000076400007640000000061510332536345025665 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+äIDATxÚclhh°a``Pa \ê»Àdˆ±º,###óþû÷ï5ÍÀj°;þ| ÆÝ<r-¶<À¦Ž—F ÓäÇ<@:ÀÁÁaã>àÕŒ¬ÄjQ@4`=ºÌH%€·Ã4"i> ìíí·3KWçœ{îï{ïùû»÷œ£0ˆhš¶GQ”åGêç`îï&áɼ€„,Ën]×÷߯$µf7(«1eÊQPP TUt‹ˆ”””“À³ÀÌdVò†!%%åM@lÙ²E!DKK‹Øºu«X¹r¥°Z­½Ä1™LMªªn–Z2ë}½¢+Šâ’eY466о8N±k×.±fÍ‘““ÓKUUº®WÅ€-©GqQˆyóæõ#Gëׯ3fÌè%Ž$I‹Årø.06™tM£iÚk€Ø¸qcD‚R__/ÊÊÊÄâÅ‹…¦i½²X,§eYþ0’xˆ×²ÑhlDMMMÔ‚ÒÞÞ.¶mÛ&Š‹‹…ÍfëëwZŒFã`)`Jæuæbܸqq‰Ñ·Û-ªªªDii©ÈÍÍíëwœ‹å àq`X2~È!IÒF@”––&T¾?~\lذAäçç Y–{ùÔÔÔ£ÀÓÀø¤c(’’ò) ªªªU@Î;'6oÞ,ŠŠŠ„®ë}ýNÁ`ø 0“i›d ›Í&Ün÷U$»Ý.*++ŪU«DVVV_¿Óf6›¯¨'ÓPW‹@'EŒ¾x½^Q]]-Ö®]+&MšÔ×ï¸ÒÒÒöâ‹(ŒH¦Ñ ³Ù|åååÉÖ"(µµµâ…^èÊ‘$É›žžþ¡¢(k;’kÅÄa“$É£išhooO¶í¤¹¹9d(Çjµ6èºþ"°P’jÕ8(Ä¢E‹’më¨ñ‡rV¯^Ý/”c2™.¥¥¥•æd8*t]ÿ# ÊÊÊ’m߸ñ‡ròòòúú.›Í¶ø02™öMUU êêê’mÏ„RWW2”“‘‘qBÓ´w&ÕúAX ˆ¼¼¼dÛoPiooåååAC9V«õ|jjêK@ &Q PUõe@¬[·.Ù6»jøC9%%%ýB9&“Éž™™Y¬¬W]“ÉtGŽI¶’†?”3wîÜ^¡EQÜÇ?¤ªê`ÔÕÐ#£FJ¶M¯'ê,áB96›­Öl6?L,AÖâ©§žk$¯Gˆ·âø/â*Æn·‹ŠŠŠ ¡«ÕÚœ™™¹ø"`Hˆf³ù ÞxãÄb(àq ñÖ?ñš"ÄŽ»…ÞÄëñˆêêjñÌ3Ïô åF‡ÅbùM¼OÝr€:‹ÅBSSF£1^}“Û{‚†]¾ïŠæo±_Nø®>ùä*++Ù´i'OžD×õ]ñ†£—,^¼øÚÃãgKèß]m°{I'œÚ2(ÕÉÍÍ¥¤¤„Ñ£Gàp8¶Å%ˆÙl~ ¨¨(Õ» üõYøÃdxs!¼W­öüæ8ëÛ~nÿ|Áç»úoOíííTUU¯éÚO“e•e¹U’$¥±±‘ÌÌÌ„TpÐðvAåÌÞ"¨:¤N€ôIÐz Z‡Î?j)<°=áÕ*//ç‘GÁl6ÐÙÙ9=ž;Ê%^¯WY°`ÁРæçÐúQïmn´|àûˆ  é0 ›•ÐjUVVÐÙÙù_Ç#M£Ñø%€+V$¤ba9ó&ÔUÄQ€€¿móýg+{>Ž:ôÇív³sçNÿ×Jˆ=æ¢!–ÂUðöz¨^ žË`Ì€¬{¢/£ö7Ð|4þº\Ø—>knüeïü©œÖÖVt]op85û²ÀårY&NœÈøñƒøb‡×o} :>õ9Ý·ƒ–¿F_Ní«>/öF_Ç ÇžüJv]¤âåïø>º\Ûü›cDQ”!‚«££:?‹e>ª¾ þPÞg°ïaßY)g÷úzI‰âl\>ß{Û™ðúl8²ª¿ o…/ÃÛ{VðúÁ&<Ïý?Å$ˆ¦i+!Aö?NLm÷ûë¡®²ÿööS°çApœ‹¬œã/‚»3úý‡¢³ÎW7€ŽÓ°g9ì[ésø°ŸósÓáÐeT=Êñ£oóɰ˜p¥¯‹ “GöðáÃÉÏϪý”ïì<·¯nŸýþï B43?òÂÕ¾œ‹Çáüèö { ú)Ø>ê·ûîñ‰Ôv²Þ÷¾uTv·¼ƒ²ðøŽE"€¥K—"Ëa²~._á…·À¹·#+ýR-~:ü5øÎÀ=Ë¡ëRè4ü8›#Ûo4´Ÿ‚/ûüZ(:þ{ŠÀþy϶O§^á¡ò}ߦÖK®ßf‹Z³Ùü( Ð\µƒsU=ß|wÆ}Ϥ¾tu@ÕW =BѸß×vÿåi_Þ@g¡1“`°hÿv/×E¸xÿ\m4¶Á¡Ó *’Þ ÌízpÖd2IMMM˜Í!^ÂØSõ¯÷ßžû¸ç×ÁóœÝç3l¬ÝÓ´Û!gL_ ø&œÜ[Y‰&k¾/&Öäë ¼ò6<ñŒÌ4=Ûìì5¤/Úûe€´páÂÐb\8ú̬«€S¯Áø¯öl8ò œúÏþ½—hh;éû«ß£ ¡aoìe%šÆwz}õû³ÍÎWú&J”””•v»=|sõþúÐζ«>ÜÙ÷ƒ9ÚNÀÕÐøgŸ¯I~a†(ìî ™õkF¢Dw: %IbùòåÁSœÝï†/¥ícx÷ ¸u œ(‹Ü_\'ì©GŒ´ζ8ëûþ x<ìY³ÈÎΞâØp‡éõøixË×ö8¢Øýõ¿wÕÔæ ú%â^–¦iA˜`bý8?ÀÕáG¸oH1„€×»Ë]þ7XšH‘%IZaº»ýtàní Î{§¡±lVµx?XšH›¬9N§3}̘1L:µ÷/þ›¤óÕñÕöÀß»^ñß¡ÒD$ˆ$I !(ZV§^…ó}w¢ó=—Qßëž ÿÝy§çw¡ÒD$ˆ®ëÛívŠ&4À;_OLín0NŸ‡ã  k²Ûáòî •.’k·ÛoKKµrof˜æMÂâo®lVõÀ*]$‚,™‘†Áõù@io¿ Ÿ7»úÝ2  f³ù€¢I­‰¨× ÉE;ìÿd ì —v Alv»}¶*KNJàCžŒÇÀí…œáÆZ ìs…œz¡B‘©ñýÝé€?<,B|ö} !K}ž~ð³’_ ¯9Õ¯÷çàyâË/ÛºŸBŸmvþŠ+ˆ)%åáËv; Ù ø•:§{'} ¬Ò„¨èÀùÀgt^©;UϦ¾R®Aš>¿HR°4a¶I=ú¥•zö ¼.^ø%àÂåáAŠp¿~4E3^ò¸œÿ~ ²n¨¬›ãÃ}°¡cú°FçŦ[J·Üçq95nxSŒx8²W祭‘$)ˆªª0kY"ªuãrÔש]Îÿ‰$yHAdÍô3 ,ä.›Ì¢[®Ù º ©ÅœæÞ‹$K(Aò\öŽ R‡Cnø—‹Ç[$~·‘í÷šøÒ(寛ÿ(ÝÍ•dNû¾9Œ$”ý|=föï~e‚—fcQ0ÈåóMAÜçë6Gš%¨ zší1f„n®Røádûoé±”,I¼:×Ä“ã Xâ4à艿¥°ý^šY4òk[ϧï#4/°;ÒlÁÌ–ãhk¹Íh21{áý¼ÛÖÿEP øÚX•5‚ÏyüâL#é(;ÕEsÈ0ZðÊÜ=Bæþ,…ïÜ®‘jè¹ÔÊf9ÔäàŒ#Ž!W“#>g®dO¨uöQÄGƒvÅÀÒ¥……ìüç¯qÙ µ^:Ý= –Ü¢ðÛ»ÃOÈv_–ŠA†÷š=\Žð…’{FȼµP§ KŨôn÷,‰ó—ï6%èí”A`¢UâÉq\^8»õ9ĹOðÍè¼ñÓ»~MVJJÊ•qƒª,ñüt#;îÕ™có%ž.ó‡{"›•µd¢ÆŠQ‘µ]·˜à§yFä0>ë_§jLOºÝ†GǨ<7ÍÈŸò½(5öùßóŸ†x308}Îzùòå»%IbÙ²žû™6…êE:¥·«TÜc¤Dîµ>ÓÈlÛÀF|x´ÊL[x?a%¾7Ñ€ij2=]æ“}MøÞ=»ér91§¤|4FSNßC[âõzջ¬¬¬Þ %‰ŸÍ01Ú5¬‰ç¦j 3jzV†Ì§G6¬ºø6÷ŒZ^¾>VÅ ûNԾ㣡—uýã=LmÑH•GGoºÒTX7Eëç3Âñ“é#†Ð°øÙ™2ßšà›Ãëõ²cÇÿOA¸„'PA7ø³Fæ ëuÞª°ìÖèúÈS3–‡ÉcÓ®ÞD‰F¾3Á€Ôíûª««¹pẮ75Ñ–h¡.—Ë’››ËäÉ“TÝ ²Ä/gÉèÜn•xiVlÓ¶ÿ4ÏÈDkÏUeÓ`Á0™ïÞn`÷}&ædÆïhÐ_å“yô =óÆø›«ÀqƒÑpå4SåAÇú½ÝgSx"×ÀsÇ»P%(h M‹í¶>]“øêXÛ?w3Ë&óÕ±¦eô\OŽmu⌣—<;SfÅ(•²]œ r'aQàŸ&÷¾ó 8n0®XC×õÏGö¾}û(((ˆ¥¬ˆBpÿ[4YâÍûwré…{íì;›"F~5ÛÈcc jòð­ÃN·ö.«p¤ÂŽ‚žc8uê&L@Ó´—Ë•NÀPµHñ_“GvFFóçÏé"E’$^kdÓœÁ_Ùèé;4¬1:“üa2õ5Ew SøóuÎQ®4a6 ~4-øÕ!IÒbz)(,,DU?Š7Ƭ0Æ<øn·0[eA ]d‹ÿxGoc§¨¿Ÿ¯óãéÙ&¸?KéÕDTTøÆ¨;‘=û† ¾qƒ×ά>Q°îNƒÍZ¢ˆ©-¡ðwÙÁOÌoß®±0K!µÏüoÍÍÍ8pY–=^¯÷Í ™#@²:;;§ –,Yk9C–9ÃfE~•dàÙ)á›ÓÉé 9}®ð;vàñxÐuý ‚A2Á‘é7XPP@jjj¬å i6LÓaïzþ…Y™Ñ7swçåQg@Ñu}ƒÛíg0èêêbĈØl××ju6£ÌGm^þz1|+ͯÌ1‘Ý=ŒÓéäÉ'ŸÄår<´ÇZWYQ”f£ÑxùäÉ“”––2nÜ8&OžÌÚµk9xð ^ïÐ wGÃóÓ4¾`Ïs÷°Ø®Ž}ûöÑÑÑÙl>‰oÍߘ‘;::¾ât:S233_µZ­-555lܸ‘üü|²³³yâ‰'¨¬¬Äá¸v‡¡ÐeVÜÚØVþåÎØºâñûê”™f6›WÆG[ZZ®L¥ë:<ðEEE,[¶¬_Dx¨sÙ#øÓ]¼ÛäåãK^j/y¯<Ñ\|‹ójNNgΜ˜Aˆ¡j‰d”ªªk†~HQ7=«?‹¹sçŠ 6ˆãÇ'd^Û«Mg—WüöS—(~×!^ˆmͬ#GŽøç{cփر+333+L&“Ý/ rssEII‰¨ªªJÚ‚`É`ݺuþµE^N† ¨@AjjêKV«õ<½ç7ÅÅÅ¢¼¼üšXþ(}YœL1‚q§¦i?ÌÈÈ8A€8š¦‰Å‹‹²²²ër±ºW¸fˆ/;>ø†ÍfÛ¯ªjååå‰õë׋£G&ÛžqSVV&ѽÜÓ5ƒx(--­Üd2]"@œœœ±zõj±k×.át:“mߨY´h‘ÿXŠ“iàxP€º®¿hµZè½tƒX¹r¥Øºu«hnnN¶­¤½½]hš&$Iò×MhãEQÖ¦§§(I’—žÕÐDAAxá…Dmmm²m”òòrˆîÅ4¯KF«ÒÒÒöªªê"àê™4i’X»v­¨®®^obÖòˆ—ââbýJ’i´«…™Íæ_›L¦6ÄÉÊÊ«V­•••Ân·'E ·Û¸J[b¦¹¾†yƒá'‹¥Žqt]EEEbóæÍâܹsWMªª*ˆî¥ÊoxÆO§¦¦ív¨WB9ùùùW%”SZZê_ÔxcrM1ôjA6nÜè/çµdàµÎX໋åP ßÄŒ3¢ åÌ›7ÏŸ÷ú{E'IØ€b]×+ü+\ûÿrrrÄš5kB†r…,ËBQ¾®ùMŒ,QUu“Édj"D(§¥¥E!Ä–-[üÝݘ߻ºItÌžMII9I€8þPΔ)SüÛV%³’7*c€o뺾_–å+®ñM0h/$pˆÿuMPØ=™t†Ëåúâ`íèÿâ›7ÞHœ¿IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow-down.png0000664000076400007640000000053010173042724023235 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» oFFsÿÿÿñÿÿÿñ^ˆƒ pHYsÃÃÇo¨dšIDATxÚí’A à EŸµëRºô#%«ž¨Gˆ`“ô<¡gð.=Aì¢$*!tÛ1:ÏUQrN©ñNiâØˆÏüÀ_Þ‰ŽÀ¸×D¤å: ÌÀ ¸×u‡1¦œ¨Ô#„0èT/œ€nCv!„@g‹30ñýš]M^&.µ¦dJ÷p[É.·("ÑZëw?0ŠHßÚü²Ø&Ðn~@™IEND®B`‚netmrg-0.20/www/webfiles/images/default/arrow-down-disabled.png0000664000076400007640000000055710173042724025013 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDùC» oFFsÿÿÿñÿÿÿñ^ˆƒ pHYsÃÃÇo¨d±IDATxÚí’½ Â0…¿üÔÈb‚L¨WqO‘ˆô€²BÖ@xVÈ„&‰, E´<ÉÅéÞwï,;#’$–ÕKê§"_0ÔÀ3qêИóƒþðJe’J ŽK†ªªRlSxï_ÖÚ;°v±ÃóA ÃpvÎ] €`ÀØçÜ ‹;’Z‚Ÿ®=&jª‹öÞ߬µ%pˆ’çÄ$<xLŒ1óW=…¤k×u§Tÿ Ö…<9É™¾ IEND®B`‚netmrg-0.20/www/webfiles/images/default/viewinterface.png0000664000076400007640000000120210173042724023766 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+ÙIDATxÚ­’½kAÆßyçcgvî6Ñ5DÁ"+±0(˜4iläà´¹Ú*……ÿ€¥ ‚¤°ÒJRx6±H8l%_Wè Ïärwû•[g÷ÌeB˜æegó<ïìüÇ G…º¶°ÒëÁÜ™ BÞyÏæÙñ£xjÌ ×'¯DkŒ‰1!e!¥<$ˆ!ö;q£öõàNôf‚eO%7¯[Ÿ¥eù¶”4²,+°mû»ÖúKµZ½ñm+w!h c†)²0§”—×ÚSFjhµR©¬–J¥&"²?mº{ 9¤¡<¡T „øå8ÎÇr¹Ü6ð‰½ÁIÊ8í¸®»^,O»8/áYgàUw¼5YðÖýq¿i5}… KÐ\ƒÍlÐLÙ%–áIÖù²Ù˜ˆ1½üžÜË'/¦Ê€É*…vÎñ\ºy@4>]§3 åÐFy*ñ¯ÆB ‡aa`ªÝj€·} ºÛ.øš 35„ƒŸäuf}çñùŸ&Úþ b¹_ËAüÅÇ‹àoÖî .xTäyý,ª<þd쑞X¸k·ž'ÝDqÔµèo…¤ ShûúýqûÅif}§~Îkü;c‰‡<}`SIEND®B`‚netmrg-0.20/www/webfiles/images/default/viewdisk.png0000664000076400007640000000141310173042724022764 0ustar silfreedsilfreed‰PNG  IHDR;Ö•J cHRMz&€„ú€èu0ê`:˜pœºQ<gAMA±Ž|ûQ“sRGB®ÎébKGDÿÿÿ ½§“ pHYsÄÄ•+bIDATxÚ­’»‹QÆÏ¼³y„01“‡›%8YQV\‰…n)XØØX§Ô* BVþ‚·² ÖÕF´°pq×m"hž“L2yLœÉLÆ3êÅFÐ ÷Ì=¿{¾ó ð‹8ܸÄÛÛ†ieþ "ˆò—Já2mñxÜ×#Œõ„ýca}>·æ ÞjÑ «ZÙʹË,ñï;²Þz»'¥f†uÉæèl6{µ×ë=y¶ Ôò€3kÂÌår)xFu:a: š&¯™¦Ô;~Bˆ¿ygٿñXì4~ÔÎ <ï§ÓQCà#…+ž×4›Íf`Y–ß0 ׯòéR©t'ŸœÏ£›˜@@dYV´‡Ã!ŒÇch6›“V«u·X,¶‰[ 8N?eyo†Ñh“‰g»ßï—ëõú$É‚ªª^ÛOžç ù|þqþ¡²€QÒ#”}aúÞP(>Ÿ/ƒÀÅd2I0 CÚIØt»Ý}]×Û¿ÉV…­Õj”ª¡Z­‚—i`ßNÇAI’Fã ™J¥‚Èúƪ×"‘ˆûù‡TZ$Œu²&Ér•¡)Nà=g b•à“â^/pÏ‚ù©C˜Bw8ŽÛp,yWT"f&íg9g‚¤¹å‘ ”2¶@èf­>ý<šŽä©!¿zI§R©ûØO&Áw!Á‚ðe¾F]¦iÞD·ÝvŽ¢'çr¹\ý§lLØEñ†Çãqc`¼jVpcm0†Á`PL&í?Þ6Ž‹Æù^Áþ/øýþU„üöLnàÐÈ­r¹¼ÿs}N—Ì£ÉјIEND®B`‚netmrg-0.20/www/webfiles/event_log.php0000664000076400007640000000407310361026461020237 0ustar silfreedsilfreed date("Y/m/d H:i:s",$row["date"])), array("text" => format_time_elapsed($row["time_since_last_change"])), array("text" => get_img_tag_from_status($row["situation"]) . " " . $row['dev_name'] . ": " . $row['ev_name']) ); // end make_display_item(); $rowcount++; } // end for each row in event log print(""); echo('
'); if ($_REQUEST['index'] >= 25) { echo('[<- Prev]'); } // end if can go back else { echo('[<- Prev]'); } // end if can't go back echo '  '; if (($rowcount + $_REQUEST['index']) < $numrows) { echo('[Next ->]'); } // end if still more rows left else { echo('[Next ->]'); } // end else no more rows left end_page(); ?> netmrg-0.20/www/webfiles/users.php0000664000076400007640000001242510371027521017415 0ustar silfreedsilfreedError: your passwords don't match; please go back and try again
"; end_page(); exit(0); } // end if pass doesn't match vpass } // end if pass if ($_REQUEST["user_id"] == 0) { $db_cmd = "INSERT INTO"; $db_end = ""; } else { $db_cmd = "UPDATE"; $db_end = "WHERE id='{$_REQUEST['user_id']}'"; } $pass_cmd = ""; if (!empty($_REQUEST["pass"])) { $pass_cmd = "pass = md5('{$_REQUEST['pass']}'), "; } // end if new password to set if (empty($_REQUEST["group_id"])) { $_REQUEST["group_id"] = 0; } // end if no group id set if (empty($_REQUEST["disabled"])) { $_REQUEST["disabled"] = 0; } // end if no disabled value set db_update("$db_cmd user SET user='{$_REQUEST['user']}', fullname='{$_REQUEST['fullname']}', $pass_cmd permit='{$_REQUEST['permit']}', group_id='{$_REQUEST['group_id']}', disabled='{$_REQUEST['disabled']}' $db_end"); header("Location: {$_SERVER['PHP_SELF']}"); } function do_delete() { db_update("DELETE FROM user WHERE id='{$_REQUEST['user_id']}'"); header("Location: {$_SERVER['PHP_SELF']}"); } function do_deletemulti() { if (isset($_REQUEST["user"])) { while (list($key,$value) = each($_REQUEST["user"])) { db_update("DELETE FROM user WHERE id='$key'"); } } header("Location: {$_SERVER['PHP_SELF']}"); } function display_edit() { begin_page("users.php", "User Management", 0, 'onLoad="enableGroup(document.editform.permit.value)"'); echo ' '; if ($action == "add") { $user_id = 0; } else { $user_id = $_REQUEST["user_id"]; } // end if add or not $user_results = db_query("SELECT * FROM user WHERE id='$user_id'"); $user_row = db_fetch_array($user_results); make_edit_table("Edit User"); make_edit_text("User ID:", "user", "25", "50", $user_row["user"]); make_edit_text("Full Name", "fullname", "25", "75", $user_row["fullname"]); if (!$GLOBALS["netmrg"]["externalAuth"]) { make_edit_password("Password:", "pass", "25", "50", ""); make_edit_password("Verify Password:", "vpass", "25", "50", ""); } // end if not using external auth, show password form make_edit_select_from_array("Permit Type:", "permit", $GLOBALS['PERMIT_TYPES'], $user_row["permit"], 'onChange="enableGroup(this.value)"'); make_edit_select_from_table("Group:", "group_id", "groups", $user_row["group_id"], "", array(0 => "-Root-")); make_edit_checkbox("Disabled", "disabled", $user_row["disabled"]); make_edit_hidden("action", "doedit"); make_edit_hidden("user_id", $user_id); make_edit_submit_button(); make_edit_end(); end_page(); } function display_page() { begin_page("users.php", "User Management"); js_checkbox_utils(); ?>
" method="post" name="form"> checkbox_toolbar()), array("text" => "User ID"), array("text" => "Name"), array("text" => "Permissions") ); // end make_display_table(); $user_results = db_query("SELECT * FROM user ORDER BY user.user"); $user_total = db_num_rows($user_results); js_confirm_dialog("del", "Are you sure you want to delete user ", " ?", "{$_SERVER['PHP_SELF']}?action=dodelete&user_id="); // For each user for ($user_count = 1; $user_count <= $user_total; ++$user_count) { $user_row = db_fetch_array($user_results); $user_id = $user_row["id"]; make_display_item("editfield".(($user_count-1)%2), array("checkboxname" => "user", "checkboxid" => $user_id), array("text" => $user_row["user"]), array("text" => $user_row["fullname"]), array("text" => (get_permit($user_row["user"])==$GLOBALS['PERMIT']["Disabled"]) ? 'Disabled' : $GLOBALS['PERMIT_TYPES'][$user_row['permit']]), array("text" => formatted_link("Prefs", "user_prefs.php?uid=$user_id") . " " . formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&user_id=$user_id", "", "edit") . " " . formatted_link("Delete", "javascript:del('".addslashes($user_row['user'])."', '{$user_row['id']}')", "", "delete") ) ); // end make_display_item(); } // end users make_checkbox_command("", 5, array("text" => "Delete", "action" => "deletemulti", "prompt" => "Are you sure you want to delete the checked users?") ); // end make_checkbox_command make_status_line("user", $user_count - 1); ?>
netmrg-0.20/www/webfiles/events.php0000664000076400007640000001142610367515603017570 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Name"), array("text" => "Trigger Options"), array("text" => "Situation"), array("text" => "Status") ); // end make_display_table(); $query = db_query("SELECT * FROM events WHERE mon_id = {$_REQUEST['mon_id']} ORDER BY name"); $rowcount = 0; while (($row = db_fetch_array($query)) != NULL) { if ($row['last_status'] == 1) { $triggered = "Triggered"; $name = "" . $row['name'] . ""; } else { $triggered = "Not Triggered"; $name = $row['name']; } make_display_item("editfield".($rowcount%2), array("checkboxname" => "event", "checkboxid" => $row['id']), array("text" => $name, "href" => "responses.php?event_id={$row['id']}&tripid={$_REQUEST['tripid']}"), array("text" => $GLOBALS['TRIGGER_TYPES'][$row['trigger_type']]), array("text" => $GLOBALS['SITUATIONS'][$row['situation']]), array("text" => $triggered), array("text" => formatted_link("Modify Conditions", "conditions.php?event_id={$row['id']}&tripid={$_REQUEST['tripid']}") . " " . formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&id={$row['id']}&tripid={$_REQUEST['tripid']}", "", "edit") . " " . formatted_link("Delete", "javascript:del('" . addslashes($row['name']) . "','" . $row['id'] . "')", "", "delete")) ); // end make_display_item(); $rowcount++; } // end while rows left make_checkbox_command("", 6, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked events?") ); // end make_checkbox_command make_status_line("event", $rowcount); ?>
netmrg-0.20/www/webfiles/login.php0000664000076400007640000000664210374217573017403 0ustar silfreedsilfreed

User Login

User:
Password:
netmrg-0.20/www/webfiles/logout.php0000664000076400007640000000050107610702345017563 0ustar silfreedsilfreed netmrg-0.20/www/webfiles/grpdev_list.php0000664000076400007640000002134610522144106020575 0ustar silfreedsilfreed'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; make_display_table("Device Groups", "groups.php?action=add&parent_id={$_REQUEST['parent_id']}&tripid={$_REQUEST['tripid']}", array("text" => checkbox_toolbar("grp")), array("text" => "Name"), array("text" => "Comment") ); // end make_display_table(); // while results $count = 0; while ($grp_row = db_fetch_array($grp_results)) { $grp_id = $grp_row["id"]; $grp_href = (db_fetch_cell("SELECT count(*) FROM groups WHERE parent_id = '{$_REQUEST['parent_id']}'") > 0) ? "grpdev_list.php?parent_id=$grp_id&tripid={$_REQUEST['tripid']}" : "#"; make_display_item("editfield".($count%2), array("checkboxname" => "grp_id", "checkboxid" => $grp_row['id']), array("text" => $grp_row["name"], "href" => $grp_href), array("text" => $grp_row["comment"]), array("text" => formatted_link("View", "view.php?action=view&object_type=group&object_id={$grp_row['id']}", "", "view") . " " . formatted_link("Edit", "groups.php?action=edit&grp_id=$grp_id&parent_id={$_REQUEST['parent_id']}&tripid={$_REQUEST['tripid']}", "", "edit") . " " . formatted_link("Delete", "javascript:del_grp('" . addslashes($grp_row["name"]) . "', '" . $grp_row["id"] . "')", "", "delete")) ); // end make_display_item(); $count++; } // end while groups make_checkbox_command("grp", 4, array("text" => "Delete", "action" => "deletemulti", "prompt" => "Are you sure you want to delete the checked groups?") ); // end make_checkbox_command make_status_line("group", $count); ?>
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; $custom_columns = array(); $menu_items = array(); array_push($menu_items, array("text" => checkbox_toolbar("dev"))); array_push($menu_items, array("text" => "Name")); array_push($menu_items, array("text" => "Availability")); while ($row = mysql_fetch_array($column_results)) { array_push($custom_columns, $row['name']); array_push($menu_items, array("text" => $row['name'])); } array_push($menu_items, array("text" => "SNMP Options")); make_display_table_array($title, $menu_items, $addlink); $count = 0; while($dev_row = db_fetch_array($dev_results)) { $dev_id = $dev_row["id"]; /* SNMP Options */ $links = cond_formatted_link($dev_row["interface_count"] > 0, "View Interface Cache", "snmp_cache_view.php?dev_id=$dev_id&action=view&type=interface&tripid={$_REQUEST['tripid']}", "", "viewinterface") . " " . cond_formatted_link($dev_row["snmp_version"] > 0, "Recache Interfaces", "recache.php?dev_id=$dev_id&type=interface&tripid={$_REQUEST['tripid']}", "", "recacheinterface") . " " . cond_formatted_link($dev_row["disk_count"] > 0, "View Disk Cache", "snmp_cache_view.php?dev_id=$dev_id&action=view&type=disk&tripid={$_REQUEST['tripid']}", "", "viewdisk") . " " . cond_formatted_link($dev_row["snmp_version"] > 0, "Recache Disks", "recache.php?dev_id=$dev_id&type=disk&tripid={$_REQUEST['tripid']}", "", "recachedisk") . formatted_link("Recache Properties", "recache.php?dev_id=$dev_id&type=properties&tripid={$_REQUEST['tripid']}&parent_id={$_REQUEST['parent_id']}", "", "recacheproperties"); /* Availability Display */ if ($dev_row['disabled'] == 1) { $availability = "Disabled"; } elseif ($dev_row['snmp_version'] == 0) { $availability = "No SNMP support"; } elseif ($dev_row['snmp_avoided'] == 1) { $availability = "SNMP failed"; } elseif ( ($dev_row['snmp_avoided'] == 0) && ($dev_row['snmp_uptime'] == 0) ) { $availability = "Pending Initial Gathering"; } else { $availability = "SNMP Uptime: " . format_time_elapsed($dev_row['snmp_uptime']/100); } $items = array(); array_push($items, array("checkboxname" => "dev_id", "checkboxid" => $dev_row['id'])); array_push($items, array("text" => $dev_row["name"], "href" => "sub_devices.php?dev_id=$dev_id&tripid={$_REQUEST['tripid']}")); array_push($items, array("text" => $availability)); /* Device Properties */ $prop_res = db_query(" SELECT name, value FROM dev_prop_vals vals LEFT JOIN dev_props props ON vals.prop_id = props.id WHERE dev_id = $dev_id"); $props = array(); while ($proprow = db_fetch_array($prop_res)) { array_push($props, array("name" => $proprow['name'], "value" => $proprow['value'])); } foreach ($custom_columns as $column) { $found = ""; foreach ($props as $prop) if ($prop['name'] == $column) { $found = true; array_push($items, array("text" => $prop['value'])); } if (!$found) array_push($items, array()); } array_push($items, array("text" => $links)); array_push($items, array("text" => formatted_link("View", "view.php?action=view&object_type=device&object_id=$dev_id", "", "view") . " " . formatted_link("Duplicate", "devices.php?action=duplicate&dev_id=$dev_id&grp_id={$_REQUEST['parent_id']}&tripid={$_REQUEST['tripid']}", "", "duplicate") . " " . formatted_link("Edit", "devices.php?action=edit&dev_id=$dev_id&grp_id={$_REQUEST['parent_id']}&tripid={$_REQUEST['tripid']}", "", "edit") . " " . formatted_link("Delete", "javascript:del_dev('" . addslashes($dev_row["name"]) . "', '" . $dev_row["id"] . "')", "", "delete"))); make_display_item_array($items, "editfield".($count%2)); $count++; } // end while devices make_checkbox_command("dev", 5 + count($custom_columns), array("text" => "Delete", "action" => "deletemulti", "prompt" => "Are you sure you want to delete the checked devices?") ); // end make_checkbox_command make_status_line("device", $count); ?>
netmrg-0.20/www/webfiles/updater.php0000664000076400007640000004043610772742446017742 0ustar silfreedsilfreed array("ver" => array("name" => "Update Name", "query" => "SELECT 1;")); $dbupdates = array( "0.10pre1" => array(), // end 0.10pre1 "0.10pre2" => array( array( "name" => "Graph Options", "query" => "ALTER TABLE `graphs` ADD `options` SET( 'nolegend', 'logarithmic' ) NOT NULL ;" ), array( "name" => "Graph Options2", "query" => "ALTER TABLE `graphs` ADD `base` INT DEFAULT '1000' NOT NULL ;" ), array( "name" => "Graph Item Times", "query" => "ALTER TABLE `graph_ds` ADD `start_time` VARCHAR( 20 ) NOT NULL ;" ), array( "name" => "Graph Item Times2", "query" => "ALTER TABLE `graph_ds` ADD `end_time` VARCHAR( 20 ) NOT NULL ;" ), array( "name" => "Graph Title", "query" => "ALTER TABLE `graphs` ADD `title` VARCHAR( 100 ) NOT NULL AFTER `name`;" ), array( "name" => "Graph Item Muliplier", "query" => "ALTER TABLE `graph_ds` CHANGE `multiplier` `multiplier` VARCHAR( 100 ) DEFAULT '1' NOT NULL;" ), array( "name" => "SNMP ifSpeed", "query" => "ALTER TABLE snmp_interface_cache ADD COLUMN ifSpeed int(11) NOT NULL;" ), array( "name" => "Graph Title Fill-in", "query" => "UPDATE graphs SET title = name WHERE title = '';" ) ), // end 0.10pre2 "0.10" => array(), // end 0.10 "0.12" => array( array( "name" => "SNMP Version Support", "query" => "ALTER TABLE `devices` CHANGE `snmp_enabled` `snmp_version` TINYINT( 4 ) DEFAULT '1' NOT NULL ;" ), array( "name" => "SNMP Timeout", "query" => "ALTER TABLE `devices` ADD `snmp_timeout` INT UNSIGNED DEFAULT '1000000' NOT NULL AFTER `snmp_version`, ADD `snmp_retries` TINYINT UNSIGNED DEFAULT '3' NOT NULL AFTER `snmp_timeout`, ADD `snmp_port` SMALLINT UNSIGNED DEFAULT '161' NOT NULL AFTER `snmp_retries` ;" ), array( "name" => "User Prefs", "query" => "CREATE TABLE user_prefs ( id INT NOT NULL AUTO_INCREMENT, uid INT NOT NULL, module VARCHAR(64) NOT NULL, pref VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY (id), KEY uid (uid), KEY uid_module_pref (uid, module, pref));" ), array( "name" => "User Prefs Slideshow Default", "query" => "INSERT INTO user_prefs (uid, module, pref, value) SELECT id, 'SlideShow', 'AutoScroll', 1 FROM user;" ) ), // end 0.12 "0.13" => array(), // end 0.13 "0.14" => array( array( "name" => "SNMP Recache Method", "query" => "ALTER TABLE `devices` ADD `snmp_recache_method` SMALLINT DEFAULT '0' NOT NULL AFTER `dev_type`;" ), array( "name" => "SNMP Recache Method Default", "query" => "UPDATE devices SET snmp_recache_method = 4 WHERE snmp_recache = 1;" ), array( "name" => "SNMP Recache Method Default2", "query" => "UPDATE devices SET snmp_recache_method = 3 WHERE snmp_recache = 0 AND snmp_check_ifnumber = 1;" ), array( "name" => "SNMP Recache Method Default3", "query" => "UPDATE devices SET snmp_recache_method = 1 WHERE snmp_recache = 0 AND snmp_check_ifnumber = 0;" ), array( "name" => "SNMP Recache Drop", "query" => "ALTER TABLE `devices` DROP `snmp_recache`;" ), array( "name" => "SNMP ifNumber Drop", "query" => "ALTER TABLE `devices` DROP `snmp_check_ifnumber`;" ), array( "name" => "Log Table", "query" => "CREATE TABLE `log` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `date` DATETIME NOT NULL, `dev_id` INT, `subdev_id` INT, `mon_id` INT, `level` INT NOT NULL , `component` INT NOT NULL , `message` VARCHAR( 200 ) NOT NULL , PRIMARY KEY ( `id` ) , INDEX ( `date` ) , INDEX ( `dev_id` ), INDEX ( `subdev_id` ) , INDEX( `mon_id` ));" ), array( "name" => "User Index Drop", "query" => "ALTER TABLE user DROP INDEX user;" ), array( "name" => "User Unique Index", "query" => "ALTER TABLE user ADD CONSTRAINT UNIQUE user (user);" ) ), // end 0.14 "0.15" => array(), // end 0.15 "0.16" => array( array( "name" => "Device SNMP Uptime Check Option", "query" => "ALTER TABLE `devices` ADD `no_snmp_uptime_check` TINYINT DEFAULT '0' NOT NULL ;" ), array( "name" => "SNMP Test Type", "query" => "ALTER TABLE `tests_snmp` ADD `type` TINYINT DEFAULT '0' NOT NULL , ADD `subitem` INT DEFAULT '0' NOT NULL ;" ), array( "name" => "Graph Min/Max", "query" => "ALTER TABLE `graphs` ADD `max` INT, ADD `min` INT;" ) ), // end 0.16 "0.17" => array( array( "name" => "Internal Test Name Lengthen", "query" => "ALTER TABLE `tests_internal` CHANGE `name` `name` VARCHAR( 200 ) NOT NULL ;" ), array( "name" => "Script Test Name Lengthen", "query" => "ALTER TABLE `tests_script` CHANGE `name` `name` VARCHAR( 200 ) NOT NULL ;" ), array( "name" => "SQL Test Name Lengthen", "query" => "ALTER TABLE `tests_sql` CHANGE `name` `name` VARCHAR( 200 ) NOT NULL ;" ), array( "name" => "New Internal Test - Lucent TNT Good Modems", "query" => "INSERT INTO tests_internal VALUES (2,'Lucent TNT \"Good\" Modems (available modems minus suspect modems)');" ), array( "name" => "New Internal Test - UCD CPU Load", "query" => "INSERT INTO tests_internal VALUES (3,'UCD CPU Load (user + system)');" ), array( "name" => "New Internal Test - Windows Disk Usage", "query" => "INSERT INTO tests_internal VALUES (4,'Windows Disk Usage (percent)');" ), array( "name" => "New Internal Test - UCD Swap Usage", "query" => "INSERT INTO tests_internal VALUES (5,'UCD Swap Usage (percent)');" ), array( "name" => "New Internal Test - Read Value from File", "query" => "INSERT INTO tests_internal VALUES (6,'Read Value from File');" ), array( "name" => "User Disabled Support", "query" => "ALTER TABLE `user` ADD `disabled` TINYINT DEFAULT '0' NOT NULL;" ) ), // end 0.17 "0.18" => array( array( "name" => "Graph Multiply Sum Support", "query" => "ALTER TABLE `graph_ds` CHANGE `stats` `stats` SET( 'CURRENT', 'AVERAGE', 'MAXIMUM', 'SUMS', 'INTEGER', 'MULTSUM' ) DEFAULT 'CURRENT,AVERAGE,MAXIMUM' NOT NULL ;" ), array( "name" => "New Internal Test - SNMP Failure", "query" => "INSERT INTO tests_internal VALUES (7,'SNMP Failure');" ), array( "name" => "SQL Test Timeout", "query" => "ALTER TABLE `tests_sql` ADD `timeout` INT DEFAULT '10' NOT NULL ;" ) ), // end 0.18 "0.18.1" => array(), // end 0.18.1 "0.18.2" => array(), // end 0.18.2 "0.19" => array( array( "name" => "Increase size of monitors.type_id", "query" => "ALTER TABLE monitors MODIFY test_id INT NOT NULL;" ), array( "name" => "Increase size of view.pos", "query" => "ALTER TABLE view MODIFY pos INT NOT NULL;" ), array( "name" => "Windows CPU Internal Test", "query" => "INSERT INTO tests_internal VALUES (8,'Windows CPU Load');" ), array( "name" => "Livingston Portmaster Modems Script Test", "query" => "INSERT INTO tests_script SET name='Livingston Portmaster Active Modems', cmd='pmmodems.pl %snmp_read_community% %ip%', data_type='2'"), array( "name" => "Graph Min NULL Fix", "query" => "UPDATE graphs SET min=NULL WHERE min=0"), array( "name" => "Graph Max NULL Fix", "query" => "UPDATE graphs SET max=NULL WHERE max=0") ), // end 0.19 "0.19.1" => array(), // end 0.19 "0.20" => array( array( "name" => "Device Properties Table", "query" => "CREATE TABLE `dev_props` (`id` INT NOT NULL AUTO_INCREMENT, `dev_type_id` INT NOT NULL, `name` VARCHAR( 200 ) NOT NULL, `test_type` TINYINT NOT NULL, `test_id` INT NOT NULL, `test_params` VARCHAR( 150 ) NOT NULL, PRIMARY KEY ( `id` )) TYPE = MYISAM ;"), array( "name" => "Device Properties Values Table", "query" => "CREATE TABLE `dev_prop_vals` ( `dev_id` INT NOT NULL, `prop_id` INT NOT NULL, `value` VARCHAR( 250 ) NOT NULL, PRIMARY KEY ( `dev_id` , `prop_id` )) "), array( "name" => "SNMP Interface Cache New Fields", "query" => "ALTER TABLE `snmp_interface_cache` ADD `nexthop` VARCHAR( 20 ) , ADD `vlan` VARCHAR( 20 ) , ADD `mode` TINYINT"), array( "name" => "Graph Item Consolidation Function Field", "query" => "ALTER TABLE `graph_ds` ADD `cf` TINYINT NOT NULL DEFAULT '1'"), array( "name" => "Device Unknowns on SNMP Restart Field", "query" => "ALTER TABLE `devices` ADD `unknowns_on_snmp_restart` TINYINT NOT NULL DEFAULT '1'") ), // end 0.20 ); // end $dbupdates; /***** ACTIONS *****/ // check default action if (empty($_REQUEST['action'])) { $_REQUEST["action"] = "prompt"; } // end if no action // check what to do switch ($_REQUEST['action']) { case "viewupdates": Updater($dbupdates); break; case "performupdate": if (!isset($_REQUEST["force_update"])) { $_REQUEST["force_update"] = false; } // end if no force set if (!isset($_REQUEST["which_update"])) { $_REQUEST["which_update"] = ""; } // end if no update selected if (!isset($_REQUEST["update_version"])) { $_REQUEST["update_version"] = ""; } // end if no update_version Updater($dbupdates, $_REQUEST["update_version"], $_REQUEST["which_update"], $_REQUEST["force_update"]); break; case "prompt": default: prompt(); break; } // end switch action /***** FUNCTIONS *****/ /** * prompt() * * tells a user what we're about to do */ function prompt() { begin_page("updater.php", "Updater"); $dbver = $GLOBALS["netmrg"]["dbversion"]; if ($dbver != $GLOBALS["netmrg"]["version"]) { ?>
" method="POST">
The current database needs to be updated from version to
[apply all updates]
Your database is already at the latest version, . No upgrade is needed.
[Home] [Updater]
" method="POST">
$dbqueries) { $numupdates = count($dbqueries); $updates_applied = 0; echo '\n"; echo ''."\n"; echo ''."\n"; echo '\n"; echo '\n"; echo '\n"; echo ''."\n"; } // end foreach db query // update the database version if we're updating this version or all versions if (($version == $dbupver || $version == "all") && $GLOBALS["netmrg"]["verhist"][$dbupver] > $GLOBALS["netmrg"]["verhist"][$dbver] && $numupdates == $updates_applied) { UpdateDBVersion($dbupver); } // end if this version > db version echo ''."\n"; } // end foreach update version ?>
v'.$dbupver; echo " - ".$numupdates." update"; echo ($numupdates != 1) ? "s" : ""; echo "[apply all]
NameApplied - '; echo 'yes '; echo 'no '; echo 'error'; echo "action'."\n"; foreach ($dbqueries as $dbkey => $dbquery) { $update_status = "notapplied"; $update_error = ""; // check if the update is applied if (CheckUpdate($dbupver, $dbquery['name'])) { $update_status = "applied"; $updates_applied++; } // end if update is applied if (($version == $dbupver && ($which_update == $dbkey || $which_update == "all")) || ($version == "all" && $which_update == "all")) { if (!CheckUpdate($dbupver, $dbquery['name']) || $force) { db_query($dbquery['query'], true); // check for error if (!mysql_errno($GLOBALS["netmrg"]["dbconn"])) { $update_status = "applied"; $updates_applied++; LogUpdate($dbupver, $dbquery['name'], $dbver); } // if no error else { $update_status = "error"; $update_error = "
DB_ERROR: Couldn't execute query:
\n
{$dbquery['query']}

\n
".mysql_error($GLOBALS["netmrg"]["dbconn"])."

\n\n"; if ($force) { LogUpdate($dbupver, $dbquery['name'], $dbver); } // end if we were forcing this update, we need to log it } // end if error } // end if the update isn't applied and we aren't forcing it } // end if we need to try to apply this update echo '
'. $dbquery['name'] ."'; echo (strlen($dbquery['query']) > 45) ? substr($dbquery['query'], 0, 42)."..." : $dbquery['query']; echo $update_error; echo "[apply] [force]
'; echo $updates_applied." update"; echo ($updates_applied != 1) ? "s" : ""; echo ' applied

[Home] [Updater] $dbqueries) { foreach ($dbqueries as $dbkey => $dbquery) { // we'll assume updates lower than $dbver are applied if ($GLOBALS["netmrg"]["verhist"][$dbupver] <= $GLOBALS["netmrg"]["verhist"][$dbver]) { LogUpdate($dbupver, $dbquery['name'], "pre-$dbver"); } // end if dbupver < this ver } // end foreach db query } // end foreach update version } // end if we don't have an 'updates' table } // end PrepUpdater(); /** * LogUpdate(); * * log that we did an update */ function LogUpdate($update_version, $name, $version_applied_to) { if (!CheckUpdate($update_version, $name)) { db_query("INSERT INTO updates SET update_version = '$update_version', name = '$name', version_applied_to = '$version_applied_to', dateapplied = now()"); } // end if the update's not already logged } // end LogUpdate(); /** * CheckUpdate($update_version, $name); * */ function CheckUpdate($update_version, $name) { if (db_fetch_cell("SELECT 1 FROM updates WHERE update_version = '$update_version' AND name = '$name'")) { return true; } // end if the update exists return false; } // end CheckUpdate(); ?> netmrg-0.20/www/webfiles/search.php0000664000076400007640000001452310361026461017523 0ustar silfreedsilfreed'."\n"; echo 'Your search for '.htmlspecialchars(stripslashes($query)).' produced ' . $search_result_count . ' result(s)'; echo "\n"; while (list($obj_type, $s_result) = each($search_result)) { foreach($s_result as $sitem) { display_result($obj_type, $sitem["id"], $sitem["name"], $sitem["groups"], $sitem["parent"]); } // end foreach search result item } // end while each search result type end_page(); } // end display(); /** * display_result(); * * a wrapper for the search results * * @param string $object_type type of object (group, device, subdevice) * @param integer $object_id id of object * @param string $object_value value of object * @param array $object_groups group ids and names object is in * @param array $object_parent parent name and id */ function display_result($object_type, $object_id, $object_value, $object_groups, $object_parent) { global $SEARCH_ITEMS; ?>

'; $loopcount = 0; foreach ($object_groups as $group_id => $group_name) { if ($loopcount != 0) echo ", "; echo $group_name; if (GetNumAssocItems("group", $group_id) > 0) { echo "\n". ''. 'View'."\n". ''."\n"; } // end if we have items in this view $loopcount++; } echo "]\n"; // display object parents if (isset($object_parent)) { echo ' : ' . $object_parent["name"] . "\n"; if (GetNumAssocItems($object_parent["type"], $object_parent["id"]) > 0) { echo "\n". ''. 'View'. ''."\n"; } // end if we have items in this view } // end if parent exists // display object echo ' : '; echo $object_value; if (GetNumAssocItems($object_type, $object_id) > 0) { echo "\n". ''. 'View'. ''."\n"; } // end if we have items in this view echo "
\n"; ?>
$parent_id, "name" => $parent_name, "type" => "device"); } // end if allowed to view device } // end if subdevice or subdevice parameter } // end else allowed to view, get more info } // end foreach search result item } // end while each search result type // clear out any empty results reset($result); while (list($obj_type, $s_result) = each($result)) { if (!is_array($s_result) || count($s_result) == 0 || empty($s_result)) { unset($result[$obj_type]); } } // end while each object reset($result); return $result; } // end perform_search(); ?> netmrg-0.20/www/webfiles/sub_dev_param.php0000664000076400007640000001033110361026461021056 0ustar silfreedsilfreed "Name"), array("text" => "Value") ); // end make_display_table(); for ($i = 0; $i < db_num_rows($results); $i++) { $row = db_fetch_array($results); make_display_item("editfield".($i%2), array("text" => $row["name"]), array("text" => $row["value"]), array("text" => formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&sub_dev_id={$_REQUEST['sub_dev_id']}&tripid={$_REQUEST['tripid']}&name=" . $row["name"]) . " " . formatted_link("Delete", "javascript:del('".addslashes(htmlspecialchars($row['name']))."', '".addslashes(htmlspecialchars($row['name']))."')"), "") ); // end make_display_item(); } ?>

"Name"), array("text" => "Value") ); // end make_display_table(); for ($i = 0; $i < db_num_rows($results); $i++) { $row = db_fetch_array($results); make_display_item("editfield".($i%2), array("text" => $row["name"]), array("text" => $row["value"]), array("text" => "") ); // end make_display_item(); } ?> 0) { $row = db_fetch_array($query); make_edit_hidden("oldname", $row['name']); } } else { $row["name"] = ""; $row["value"] = ""; } make_edit_text("Name:", "name", 40, 80, $row["name"]); make_edit_text("Value:", "value", 40, 80, $row["value"]); make_edit_hidden("type", $_REQUEST['action']); make_edit_hidden("action","doedit"); make_edit_hidden("sub_dev_id",$_REQUEST["sub_dev_id"]); make_edit_hidden("tripid",$_REQUEST["tripid"]); make_edit_submit_button(); make_edit_end(); end_page(); } elseif ($_REQUEST["action"] == "dodelete") { check_auth($GLOBALS['PERMIT']["ReadWrite"]); db_update("DELETE FROM sub_dev_variables WHERE sub_dev_id={$_REQUEST['sub_dev_id']} AND name='{$_REQUEST['name']}' AND type='static'"); header("Location: " . $_SERVER["PHP_SELF"] . "?sub_dev_id={$_REQUEST['sub_dev_id']}&tripid={$_REQUEST['tripid']}"); } ?> netmrg-0.20/www/webfiles/favicon.ico0000664000076400007640000000706610210405454017666 0ustar silfreedsilfreedh& ¨Ž( @ÿÿÿžÿó¦cU~ÎÿùÔ…`›ÒÒÒ’‰=ö½B<µÿ¶ãÿÉ’‚Òü迵µµæææô± ªÿàóÿøËj¥œ‡§§§Ûš Íìÿ›››ôôô¤ÿ÷Æ[ûä±ðùÿ+®ÿH¹ÿùÐyþûòô­ó© 3±ÿé÷ÿ ¡ÿøÍpåõÿó§ £ÿ"«ÿãåæ{Íÿô®ÿþýF¸ÿ1±ÿþûôë÷ÿþþþþúñó¦ÿÿþ¶ãþ9 7#98;$1:5;2 ,&%*: 4/!'- 6.+)" <(03 7 9ÿïÿøÀ€€€ÀÀÀàààðÿ÷ÿ( @€ÿÿÿ䜞ÿN~xRsÊÿøÊi___ÌÌÌ---£y ûমàÿƦb~Ì=µÿõ¶/1mz~~~H1#8ýðÓAPµµ¶AAA'PjÎìÿßßß©ÿöÀL’Õÿô­ïïï\“%Šß6%úÙ’/@L©©©rrraÃÿLLLó§ë÷ÿþøêùÐz“““/]c¿¿¿L»ÿÕÕÕ‡‡‡üëÅûå´„Ðÿ%%%ççç999TTTjjjô²"÷ÅXÂèÿöööýôߥÿ¤ÜÿôûÿÿüöúÜ›÷Ç`D¸ÿó© üíÌúúú$¬ÿ ÿ÷ÃR´âÿyÌÿô¯§ÿýòÚõ¸4©Þÿúøôþúòûýÿðùÿþõãÿýú?´ü•×ÿüüüó¨Ÿÿô±÷üÿõµ,ýñÖýïÐ÷ÄUÏÿó¦ýþÿÿþý?¶ÿÄéÿ§Ýÿûߤ†Ñÿó§ýñØ÷Ç^@@@^^^ªÿþþþ÷ÂQ¶¶¶žÿŸÿó¦Ÿÿó§ó¨ó¨þÿÿüþÿÿþüÿü÷ýïÑÃèÿ¯àÿ…Ñÿ:>zB=< `,1; )"u *3M665x\ C5=;UjIx B@jjrfG„*z7]LjjjPep3>†K8/SVjjjj-Kj?X:`sl…jcYjjjjjjjjjjj'va0]tjjjhUg€jjjjjjjjjjj! j}Hyjjjjj!jjjjjjjjjjjjj&jjjjjjjjjjjjjjjjjjjjjjjjj2#%(9m"FT~) OAR~D|vdw‰ˆb{R[W{bO^$MnƒqiZN4Jo.3kW‚_{‡*F+E‚B x‚9Q;=5x566M3* u") ;1,` <=Bz>:ÿÿÿÿÿÿðÿÿ€ÿüÿà?þ?ð?€€€€€ÀÀÀàààðððøøøøüüüÿþ?ÿþÿÿþÿÿÿÿÿÿnetmrg-0.20/www/webfiles/notifications.php0000664000076400007640000000776110367515603021144 0ustar silfreedsilfreed "Name"), array("text" => "Disabled"), array("text" => "Command") ); // end make_display_table(); $res = db_query("SELECT * FROM notifications"); // For each notification for ($i = 0; $i < db_num_rows($res); $i++) { $row = db_fetch_array($res); make_display_item("editfield".($i%2), array("text" => $row["name"]), array("text" => ($row['disabled'] == 1 ? "Yes" : "No")), array("text" => $row["command"]), array("text" => formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&id={$row['id']}", "", "edit") . " " . formatted_link("Duplicate", "{$_SERVER["PHP_SELF"]}?action=duplicate&id=" . $row['id'], "", "duplicate") . " " . formatted_link("Delete", "javascript:del('". addslashes($row['name'])."', '{$row['id']}')", "", "delete")) ); // end make_display_item(); } ?> netmrg-0.20/www/webfiles/graph_items.php0000664000076400007640000002644310522706272020570 0ustar silfreedsilfreed ">

" method="post" name="form"> checkbox_toolbar()), array("text" => "Label"), array("text" => "Type"), array() ); // end make_display_table(); for ($ds_count = 0; $ds_count < $ds_total; $ds_count++) { // For each graph item $ds_row = db_fetch_array($ds_results); $id = $ds_row["id"]; if ($ds_count == 0) { $move_up = image_link_disabled("arrow-up", "Move Up"); } else { $move_up = image_link("arrow-up", "Move Up", "{$_SERVER['PHP_SELF']}?action=move_up&graph_id={$_REQUEST['graph_id']}&id=$id"); } if ($ds_count == ($ds_total - 1)) { $move_down = image_link_disabled("arrow-down", "Move Down"); } else { $move_down = image_link("arrow-down", "Move Down", "{$_SERVER['PHP_SELF']}?action=move_down&graph_id={$_REQUEST['graph_id']}&id=$id"); } if (($ds_row['type'] == 5) && ($ds_count == 0)) { $item_type = "STACK (using as AREA)"; } else { $item_type = $RRDTOOL_ITEM_TYPES[$ds_row["type"]]; } make_display_item("editfield".($ds_count%2), array("checkboxname" => "graph_items", "checkboxid" => $id), array("text" => $ds_row["label"]), array("text" => color_block($ds_row["color"]) . "  " . $item_type), array("text" => formatted_link("View", "enclose_graph.php?type=custom_item&id=" . $ds_row["id"], "", "view") . formatted_link("Duplicate", "{$_SERVER['PHP_SELF']}?action=duplicate&id=$id&graph_id={$_REQUEST['graph_id']}", "", "duplicate") . " " . $move_up . " " . $move_down ), array("text" => formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&id=$id&graph_id={$_REQUEST['graph_id']}", "", "edit") . " " . formatted_link("Delete", "javascript:del('" . addslashes($ds_row["label"]) . "', '" . $ds_row["id"] . "')", "", "delete")) ); // end make_display_item(); } // end for make_checkbox_command("", 5, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked graphs?"), array("text" => "Duplicate", "action" => "multiduplicate"), array("text" => "Move Up", "action" => "move_up"), array("text" => "Move Down", "action" => "move_down"), array("text" => "Gradient", "action" => "gradient") ); // end make_checkbox_command make_status_line("graph item", $ds_count); ?>
Monitor:
"; if ($ds_row["mon_id"] > 0) { $label .= get_monitor_name($ds_row["mon_id"]); } else { $label .= $GLOBALS['SPECIAL_MONITORS'][intval($ds_row["mon_id"])]; } $label .= " [change]"; make_edit_label($label); make_edit_hidden("mon_id", $ds_row["mon_id"]); } make_edit_text("Fixed Value or Value Multiplier:", "multiplier", "25", "100", $ds_row["multiplier"]); make_edit_group("Legend"); make_edit_select_from_array("Alignment:", "alignment", $GLOBALS['ALIGN_ARRAY'], $ds_row["alignment"]); make_edit_checkbox("Show Current Value", "show_current", isin($ds_row["stats"], "CURRENT")); make_edit_checkbox("Show Average Value", "show_average", isin($ds_row["stats"], "AVERAGE")); make_edit_checkbox("Show Maximum Value", "show_maximum", isin($ds_row["stats"], "MAXIMUM")); make_edit_checkbox("Show Only Integers", "show_integer", isin($ds_row["stats"], "INTEGER")); make_edit_checkbox("Show Sums", "show_sums", isin($ds_row["stats"], "SUMS")); make_edit_checkbox("Apply Multiplier to Sums", "multiply_sum", isin($ds_row['stats'], "MULTSUM")); if (!empty($_REQUEST["showadvanced"])) { make_edit_group("Advanced"); make_edit_text("Start Time", "start_time", "20", "20", $ds_row["start_time"]); make_edit_text("End Time", "end_time", "20", "20", $ds_row["end_time"]); } // end if we want advanced options shown else { $graphlink = 'graph_items.php?showadvanced=true'; if (!empty($_SERVER["QUERY_STRING"])) { $graphlink .= '&'.$_SERVER["QUERY_STRING"]; } // end if query string not empty make_edit_group('[Show Advanced]'); make_edit_hidden("start_time", $ds_row["start_time"]); make_edit_hidden("end_time", $ds_row["end_time"]); } // end if no advanced options make_edit_hidden("action", "doedit"); make_edit_hidden("graph_id", $ds_row["graph_id"]); make_edit_hidden("id", $ds_row["id"]); make_edit_hidden("position", $ds_row["position"]); make_edit_submit_button(); make_edit_end(); } // End editing screen ?> netmrg-0.20/www/webfiles/groups.php0000664000076400007640000000534110361026461017573 0ustar silfreedsilfreed $val) { delete_group($key); } // end foreach group, delete } display(); } // end what to do /***** FUNCTIONS *****/ function edit() { // Display editing screen begin_page("groups.php", "Groups"); $grp_id = $_REQUEST["grp_id"]; $grp_results = db_query("SELECT * FROM groups WHERE id=$grp_id"); $grp_row = db_fetch_array($grp_results); $grp_name = $grp_row["name"]; $grp_comment = $grp_row["comment"]; make_edit_table("Edit Group"); make_edit_text("Name:","grp_name","25","100",$grp_name); make_edit_text("Comment:","grp_comment","50","200",$grp_comment); make_edit_select_from_table("Parent:", "edit_parent_id", "groups", $grp_row["parent_id"], "", array(0 => "-Root-"), array(), "id != '$grp_id'"); make_edit_hidden("grp_id", $grp_id); make_edit_hidden("action","update"); make_edit_hidden("parent_id",$_REQUEST["parent_id"]); make_edit_hidden("tripid",$_REQUEST["tripid"]); make_edit_submit_button(); make_edit_end(); end_page(); } // end edit(); function add() { // Display editing screen begin_page("groups.php", "Groups"); make_edit_table("Edit Group"); make_edit_text("Name:","grp_name","25","100",""); make_edit_text("Comment:","grp_comment","50","200",""); make_edit_select_from_table("Parent:", "edit_parent_id", "groups", $_REQUEST["parent_id"], "", array(0 => "-Root-"), array(), "id != '-1'"); make_edit_hidden("grp_id", -1); make_edit_hidden("action","insert"); make_edit_hidden("parent_id",$_REQUEST["parent_id"]); make_edit_hidden("tripid",$_REQUEST["tripid"]); make_edit_submit_button(); make_edit_end(); end_page(); } // end add(); function display() { header("Location: grpdev_list.php?parent_id={$_REQUEST['parent_id']}&tripid={$_REQUEST['tripid']}"); exit(); } // end display(); ?> netmrg-0.20/www/webfiles/snmp_cache_view.php0000664000076400007640000002623210361026461021410 0ustar silfreedsilfreed
" method="post" name="form"> "dindex", "checkboxid" => $row["disk_index"], "checkdisabled" => isset($s_row['id'])), array("text" => $row['disk_index']), array("text" => $row['disk_device']), array("text" => $row['disk_path']), array("text" => $links) ); // end make_display_item(); } make_checkbox_command("", 9, array("text" => "Monitor/Graph All Checked", "action" => "graphmultidisk") ); // end make_checkbox_command echo("\n"); echo("
\n"); end_page(); } function view_interface_cache() { $sort_href = "{$_SERVER['PHP_SELF']}?action=view&type=interface&dev_id={$_REQUEST['dev_id']}&order_by"; $handle = db_query("SELECT * FROM snmp_interface_cache snmp WHERE snmp.dev_id={$_REQUEST['dev_id']}"); $results = array(); while ($row = db_fetch_array($handle)) { array_push($results, $row); } function sortme($a, $b) { $ob = $_REQUEST['order_by']; switch($ob) { case "ifName": case "ifDescr": return compare_interface_names($a[$ob], $b[$ob]); case "ifAlias": return strcmp($a['ifAlias'], $b['ifAlias']); case "ifIP": return compare_ip_addresses($a['ifIP'], $b['ifIP']); case "ifMAC": return compare_mac_addresses($a['ifMAC'], $b['ifMAC']); default: return ($a['ifIndex'] - $b['ifIndex']); } } usort($results, sortme); $dev_name = get_device_name($_REQUEST['dev_id']); begin_page("snmp_cache_view.php", "$dev_name - Interface Cache"); js_checkbox_utils(); PrepGroupNavHistory("device", $_REQUEST["dev_id"]); DrawGroupNavHistory("device", $_REQUEST["dev_id"]); ?>
" method="post" name="form"> Monitor/Graph>'; } make_display_item("editfield".($i%2), array("checkboxname" => "iface", "checkboxid" => $row["ifIndex"], "checkdisabled" => isset($s_row['id'])), array("text" => $row["ifIndex"]), array("text" => $status), array("text" => $row["ifName"]), array("text" => $row["ifDescr"]), array("text" => $row["ifAlias"]), array("text" => $row["ifIP"]), array("text" => $row["ifMAC"]), array("text" => $links) ); // end make_display_item(); } // end for each row echo "\n"; echo ''; echo "Checked Items:  \n"; echo '<Monitor/Graph All Checked>'; echo ''."\n"; echo '\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; end_page(); } ?> netmrg-0.20/www/webfiles/tests_sql.php0000664000076400007640000001152310361026461020274 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Name"), array("text" => "Host"), array("text" => "User"), array("text" => "Query") ); // end make_display_table(); $test_results = db_query("SELECT * FROM tests_sql ORDER BY name"); $test_total = db_num_rows($test_results); // For each test for ($test_count = 1; $test_count <= $test_total; ++$test_count) { $test_row = db_fetch_array($test_results); make_display_item("editfield".(($test_count-1)%2), array("checkboxname" => "test", "checkboxid" => $test_row['id']), array("text" => htmlspecialchars($test_row["name"])), array("text" => htmlspecialchars($test_row["host"])), array("text" => htmlspecialchars($test_row["user"])), array("text" => htmlspecialchars(paraphrase($test_row["query"],75))), array("text" => formatted_link("Edit", "{$_SERVER["PHP_SELF"]}?action=edit&test_id=" . $test_row["id"], "", "edit") . " " . formatted_link("Delete", "javascript:del('" . addslashes(htmlspecialchars($test_row["name"])) . "', '" . $test_row["id"] . "')", "", "delete")) ); // end make_display_item(); } // end tests make_checkbox_command("", 6, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked SQL tests?") ); // end make_checkbox_command make_status_line("SQL test", $test_count - 1); ?>
netmrg-0.20/www/webfiles/device_tree.php0000664000076400007640000004552710361026461020544 0ustar silfreedsilfreed
Device Tree
Group Device Sub-Device Monitors Events Status
0) ? ''. 'edit'. ''."\n" : ""; // draw +- and create link for group to expand/collapse if (in_array($grp_id, $_COOKIE["netmrgDevTree"]["group"])) { $img = get_image_by_name("hide"); $grp_action = "collapse"; } else { $img = get_image_by_name("show"); $grp_action = "expand"; } // end if this group is expanded // if > 0 associated items, display 'on' viewgraph if (GetNumAssocItems("group", $grp_id) > 0) { make_display_item("editfield".($rowcount%2), array("text" => '
'."\n". make_nbsp($depth * 4) . ''. 'expand/collapse' . " " . $grp_row["name"] ."\n". ''."\n". ''."\n". ''. 'View'."\n". ''."\n". ''. 'View'."\n". ''."\n". $editgroup. '
'."\n" ), array(), array(), array(), array(), array("text" => get_img_tag_from_status(get_group_status($grp_id))) ); // end make_display_item(); } // end if > 0 assoc items // else, display 'off' viewgraph else { make_display_item("editfield".($rowcount%2), array("text" => '
'."\n". make_nbsp($depth * 4) . ''. 'expand/collapse' . " " . $grp_row["name"] . ''."\n". ''."\n". ''. 'View'. ''."\n". ''. 'View'."\n". ''."\n". $editgroup. '
'."\n" ), array(), array(), array(), array(), array("text" => get_img_tag_from_status(get_group_status($grp_id))) ); // end make_display_item(); } // end if 0 assoc items $rowcount++; // if group is expanded, show the devices if (in_array($grp_id, $_COOKIE["netmrgDevTree"]["group"])) { $dev_results = db_query(" SELECT dev_parents.dev_id AS id, devices.name AS name, devices.status AS status FROM dev_parents LEFT JOIN devices ON dev_parents.dev_id=devices.id WHERE grp_id = '$grp_id' ORDER BY name"); // while we still have devices while ($dev_row = db_fetch_array($dev_results)) { $device_id = $dev_row["id"]; $device_action = ""; $editdevice = ($_SESSION["netmrgsess"]["permit"] > 0) ? ''. 'edit'. ''."\n" : ""; // draw +- and create link for device to expand/collapse if (in_array($device_id, $_COOKIE["netmrgDevTree"]["device"])) { $img = get_image_by_name("hide"); $device_action = "collapse"; } else { $img = get_image_by_name("show"); $device_action = "expand"; } // end if D tree // if > 0 associated items, display 'on' viewgraph if (GetNumAssocItems("device", $device_id) > 0) { make_display_item("editfield".($rowcount%2), array(), array("text" => '
'."\n". ''. 'expand/collapse' . " " . $dev_row["name"] . ''."\n". ''."\n". ''. 'View'. ''."\n". $editdevice. '
'."\n" ), array(), array(), array(), array("text" => get_img_tag_from_status($dev_row['status'])) ); // end make_display_item(); } // end if > 0 assoc items // else, display 'off' viewgraph else { make_display_item("editfield".($rowcount%2), array(), array("text" => '
'."\n". ''. 'expand/collapse' . " " . $dev_row["name"] . ''."\n". ''."\n". ''. 'View'. ''."\n". $editdevice. '
'."\n" ), array(), array(), array(), array("text" => get_img_tag_from_status($dev_row['status'])) ); // end make_display_item(); } // end if 0 assoc items $rowcount++; // if this device is expanded, show the subdevices if (in_array($device_id, $_COOKIE["netmrgDevTree"]["device"])) { $subdev_results = db_query(" SELECT id, name, status FROM sub_devices WHERE dev_id={$dev_row['id']} ORDER BY type, name"); while ($subdev_row = db_fetch_array($subdev_results)) { $subdev_id = $subdev_row["id"]; $subdev_action = ""; $editsubdevice = ($_SESSION["netmrgsess"]["permit"] > 0) ? ''. 'edit'. ''."\n" : ""; // draw +- and create link for monitor expand/collapse if (in_array($subdev_id, $_COOKIE["netmrgDevTree"]["subdevice"])) { $img = get_image_by_name("hide"); $subdev_action = "collapse"; } else { $img = get_image_by_name("show"); $subdev_action = "expand"; } // end if M tree // if > 0 associated items, display 'on' viewgraph if (GetNumAssocItems("subdevice", $subdev_id) > 0) { make_display_item("editfield".($rowcount%2), array(), array(), array("text" => '
'."\n". ''. 'expand/collapse' . " " . $subdev_row['name']. ''."\n". ''."\n". ''. 'View'. ''."\n". $editsubdevice. '
'."\n" ), array(), array(), array("text" => get_img_tag_from_status($subdev_row['status'])) ); // end make_display_item(); } // end if > 0 assoc items // else, display 'off' viewgraph else { make_display_item("editfield".($rowcount%2), array(), array(), array("text" => '
'."\n". ''. 'expand/collapse' . " " . $subdev_row['name']. ''."\n". ''."\n". ''. 'View'. ''."\n". $editsubdevice. '
'."\n" ), array(), array(), array("text" => get_img_tag_from_status($subdev_row['status'])) ); // end make_display_item(); } // end if 0 assoc items $rowcount++; // if this subdevice is expanded, show the monitors if (in_array($subdev_id, $_COOKIE["netmrgDevTree"]["subdevice"])) { $mon_results = db_query("SELECT id, status FROM monitors WHERE sub_dev_id={$subdev_row['id']}"); // while we have monitors while ($mon_row = db_fetch_array($mon_results)) { $mon_id = $mon_row["id"]; $monitor_action = ""; $editmonitor = ($_SESSION["netmrgsess"]["permit"] > 0) ? ''. 'edit'. ''."\n" : ""; // draw +- and create link for monitor expand/collapse if (in_array($mon_id, $_COOKIE["netmrgDevTree"]["monitor"])) { $img = get_image_by_name("hide"); $monitor_action = "collapse"; } else { $img = get_image_by_name("show"); $monitor_action = "expand"; } // end if M tree make_display_item("editfield".($rowcount%2), array(), array(), array(), array("text" => '
'."\n". ''. 'expand/collapse' . " " . get_short_monitor_name($mon_row["id"]). ''."\n". ''."\n". ''. 'View'. ''."\n". $editmonitor. '
'."\n" ), array(), array("text" => get_img_tag_from_status($mon_row['status'])) ); // end make_display_item(); $rowcount++; // if this monitor is expanded, show the events if (in_array($mon_id, $_COOKIE["netmrgDevTree"]["monitor"])) { $event_results = db_query("SELECT * FROM events WHERE mon_id=$mon_id"); $event_total = db_num_rows($event_results); // For each event for ($event_count = 1; $event_count <= $event_total; ++$event_count) { $event_row = db_fetch_array($event_results); $event_id = $event_row["id"]; $color = get_color_from_situation($event_row["situation"]); if ($event_row["last_status"] == 1) { $img = (""); } else { $img = (""); } // end if last status make_display_item("editfield".($rowcount%2), array(), array(), array(), array(), array("text" => $event_row["name"]), array("text" => $img) ); // end make_display_item(); $rowcount++; } // end event for } // end if monitor expanded }// end while each monitor } // end if sub-device expanded } // end while each sub-device } // end if device expanded } // end while each device // this is down here so each group's items show up with that group, // and not putting all the sub groups together before the devices draw_group($grp_id, $depth + 1, $rowcount); } // end if group expanded } // end while each group } // end draw_group() ?> netmrg-0.20/www/webfiles/index.php0000664000076400007640000000042007610702345017361 0ustar silfreedsilfreed netmrg-0.20/www/webfiles/view.php0000664000076400007640000005075710562237746017256 0ustar silfreedsilfreed $myr['object_type'] , "object_id" => $myr['object_id'] )); } } function ss_descendants($group) { $q = db_query("SELECT id FROM groups WHERE parent_id = $group ORDER BY name"); while ($r = db_fetch_array($q)) { ss_descendants($r['id']); } $q = db_query(" SELECT dev.id AS id, count(view.id) AS view_items FROM dev_parents dp LEFT JOIN devices dev ON dp.dev_id=dev.id LEFT JOIN view ON dev.id=view.object_id WHERE grp_id = $group AND object_type = 'device' AND dev.disabled = 0 GROUP BY dev.id ORDER BY dev.name"); while ($r = db_fetch_array($q)) { if ($r['view_items'] > 0) array_push($_SESSION["netmrgsess"]["slideshow"]["views"], array( "object_type" => "device" , "object_id" => $r['id'])); } } function do_slideshow() { if (isset($_REQUEST["type"])) { // we're just starting a slideshow, not in the middle of one. $_SESSION["netmrgsess"]["slideshow"]["views"] = array(); $_SESSION["netmrgsess"]["slideshow"]["current"] = 0; $_SESSION["netmrgsess"]["slideshow"]["type"] = $_REQUEST['type']; switch ($_REQUEST['type']) { case 0: ss_random_all(); break; case 1: ss_descendants($_REQUEST['group_id']); break; } header("Location: {$_SERVER['PHP_SELF']}?action=slideshow"); exit(0); } if (count($_SESSION["netmrgsess"]["slideshow"]["views"]) == 0) { $object_name = get_view_name(); if (!empty($object_name)) { $object_name .= ' - '; } // end if object name begin_page("view.php", $object_name."Slide Show"); echo("This slide show is empty."); end_page(); exit(0); } if (isset($_REQUEST['jump'])) { $_SESSION["netmrgsess"]["slideshow"]["current"] = $_REQUEST['jump']; } $GLOBALS["slideshow"] = true; $_REQUEST['action'] = "view"; $view = $_SESSION["netmrgsess"]["slideshow"]["views"][$_SESSION["netmrgsess"]["slideshow"]["current"]]; $_REQUEST['object_type'] = $view['object_type']; $_REQUEST['object_id'] = $view['object_id']; $GLOBALS["slide_show_formatted_link"] = cond_formatted_link($_SESSION["netmrgsess"]["slideshow"]["current"] > 0, "Previous Slide", "{$_SERVER['PHP_SELF']}?action=slideshow&jump=" . ($_SESSION["netmrgsess"]["slideshow"]["current"] - 1)); $_SESSION["netmrgsess"]["slideshow"]["current"]++; if ( count($_SESSION["netmrgsess"]["slideshow"]["views"]) == $_SESSION["netmrgsess"]["slideshow"]["current"]) { $_SESSION["netmrgsess"]["slideshow"]["current"] = 0; $GLOBALS["slide_show_formatted_link"] .= formatted_link("Restart Slideshow", "{$_SERVER['PHP_SELF']}?action=slideshow"); } else { $GLOBALS["slide_show_formatted_link"] .= formatted_link("Next Slide", "{$_SERVER['PHP_SELF']}?action=slideshow"); } ?> '."\n"; echo '
'."\n"; if (isset($_REQUEST['hist'])) $hist = "&hist={$_REQUEST['hist']}"; while ($row = db_fetch_array($view_result)) { switch ($row['type']) { case "graph": echo '
'."\n"; $local_graph_type = 'custom'; echo '
'.$row['title']."
\n"; echo '
' . "\n"; echo ' '."\n"; echo ' '."\n"; echo " \n"; echo '
' . "\n"; echo '
'."\n"; echo '
'."\n"; echo ' ' . "\n" . ' History' . "\n" . ' '."\n"; echo "
\n"; echo '
'."\n"; echo ' ' . "\n" . ' Dissect' . "\n" . ' ' . "\n"; echo "
\n"; echo '
'."\n"; echo ' ' . "\n" . ' Advanced' . "\n" . ' ' . "\n"; echo "
\n"; echo "
\n"; echo "
\n"; break; case "template": $nh_res = db_query("SELECT value FROM sub_dev_variables WHERE sub_dev_id={$row['subdev_id']} AND name='nexthop'"); $link = ""; if ($nh_row = db_fetch_array($nh_res)) // next hop located { $nhd_res = db_query("SELECT dev_id FROM sub_devices WHERE id = {$nh_row['value']}"); if ($nhd_row = db_fetch_array($nhd_res)) { $link = "Next Hop: " . get_dev_sub_device_name($nh_row['value']) . ""; } } echo '
'."\n"; $local_graph_type = 'template'; echo '
'.expand_parameters($row['title'], $row['subdev_id'])."
\n"; echo '
' . "\n"; echo ' '."\n"; echo ' '."\n"; echo " \n"; echo '
' . "\n"; echo '
'."\n"; echo '
'."\n"; echo ' ' . "\n" . ' History' . "\n" . ' '."\n"; echo "
\n"; echo '
'."\n"; echo ' ' . "\n" . ' Dissect' . "\n" . ' ' . "\n"; echo "
\n"; echo '
'."\n"; echo ' ' . "\n" . ' Advanced' . "\n" . ' ' . "\n"; echo "
\n"; if (!empty($link)) { echo '
'."\n"; echo ' ' . $link . "\n"; echo '
' . "\n"; } echo "
\n"; echo "
\n"; break; case "separator": echo '
' . $row["separator_text"] . '
'."\n"; break; } // end switch row type } // end while each row echo "
\n"; echo '
 
'."\n"; echo ''."\n"; $histnum = 0; foreach ($GLOBALS['TIMEFRAMES'] as $tf) { print(formatted_link($tf['name'], "{$_SERVER['PHP_SELF']}?action=view&object_type={$_REQUEST['object_type']}&object_id={$_REQUEST['object_id']}&hist=$histnum")); $histnum++; } print("
"); if ($_SESSION["netmrgsess"]["permit"] > 1) { print(formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=list&object_type={$_REQUEST['object_type']}&object_id={$_REQUEST['object_id']}")); } if ($GLOBALS["slideshow"]) { print($GLOBALS["slide_show_formatted_link"]); } } // end if view page else { js_confirm_dialog("del", "Do you want to remove ", " from this view?", "{$_SERVER['PHP_SELF']}?action=dodelete&object_type={$_REQUEST['object_type']}&object_id={$_REQUEST['object_id']}&id="); js_checkbox_utils(); ?>
" method="post" name="form"> checkbox_toolbar()), array("text" => "Item"), array("text" => "Type") ); // end make_display_table(); for ($i = 0; $i < $num; $i++) { $row = db_fetch_array($view_result); if ($i == 0) { $move_up = image_link_disabled("arrow_limit-up", "Move Top") . image_link_disabled("arrow-up", "Move Up"); } else { $move_up = image_link("arrow_limit-up", "Move Top", "{$_SERVER['PHP_SELF']}?action=move_top&object_id={$_REQUEST['object_id']}&object_type={$_REQUEST['object_type']}&id={$row['id']}") . image_link("arrow-up", "Move Up", "{$_SERVER['PHP_SELF']}?action=move_up&object_id={$_REQUEST['object_id']}&object_type={$_REQUEST['object_type']}&id={$row['id']}"); } if ($i == ($num - 1)) { $move_down = image_link_disabled("arrow-down", "Move Down") . image_link_disabled("arrow_limit-down", "Move Bottom"); } else { $move_down = image_link("arrow-down", "Move Down", "{$_SERVER['PHP_SELF']}?action=move_down&object_id={$_REQUEST['object_id']}&object_type={$_REQUEST['object_type']}&id={$row['id']}") . image_link("arrow_limit-down", "Move Bottom", "{$_SERVER['PHP_SELF']}?action=move_bottom&object_id={$_REQUEST['object_id']}&object_type={$_REQUEST['object_type']}&id={$row['id']}"); } switch ($row['type']) { case 'graph': $name = $row['title']; $extra_options = formatted_link("Edit Graph", "graph_items.php?graph_id={$row['graph_id']}"); $type = "Graph"; break; case 'template': $name = expand_parameters($row['title'], $row['subdev_id']); $extra_options = formatted_link("Edit Template", "graph_items.php?graph_id={$row['graph_id']}"); $type = "Template (" . $row['name'] . ")"; break; case 'separator': $name = "" . $row['separator_text'] . ""; $extra_options = ""; $type = "Separator"; break; default: $extra_options = ""; break; } // end switch ($row['type']) make_display_item("editfield".($i%2), array("checkboxname" => "viewitem", "checkboxid" => $row['id']), array("text" => $name), array("text" => $type), array("text" => $move_up . " " . $move_down . " " . formatted_link("Edit", "{$_SERVER['PHP_SELF']}?id={$row['id']}&action=edit", "", "edit") . " " . formatted_link("Delete","javascript:del('".str_replace('%', '', addslashes($name))."', '{$row['id']}')", "", "delete") . " " . $extra_options) ); // end make_display_item(); } // end for each row make_checkbox_command("", 5, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked items?"), array("text" => "Move Up", "action" => "move_up"), array("text" => "Move Down", "action" => "move_down") ); // end make_checkbox_command make_status_line("{$_REQUEST["type"]} item", $i); print("
"); print(formatted_link("Done Editing", "{$_SERVER['PHP_SELF']}?action=view&object_type={$_REQUEST['object_type']}&object_id={$_REQUEST['object_id']}")); } // end else edit view end_page(); } // end do_view(); function get_view_name() { $return_val = ''; $object_id = $_REQUEST["object_id"]; $object_type = $_REQUEST["object_type"]; switch ($object_type) { case 'group': $return_val .= db_fetch_cell('SELECT `name` FROM `groups` ' . 'WHERE id = ' . db_quote($object_id)); break; case 'device': $return_val .= db_fetch_cell('SELECT `name` FROM `devices` ' . 'WHERE id = ' . db_quote($object_id)); break; case 'subdevice': $return_val .= db_fetch_cell('SELECT `name` FROM `sub_devices` ' . 'WHERE id = ' . db_quote($object_id)); break; } // end switch object type return $return_val; } // end function get_view_name() ?> netmrg-0.20/www/webfiles/responses.php0000664000076400007640000001044610367515603020306 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Name"), array("text" => "Parameters") ); $res = db_query(" SELECT responses.id, notifications.name, responses.parameters FROM responses, notifications WHERE responses.notification_id=notifications.id AND event_id={$_REQUEST['event_id']} ORDER BY notifications.name, responses.parameters"); $rowcount = 0; while ($row = db_fetch_array($res)) { make_display_item("editfield".($rowcount%2), array("checkboxname" => "response", "checkboxid" => $row['id']), array("text" => $row['name']), array("text" => $row['parameters']), array("text" => formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&id={$row['id']}&tripid={$_REQUEST['tripid']}", "", "edit") . " " . formatted_link("Delete", "javascript:del('{$row['name']}','{$row['id']}')", "", "delete")) ); // end make_display_item(); $rowcount++; } make_checkbox_command("", 5, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked responses?") ); // end make_checkbox_command make_status_line("response", $rowcount); ?>
netmrg-0.20/www/webfiles/dev_props.php0000664000076400007640000001253710505536723020271 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Name"), array("text" => "Test") ); // end make_display_table(); $results = db_query("SELECT * FROM dev_props WHERE dev_type_id = {$_REQUEST['dev_type']}"); $prop_count = 0; while ($row = mysql_fetch_array($results)) { $test_name = get_short_test_name($row['test_type'], $row['test_id'], $row['test_params']); $prop_id = $row['id']; make_display_item("editfield".($prop_count%2), array("checkboxname" => "devprop", "checkboxid" => $row['id']), array("text" => $row['name']), array("text" => $test_name), array("text" => formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&prop_id=$prop_id&dev_type={$_REQUEST['dev_type']}&tripid={$_REQUEST['tripid']}", "", "edit") . " " . formatted_link("Delete","javascript:del('$java_name', '$prop_id')", "", "delete")) ); // end make_display_item(); $prop_count++; } // end for each monitor make_checkbox_command("", 5, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked properties?") ); // end make_checkbox_command make_status_line("property", $prop_count, "properties"); ?>
netmrg-0.20/www/webfiles/tests_snmp.php0000664000076400007640000001047710361026461020461 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Name"), array("text" => "OID") ); // end make_display_table(); $test_results = db_query("SELECT * FROM tests_snmp ORDER BY name"); $test_total = db_num_rows($test_results); // For each test for ($test_count = 1; $test_count <= $test_total; ++$test_count) { $test_row = db_fetch_array($test_results); make_display_item("editfield".(($test_count-1)%2), array("checkboxname" => "test", "checkboxid" => $test_row['id']), array("text" => htmlspecialchars($test_row["name"])), array("text" => htmlspecialchars($test_row["oid"])), array("text" => formatted_link("Edit", "{$_SERVER["PHP_SELF"]}?action=edit&test_id=" . $test_row["id"], "", "edit") . " " . formatted_link("Delete", "javascript:del('" . addslashes(htmlspecialchars($test_row["name"])) . "', '" . $test_row["id"] . "')", "", "delete")) ); // end make_display_item(); } // end tests make_checkbox_command("", 5, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked SNMP tests?") ); // end make_checkbox_command make_status_line("SNMP test", $test_count - 1); ?>
"Direct (Get)" , 1 => "Nth Item (Walk)" , 2 => "Count of Items (Walk)"), $test_row["type"]); make_edit_text("Item #:", "subitem", "3", "10", $test_row["subitem"]); make_edit_hidden("action","doedit"); make_edit_hidden("test_id",$_REQUEST["test_id"]); make_edit_submit_button(); make_edit_end(); end_page(); } // End editing screen ?> netmrg-0.20/www/webfiles/recache.php0000664000076400007640000000236710522144106017647 0ustar silfreedsilfreed netmrg-0.20/www/webfiles/conditions.php0000664000076400007640000001211510411253422020415 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Condition") ); // end make_display_table(); for ($i = 0; $i < $rows; $i++) { $row = db_fetch_array($query); $condition_name = $GLOBALS['VALUE_TYPES'][$row['value_type']] . " " . $GLOBALS['CONDITIONS'][$row['condition']] . " " . $row['value']; if ($i != 0) { $condition_name = $GLOBALS['LOGIC_CONDITIONS'][$row['logic_condition']] . " " . $condition_name; $nologic = ""; } else { $nologic = "&nologic=1"; } make_display_item("editfield".($i%2), array("checkboxname" => "condition", "checkboxid" => $row['id']), array("text" => $condition_name), array("text" => formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&id={$row['id']}&tripid={$_REQUEST['tripid']}$nologic", "", "edit") . " " . formatted_link("Delete", "javascript:del('" . $condition_name . "','" . $row['id'] . "')", "", "delete")) ); // end make_display_item(); } make_checkbox_command("", 4, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked conditions?") ); // end make_checkbox_command make_status_line("condition", $rows); ?>
netmrg-0.20/www/webfiles/color_dialog.php0000664000076400007640000004370607651373222020730 0ustar silfreedsilfreed Choose Color

netmrg-0.20/www/webfiles/dev_types.php0000664000076400007640000000602510376174022020261 0ustar silfreedsilfreed "Name", "href" => "{$_SERVER['PHP_SELF']}?orderby=name"), array("text" => "Comment", "href" => "{$_SERVER['PHP_SELF']}?orderby=comment") ); // end make_display_table(); if (!isset($_REQUEST["orderby"])) { $orderby = "name"; } else { $orderby = $_REQUEST["orderby"]; } // end if orderby $grp_results = db_query("SELECT * FROM dev_types ORDER BY $orderby"); $grp_total = db_num_rows($grp_results); # For each group for ($grp_count = 1; $grp_count <= $grp_total; ++$grp_count) { $row = db_fetch_array($grp_results); $id = $row["id"]; make_display_item("editfield".(($grp_count-1)%2), array("text" => $row["name"], "href" => "dev_props.php?dev_type=$id"), array("text" => $row["comment"]), array("text" => formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&id=$id") . " " . formatted_link("Delete", "javascript:del('" . addslashes($row["name"]) . "', '" . $row["id"] . "')")) ); // end make_display_item(); } // end foreach group ?> netmrg-0.20/www/webfiles/include/0000775000076400007640000000000011000016354017152 5ustar silfreedsilfreednetmrg-0.20/www/webfiles/include/onload.js0000664000076400007640000000104110374217573021003 0ustar silfreedsilfreed/** * add onload events * pulled from http://www.tek-tips.com/faqs.cfm?fid=4862 */ function addOnloadEvent(fnc){ if ( typeof window.addEventListener != "undefined" ) window.addEventListener( "load", fnc, false ); else if ( typeof window.attachEvent != "undefined" ) { window.attachEvent( "onload", fnc ); } else { if ( window.onload != null ) { var oldOnload = window.onload; window.onload = function ( e ) { oldOnload( e ); window[fnc](); }; } else { window.onload = fnc; } } } // end addOnloadEvent(); netmrg-0.20/www/webfiles/include/inputdefault.js0000664000076400007640000000310310374217573022234 0ustar silfreedsilfreedfunction set_defaults(parentid) { /* SHOULD RUN ON LOAD This function looks for a special attribute on input tags - default. If it finds this attribute inside an input field inside a given parentid, it loads the default attribute values for the current values, and then tries to style the box to make it look "grayed out". Finally, it sets an event to trigger the removal of the defaults onclick */ var x = document.getElementById(parentid); if (!x) return; var y = x.getElementsByTagName('input'); for (var i = 0; i < y.length; i++) { if (y[i].getAttribute('default') && y[i].getAttribute('type') == 'text' && y[i].value == '') { y[i].value = y[i].getAttribute('default'); y[i].style.color = '#808080'; y[i].style.backgroundColor = '#eeeeee'; y[i].onmouseover = remove_defaults; y[i].onmouseout = function () { if (!this.value) { this.value = this.getAttribute('default'); this.style.color = '#808080'; this.style.backgroundColor='#eeeeee'; } } } // end if correct input type } // end foreach input item } // end set_defaults(); function remove_defaults() { /* This function is family with the set_defaults() function, but does the opposite. It takes any input fields that had defaults applied to them, then returns them to normal by blanking out the value and resetting the bgcolor. */ if (this.getAttribute('type') == 'text' && this.value == this.getAttribute('default')) { this.value = ''; this.style.color = ''; this.style.backgroundColor = ''; } } function set_defaults_search() { set_defaults('search'); } addOnloadEvent(set_defaults_search); netmrg-0.20/www/webfiles/include/netmrg.css0000664000076400007640000001746210562237746021220 0ustar silfreedsilfreedA, A:visited { color : #0000B0; text-decoration: none; } A:hover, A:active { color : #FF8C00; text-decoration: underline; } BODY { background-color : #FFFFFF; color : #000000; font-family: sans-serif; font-size: 1em; margin : 0; padding : 0; } IMG { border : 0; } #header { background-color : #6699CC; /* background-image : url(../images/headerlogo.jpg); background-position : top-left; background-repeat : no-repeat; */ color : #000000; font-family : sans-serif; font-size : 1em; } #header h1 { font-family : sans-serif; font-weight : bold; font-size : 2em; letter-spacing : 0.2em; margin : 0; padding : 0; } #header h1 a, #header h1 a:visited { color : #000000; } #headerinfo { float : right; } #company { color : #000000; font-size : 1.2em; letter-spacing : 0.2em; } #company a, #company a:visited { color : #000000; } #company a:hover, #company a:active { color : #000080; } #logindata { font-size : 0.8em; } .loggedouttext { color : #E00000; } .loggedintext { color : #000000; } .loggedinuser { color : #008000; font-weight : bold; } #search { font-size : 0.8em; } #search input { border : 1px solid #E5E5E5; } #topmenu { color : #000000; font-family : sans-serif; font-size : 0.9em; font-weight : bold; letter-spacing : 0.2em; padding-left : 0.5em; border-bottom : 1px solid #305090; } #topmenu ul { margin : 0; padding : 0; } #topmenu ul li { background-color : #5080B0; list-style : none; margin-left : 1px; margin-right : 1px; border-top-left-radius : 1em; border-top-right-radius : 1em; -moz-border-radius-topleft : 1em; -moz-border-radius-topright : 1em; float : left; } #topmenu ul li a { color : #000080; display : block; padding-left : 1em; padding-right : 1em; } #topmenu ul li a:hover, #topmenu ul li a.navcurrent:hover { background-color : #AFC9E9; color : #8080B0; text-decoration : none; border-top-left-radius : 1em; border-top-right-radius : 1em; -moz-border-radius-topleft : 1em; -moz-border-radius-topright : 1em; } #topmenu ul li a.navcurrent { background-color : #A8C0E0; border-top-left-radius : 1em; border-top-right-radius : 1em; -moz-border-radius-topleft : 1em; -moz-border-radius-topright : 1em; } #secondmenu { background-color : #A8C0E0; color : #000000; font-family : sans-serif; font-size : 0.8em; font-weight : bold; letter-spacing : 0.2em; padding-left : 1em; margin-bottom : 0.5em; } #secondmenu ul { margin : 0; padding : 0; } #secondmenu ul li { background-color : #5080B0; list-style : none; margin-left : 1px; margin-right : 1px; border-bottom-left-radius : 1em; border-bottom-right-radius : 1em; -moz-border-radius-bottomleft : 1em; -moz-border-radius-bottomright : 1em; float : left; } #secondmenu ul li a { color : #000080; display : block; padding-left : 1em; padding-right : 1em; } #secondmenu ul li a:hover, #secondmenu ul li a.navcurrent:hover { background-color : #AFC9E9; color : #8080B0; border-bottom-left-radius : 1em; border-bottom-right-radius : 1em; -moz-border-radius-bottomleft : 1em; -moz-border-radius-bottomright : 1em; text-decoration : none; } #secondmenu ul li a.navcurrent { background-color : #90B0E0; border-bottom-left-radius : 1em; border-bottom-right-radius : 1em; -moz-border-radius-bottomleft : 1em; -moz-border-radius-bottomright : 1em; } #sidemenu { width: 125px; border-right: 1px solid #002000; border-left: 1px solid #002000; border-bottom: 1px solid #002000; float : right; } #sidemenu h2 { background-color : #AEC9E4; color : #000000; font-size : 0.9em; font-weight : bold; letter-spacing : 0.1em; margin : 0; padding : 1px; border-top : 1px solid #002000; border-bottom : 1px solid #002000; } #sidemenu ul { margin : 0; padding : 0; } #sidemenu ul li { background-color : #F5F8FB; color : #000000; font-size : 0.7em; padding-left : 1em; list-style : none; } #sidemenu ul li a, #sidemenu ul li a:visited { color : #000000; } #sidemenu ul li a:hover, #sidemenu ul li a:active { color : #FF8C00; } #content { clear : left; } #footer { text-align : center; } .about { text-align : center; } .editmainheader { background-color : #A8C0E0; color : black; font-family : sans-serif; font-size : 12px; font-weight : bold; padding : 0px; } .editheader { background-color : #000088; color : #E0E0E0; font-family : sans-serif; font-size : 12px; font-weight : bold; padding : 1px; border : 2px solid white; } .editsection { background-color : #DADADA; color : #404040; font-family : sans-serif; font-size : 12px; font-weight : bold; padding : 1px; border : 2px solid white; } .editheaderlink, A.editheaderlink, A:visited.editheaderlink { background-color : #000088; color : #E0E0E0; font-family : sans-serif; font-size : 12px; font-weight : bold; } .editfield0 { background-color : #CECECE; color : black; font-family : sans-serif; font-size : 12px; padding : 1px; border : 2px solid white; } A.editfield0, A:visited.editfield0 { background-color : #CECECE; color : #0000B0; font-family : sans-serif; font-size : 12px; padding : 0px; border : 0px; } .editfield1 { background-color : #E4E4E4; color : black; font-family : sans-serif; font-size : 12px; padding : 1px; border : 2px solid white; } A.editfield1, A:visited.editfield1 { background-color : #E4E4E4; color : #0000B0; font-family : sans-serif; font-size : 12px; padding : 0px; border : 0px; } .statusline { font-family : sans-serif; font-size : 12px; color : #000000; font-style : italic; } .customaddlink, A.customaddlink, A:visited.customaddlink { color : #FFFF00; font-family : sans-serif; font-size : 12px; font-weight : bold; } #viewdisplay { } .viewseparator { background-color : #D0D0D0; color : #505050; padding : 1px; text-align : left; border-top : 1px dashed #4040B0; border-bottom : 1px dashed #4040B0; clear: both; } .viewgraph { background-color : #F0F0F0; color : #D0D0D0; font-family : sans-serif; font-size : 0.5em; font-weight : bold; letter-spacing : 0.2em; padding : 5px; float: left; } .viewgraph-title { font-family : sans-serif; font-size : 12px; font-weight : bold; letter-spacing : 0.2em; float: left; } .viewgraph-image { margin: 5px; display: table; float: left; clear: left; } .viewgraph-controls { text-align: right; display: table; margin-top: 0.5em; float: left; -float: none; } .viewgraph-shortcut { } .disabled { color : #C0C0C0; } .error { color : red; } .error-text { color : red; } .result-text { color : #00D000; } .empty { font-family : sans-serif; font-size : 0px; } .update-text { color : #000000; font-size : 12px; } .update-list-version { background-color : #000088; color : #E0E0E0; font-family : sans-serif; font-size : 12px; font-weight : bold; padding : 1px; border-bottom : 1px solid #E5E5E5; } .update-list-version a { color : #E0E0E0; } .update-list-header { background-color : #DADADA; color : #404040; font-family : sans-serif; font-size : 12px; font-weight : bold; padding : 1px; border-bottom : 1px solid #E5E5E5; } .update-list-item { font-family : sans-serif; font-size : 12px; border-bottom : 1px solid #E5E5E5; padding : 1px; } .update-list-query { font-family : monospace; font-size : 12px; border-bottom : 1px solid #E5E5E5; padding : 1px; } .update-list-item-applied { background-color : #A0F0A0; } .update-list-item-notapplied { background-color : #E0E0E0; } .update-list-item-error { background-color : #F0A0A0; } /** SEARCH **/ .search-header { background-color : #E5E5E5; font-size : 0.9em; letter-spacing : 0.1em; padding-left : 2em; border-top : #20B0E5 1px solid; } .search-result { border-top : #E5C484 1px dashed; border-bottom : #E5C484 1px dashed; margin-top : 0.25em; margin-bottom : 0.25em; } .search-result h3 { font-size : 1em; margin : 0; padding : 0; } .search-group { color : #208444; } .search-parent { color : #204484; } .search-object { } netmrg-0.20/www/webfiles/include/select.js0000664000076400007640000000077110447321376021015 0ustar silfreedsilfreedfunction addOption(selectId,txt,val) { var objOption = new Option(txt,val); document.getElementById(selectId).options.add(objOption); } function clearSelect(selectId) { document.getElementById(selectId).options.length = 0; } function pickSelect(selectId, avalue) { for (var i = 0; i < document.getElementById(selectId).options.length; i++) { if (document.getElementById(selectId).options[i].value == avalue) { document.getElementById(selectId).selectedIndex = i; break; } } } netmrg-0.20/www/webfiles/include/xajax.js0000664000076400007640000002406410447321376020652 0ustar silfreedsilfreedfunction Xajax(){if(xajaxDebug)this.DebugMessage=function(text){alert("Xajax Debug:\n "+text)};this.workId='xajaxWork'+new Date().getTime();this.depth=0;this.getRequestObject=function(){if(xajaxDebug)this.DebugMessage("Initializing Request Object..");var req;try{req=new ActiveXObject("Msxml2.XMLHTTP");} catch(e){try{req=new ActiveXObject("Microsoft.XMLHTTP");} catch(e2){req=null;} } if(!req&&typeof XMLHttpRequest!="undefined") req=new XMLHttpRequest();if(xajaxDebug){if(!req)this.DebugMessage("Request Object Instantiation failed.");} return req;} this.$=function(sId){if(!sId){return null;} var returnObj=document.getElementById(sId);if(xajaxDebug&&!returnObj&&sId!=this.workId){this.DebugMessage("Element with the id \""+sId+"\" not found.");} return returnObj;} this.include=function(sFileName){var objHead=document.getElementsByTagName('head');var objScript=document.createElement('script');objScript.type='text/javascript';objScript.src=sFileName;objHead[0].appendChild(objScript);} this.addHandler=function(sElementId,sEvent,sFunctionName){if(window.addEventListener){eval("this.$('"+sElementId+"').addEventListener('"+sEvent+"',"+sFunctionName+",false);");} else{eval("this.$('"+sElementId+"').attachEvent('on"+sEvent+"',"+sFunctionName+",false);");} } this.removeHandler=function(sElementId,sEvent,sFunctionName){if(window.addEventListener){eval("this.$('"+sElementId+"').removeEventListener('"+sEvent+"',"+sFunctionName+",false);");} else{eval("this.$('"+sElementId+"').detachEvent('on"+sEvent+"',"+sFunctionName+",false);");} } this.create=function(sParentId,sTag,sId){var objParent=this.$(sParentId);objElement=document.createElement(sTag);objElement.setAttribute('id',sId);objParent.appendChild(objElement);} this.insert=function(sBeforeId,sTag,sId){var objSibling=this.$(sBeforeId);objElement=document.createElement(sTag);objElement.setAttribute('id',sId);objSibling.parentNode.insertBefore(objElement,objSibling);} this.getInput=function(sType,sName,sId){var Obj;if(sType=="radio"&&!window.addEventListener){Obj=document.createElement('');} else{Obj=document.createElement('input');Obj.setAttribute('type',sType);Obj.setAttribute('name',sName);Obj.setAttribute('id',sId);} return Obj;} this.createInput=function(sParentId,sType,sName,sId){var objParent=this.$(sParentId);var objElement=this.getInput(sType,sName,sId);objParent.appendChild(objElement);} this.insertInput=function(sBeforeId,sType,sName,sId){var objSibling=this.$(sBeforeId);var objElement=this.getInput(sType,sName,sId);objSibling.parentNode.insertBefore(objElement,objSibling);} this.remove=function(sId){objElement=this.$(sId);if(objElement.parentNode&&objElement.parentNode.removeChild){objElement.parentNode.removeChild(objElement);} } this.replace=function(sId,sAttribute,sSearch,sReplace){var bFunction=false;if(sAttribute=="innerHTML") sSearch=this.getBrowserHTML(sSearch);eval("var txt=document.getElementById('"+sId+"')."+sAttribute);if(typeof txt=="function"){txt=txt.toString();bFunction=true;} if(txt.indexOf(sSearch)>-1){var newTxt='';while(txt.indexOf(sSearch)>-1){x=txt.indexOf(sSearch)+sSearch.length+1;newTxt+=txt.substr(0,x).replace(sSearch,sReplace);txt=txt.substr(x,txt.length-x);} newTxt+=txt;if(bFunction){eval("newTxt ="+newTxt);eval('this.$("'+sId+'").'+sAttribute+'=newTxt;');} else if(this.willChange(sId,sAttribute,newTxt)){eval('this.$("'+sId+'").'+sAttribute+'=newTxt;');} } } this.getFormValues=function(frm){var objForm;var submitDisabledElements=false;if(arguments.length > 1&&arguments[1]==true) submitDisabledElements=true;if(typeof(frm)=="string") objForm=this.$(frm);else objForm=frm;var sXml="";if(objForm&&objForm.tagName=='FORM'){var formElements=objForm.elements;for(var i=0;i < formElements.length;i++){if(formElements[i].type&&(formElements[i].type=='radio'||formElements[i].type=='checkbox')&&formElements[i].checked==false) continue;if(formElements[i].disabled&&formElements[i].disabled==true&&submitDisabledElements==false)continue;var name=formElements[i].name;if(name){if(sXml!='') sXml+='&';if(formElements[i].type=='select-multiple'){for(var j=0;j < formElements[i].length;j++){if(formElements[i].options[j].selected==true)sXml+=name+"="+encodeURIComponent(formElements[i].options[j].value)+"&";} } else{sXml+=name+"="+encodeURIComponent(formElements[i].value);} } } } sXml+="";return sXml;} this.objectToXML=function(obj){var sXml="";for(i in obj){try{if(i=='constructor') continue;if(obj[i]&&typeof(obj[i])=='function') continue;var key=i;var value=obj[i];if(value&&typeof(value)=="object"&& (value.constructor==Array )&&this.depth <=50){this.depth++;value=this.objectToXML(value);this.depth--;} sXml+=""+key+""+value+"";} catch(e){if(xajaxDebug)this.DebugMessage(e);} } sXml+="";return sXml;} this.call=function(sFunction,aArgs,sRequestType){var i,r,postData;if(document.body&&xajaxWaitCursor) document.body.style.cursor='wait';if(xajaxStatusMessages==true)window.status='Sending Request...';if(xajaxDebug)this.DebugMessage("Starting xajax...");if(sRequestType==null){var xajaxRequestType=xajaxDefinedPost;} else{var xajaxRequestType=sRequestType;} var uri=xajaxRequestUri;var value;switch(xajaxRequestType){case xajaxDefinedGet:{var uriGet=uri.indexOf("?")==-1?"?xajax="+encodeURIComponent(sFunction):"&xajax="+encodeURIComponent(sFunction);if(aArgs){for(i=0;i");if(r.responseXML) xajax.processResponse(r.responseXML);else{alert("Error: the XML response that was returned from the server is invalid.");document.body.style.cursor='default';if(xajaxStatusMessages==true)window.status='Invalid XML response error';} } delete r;} if(xajaxDebug)this.DebugMessage("Calling "+sFunction+" uri="+uri+" (post:"+postData+")");r.send(postData);if(xajaxStatusMessages==true)window.status='Waiting for data...';delete r;return true;} this.getBrowserHTML=function(html){tmpXajax=this.$(this.workId);if(tmpXajax==null){tmpXajax=document.createElement("div");tmpXajax.setAttribute('id',this.workId);tmpXajax.style.display="none";tmpXajax.style.visibility="hidden";document.body.appendChild(tmpXajax);} tmpXajax.innerHTML=html;var browserHTML=tmpXajax.innerHTML;tmpXajax.innerHTML='';return browserHTML;} this.willChange=function(element,attribute,newData){if(!document.body){return true;} var oldData;if(attribute=="innerHTML"){newData=this.getBrowserHTML(newData);} eval("oldData=document.getElementById('"+element+"')."+attribute);if(newData!=oldData) return true;return false;} this.processResponse=function(xml){if(xajaxStatusMessages==true)window.status='Processing...';var tmpXajax=null;xml=xml.documentElement;if(xml==null){alert("Error: the XML response that was returned from the server cannot be processed.");document.body.style.cursor='default';if(xajaxStatusMessages==true)window.status='XML response processing error';return;} for(i=0;i 1){for(j=0;j $val) { delete_device($key, $_REQUEST["grp_id"]); } // end foreach group, delete } display(); break; case "doaddtogrp": doaddtogrp(); break; case "addtogrp": displayaddtogrp(); break; case "add": displayadd(); break; case "addnew": case "edit": displayedit(); break; case "duplicate": doduplicate(); break; } /***** FUNCTIONS *****/ function doedit() { if (!empty($_REQUEST["action"]) && $_REQUEST["action"] == "doedit") { if (!isset($_REQUEST["disabled"])) { $_REQUEST["disabled"] = 0; } if (!isset($_REQUEST["snmp_version"])) { $_REQUEST["snmp_version"] = 0; } if (!isset($_REQUEST["no_snmp_uptime_check"])) { $_REQUEST["no_snmp_uptime_check"] = 0; } if (!isset($_REQUEST["unknowns_on_snmp_restart"])) { $_REQUEST["unknowns_on_snmp_restart"] = 0; } if ($_REQUEST["dev_id"] == 0) { $db_cmd = "INSERT INTO"; $db_end = ""; $just_now_disabled = false; $dev_type_changed = false; } else { $db_cmd = "UPDATE"; $db_end = "WHERE id={$_REQUEST['dev_id']}"; $q = db_query("SELECT disabled, dev_type FROM devices WHERE id={$_REQUEST['dev_id']}"); $r = db_fetch_array($q); $just_now_disabled = (($r['disable'] == 0) && ($_REQUEST['disabled'] == 1)); $dev_type_changed = ($r['dev_type'] != $_REQUEST['dev_type']); } // end if dev_id = 0 or not db_update("$db_cmd devices SET name='{$_REQUEST['dev_name']}', ip='{$_REQUEST['dev_ip']}', snmp_read_community='{$_REQUEST['snmp_read_community']}', dev_type='{$_REQUEST['dev_type']}', snmp_recache_method='{$_REQUEST['snmp_recache_method']}', disabled='{$_REQUEST['disabled']}', snmp_version='{$_REQUEST['snmp_version']}', snmp_port='{$_REQUEST['snmp_port']}', snmp_timeout='{$_REQUEST['snmp_timeout']}', snmp_retries='{$_REQUEST['snmp_retries']}', no_snmp_uptime_check='{$_REQUEST['no_snmp_uptime_check']}', unknowns_on_snmp_restart='{$_REQUEST['unknowns_on_snmp_restart']}' $db_end"); if ($_REQUEST["dev_id"] == 0) { db_update("INSERT INTO dev_parents SET grp_id={$_REQUEST['grp_id']}, dev_id=" . db_insert_id()); } // end if dev+id = 0 if ($just_now_disabled) { db_update("UPDATE devices SET status=0 WHERE id = {$_REQUEST['dev_id']}"); db_update("UPDATE sub_devices SET status=0 WHERE dev_id = {$_REQUEST['dev_id']}"); $q = db_query("SELECT id FROM sub_devices WHERE dev_id = {$_REQUEST['dev_id']}"); while ($r2 = db_fetch_array($q)) { db_update("UPDATE monitors SET status=0 WHERE sub_dev_id = {$r2['id']}"); $q1 = db_query("SELECT id FROM monitors WHERE sub_dev_id = {$r2['id']}"); while ($r1 = db_fetch_array($q1)) { db_update("UPDATE events SET last_status=0 WHERE mon_id = {$r1['id']}"); } } } if ($dev_type_changed) { // the device type changed, so we need to migrate and/or clean up device properties $old_props_query = db_query("SELECT * FROM dev_props LEFT JOIN dev_prop_vals ON dev_props.id=dev_prop_vals.prop_id WHERE dev_type_id = {$r['dev_type']} AND dev_id = {$_REQUEST['dev_id']}"); while ($old_prop_row = db_fetch_array($old_props_query)) { $new_props_query = db_query("SELECT * FROM dev_props WHERE dev_type_id = {$_REQUEST['dev_type']} AND name = '{$old_prop_row['name']}'"); if ($new_prop_row = db_fetch_array($new_props_query)) { db_update("INSERT INTO dev_prop_vals SET dev_id={$_REQUEST['dev_id']}, prop_id={$new_prop_row['id']}, value='{$old_prop_row['value']}'"); } db_update("DELETE FROM dev_prop_vals WHERE dev_id={$_REQUEST['dev_id']} AND prop_id={$old_prop_row['prop_id']}"); } } } // done editing header("Location: grpdev_list.php?parent_id={$_REQUEST['grp_id']}&tripid={$_REQUEST['tripid']}"); exit(); } // end if we editing function doaddtogrp() { db_update("INSERT INTO dev_parents SET grp_id={$_REQUEST['grp_id']}, dev_id={$_REQUEST['dev_id']}"); header("Location: grpdev_list.php?parent_id={$_REQUEST['grp_id']}"); exit(); } // end if we're adding to a group function dodelete() { delete_device($_REQUEST["dev_id"], $_REQUEST["grp_id"]); header("Location: grpdev_list.php?parent_id={$_REQUEST['grp_id']}&tripid={$_REQUEST['tripid']}"); exit(); } // done deleting function doduplicate() { duplicate_device($_REQUEST['dev_id']); header("Location: grpdev_list.php?parent_id={$_REQUEST['grp_id']}&tripid={$_REQUEST['tripid']}"); exit(); } // done duplicating function displayadd() { begin_page("devices.php", "Add Device"); echo "\n"; echo 'Create a new device

'."\n"; echo 'Add an existing device to this group'."\n"; echo "
\n"; end_page(); } // end if add function displayaddtogrp() { begin_page("devices.php", "Add Device Group"); make_edit_table("Add Existing Device to a Group"); make_edit_select_from_table("Device:","dev_id","devices",-1); make_edit_hidden("action","doaddtogrp"); make_edit_hidden("grp_id",$_REQUEST["grp_id"]); make_edit_hidden("tripid",$_REQUEST["tripid"]); make_edit_submit_button(); make_edit_end(); end_page(); } // end if add to group function displayedit() { // Display editing screen begin_page("devices.php", "Edit Device"); if ($_REQUEST["action"] == "addnew") { $dev_id = 0; } else { $dev_id = $_REQUEST["dev_id"]; } // end if device id $dev_select = "SELECT * FROM devices WHERE id=$dev_id"; $dev_results = db_query($dev_select); $dev_row = db_fetch_array($dev_results); $dev_name = $dev_row["name"]; $dev_ip = $dev_row["ip"]; if ($_REQUEST["action"] == "addnew") { $dev_row["dev_type"] = ""; $dev_row["disabled"] = 0; $dev_row["snmp_version"] = 0; $dev_row["snmp_read_community"] = ""; $dev_row["snmp_recache_method"] = 3; $dev_row["snmp_port"] = 161; $dev_row["snmp_timeout"] = 1000000; $dev_row["snmp_retries"] = 3; $dev_row["no_snmp_uptime_check"] = 0; $dev_row["unknowns_on_snmp_restart"] = 1; } make_edit_table("Edit Device"); make_edit_group("General"); make_edit_text("Name:", "dev_name", "25", "100", $dev_name); make_edit_text("IP or Host Name:", "dev_ip", "25", "100", $dev_ip); make_edit_select_from_table("Device Type:", "dev_type", "dev_types", $dev_row["dev_type"]); make_edit_checkbox("Disabled (do not monitor this device)", "disabled", $dev_row["disabled"]); make_edit_group("SNMP"); make_edit_select_from_array("SNMP Support:", "snmp_version", $GLOBALS["SNMP_VERSIONS"], $dev_row["snmp_version"]); make_edit_text("SNMP Read Community:", "snmp_read_community", 50, 200, $dev_row["snmp_read_community"]); make_edit_select_from_array("Recaching Method:", "snmp_recache_method", $GLOBALS["RECACHE_METHODS"], $dev_row["snmp_recache_method"]); make_edit_group("Advanaced SNMP Options"); make_edit_checkbox("Disable SNMP Uptime Check", "no_snmp_uptime_check", $dev_row["no_snmp_uptime_check"] == 1); make_edit_checkbox("Unknowns on SNMP Restart", "unknowns_on_snmp_restart", $dev_row["unknowns_on_snmp_restart"] == 1); make_edit_text("SNMP UDP Port", "snmp_port", 5, 5, $dev_row["snmp_port"]); make_edit_text("SNMP Timeout (microseconds):", "snmp_timeout", 10, 20, $dev_row["snmp_timeout"]); make_edit_text("SNMP Retries:", "snmp_retries", 3, 10, $dev_row["snmp_retries"]); make_edit_hidden("dev_id", $dev_id); make_edit_hidden("action", "doedit"); make_edit_hidden("grp_id", $_REQUEST["grp_id"]); make_edit_hidden("tripid",$_REQUEST["tripid"]); make_edit_submit_button(); make_edit_end(); end_page(); } // end if edit function display() { header("Location: grpdev_list.php?parent_id={$_REQUEST['grp_id']}&tripid={$_REQUEST['tripid']}"); exit(); } // end display(); ?> netmrg-0.20/www/webfiles/tests_script.php0000664000076400007640000001056710361026461021010 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Name"), array("text" => "Command"), array("text" => "Data Type") ); // end make_display_table(); $test_results = db_query(" SELECT id, name, cmd, data_type FROM tests_script ORDER BY name "); // end test_results $test_total = db_num_rows($test_results); for ($test_count = 1; $test_count <= $test_total; ++$test_count) { $test_row = db_fetch_array($test_results); $test_id = $test_row["id"]; make_display_item("editfield".(($test_count-1)%2), array("checkboxname" => "test", "checkboxid" => $test_id), array("text" => htmlspecialchars($test_row["name"])), array("text" => htmlspecialchars($test_row["cmd"])), array("text" => $GLOBALS["SCRIPT_DATA_TYPES"][$test_row["data_type"]]), array("text" => formatted_link("Edit", "{$_SERVER["PHP_SELF"]}?action=edit&test_id=$test_id", "", "edit") . " " . formatted_link("Delete", "javascript:del('" . addslashes(htmlspecialchars($test_row["name"])) . "', '" . $test_row["id"] . "')", "", "delete")) ); // end make_display_item(); } // end tests make_checkbox_command("", 5, array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked Script tests?") ); // end make_checkbox_command make_status_line("script test", $test_count - 1); ?>
netmrg-0.20/www/webfiles/img/0000775000076400007640000000000011000016354016303 5ustar silfreedsilfreednetmrg-0.20/www/webfiles/img/status-yellow-nottriggered.png0000664000076400007640000000127410173042724024356 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ3.[¹ßŽIIDATxœ}“MKQ†ß{îÜ™¤Se(™ÆX‘ÄJ Bºr—PÛÒ?`6\·]÷\”n*bòJAŠq×E®Ôƒ¿⨠$wîÜÛ…&-E|Vgq8‡ó†8=Uê È"c"gŒ´‹I@×»Ìùør2¹z9ègƒâè¨0cLP!z0mYà< @Aës(Õ„Ö:c÷çS©o›CùZ¼X"›â)„˜‚”.‚ €çùpœ>”ÚGî µ‹Ï}Ýd×£îþâñt,6‹‹‹ªÕU4Ð:G:G>¿Ï»D¯÷a¸]çüÑsÖlξ%º÷1/àêj ++Ðí¶ð?®ë£TZÂÈÈz½uh¼#@-k–5…juõVºÝÖ×?Cˆ ,kƘ"1&rœ' ¥‹FcãVqÀîîwHé‚ÈcvŽŒ‘6CÐ:ºSÖ:B´AÙt}GÏóAÄ8¿×õo]×G¡ðJíA©C0ÆËÄùø²ÖzîÀó.Q*-!›}9\ˆ#›}………/ð¼ßr QÔªùË Ž_Ïý5!ž$lû„ÈÜ$¬ ÏKÝ$lRn! ·Û€=—LV6‡Ù>9y3cL¯ÂùÃiËš‘¢ŒQк¥E­:cñùd²ò7ÛÎÎJ£Z·JƘ"cvˆlÆiŒª1ÆËDþ²ï~Õ*ñEQŽÚIEND®B`‚netmrg-0.20/www/webfiles/img/status-green-triggered.png0000664000076400007640000000137010173042724023417 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ†¾…IDATxœ}“½OSQ‡çœ{{{ÛÒÜBAÊGkIÆë`"‰’BLº4°ëäbœ€€« YH\фŤØDÁ`K ­ÒOJ¿nï9ÇÁP1!<Ó;¼Ïòæy .0“ö9¢ÆuâLhD2Â<²Ü‘f²%KmÙZY¿žmœï“ó!– ;©{qPŽøÔÌ ±ƒK §¢Œ+‡ãN6UÅù÷Áƒ½®K… æ]·Ýô‡´ øÕ Ô…¯À`^˜²…¼uˆŒ¹‹ýöv¶`åckÁŸ{d&ísôPcó†v;rK¿ íÇF}©æ&8(¦ôi̹Pãl·>a§•Lxþž¢5>¨ GBÚ<´oJ¯PÅî8’ÍØ7¿â¹÷5ƵITx!Ògqªg§ŽÀ¯±Q_ýO¼H…°vú#j>u.êNPèQƒyá .¤š›—Šçl5?B§.ô²~؉3Ja±£Æ+àWÊU^‚Ø¡ÕC%d™K ó‚‚])S0ô)à° !Ê´#Íä©(Ô-LéÓWÊQý>LÙF•—`Êv’¶DcéÄÊ!obνƒy/ æEÜx‚\çÇVMQ_b£ÏûRЇ6ªùzÙ¸£.jÈ[G `¸£ÏàißK4D »­ÏȘßSU^|A`6_Süëa-â×&1¢† Sª¼„>e¦l#×9@º½ƒí/ÙëWlylk¯Ûö£L(ìa‹Cj âSGÑËúÿ¶ U^±•ÅïÎQªÌ‹óËc[ÿÚ>g6p8hOÜEÝ ;qF¢z$DÙ”ídSÔ—šâlå]à[÷«þ«‹Eѹ HIEND®B`‚netmrg-0.20/www/webfiles/img/green_led_off.gif0000664000076400007640000000160710173042724021566 0ustar silfreedsilfreedGIF89a÷„{{{½½½ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ùÿ,@dÿ  `Á À¡AþPh°âĈ @,( #F‚4> ¤Á œŒxÑâÃ-"DX€M’c†t9±${ªäH‘À”/'mø¢Dœ.=ÒìÙqãÀ€;netmrg-0.20/www/webfiles/img/unk_led_on.gif0000664000076400007640000000021110173042724021113 0ustar silfreedsilfreedGIF89a³€€€€€€€€€¿¿¿ÿÿÿÿÿÿÿÿÿÿÿÿ,>ðɹ^XÖm{æIØ]Zž#V…Çsˆä¿ —GE§é{_¢WåxEK I z’¯–M¥ M3’(vË•D;netmrg-0.20/www/webfiles/img/status-unknown-nottriggered.png0000664000076400007640000000140210173042724024533 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ2§fÇIDATxœ}“¿OaÇ¿ï½wçq-¥Ð–¦PNhÀ”¬©‹ÅÄÁ¸tiH˜œLœtstrspiª‘ÿ€h*$.„Š˜Æ*BèJ ¥WÑ+^ûÞ½¦Ãgz†ç“<ùæùœÀ?^P%‘$*Iv)$N)éåz³É×Ç<ýËäK•œÖhï“öˆÂ.—ÒĘáõP( À ×mìí3”*Vö°fÍ6´|GD ao]ŽNÈÁɰ„Ј§Ú‚^«Ã×ï†iÊØ-1|úÒÂf®Y®|³ævÖ‡ò¢¼ º\B*:!/]Tàu!ýb™ÕmX¥³3£X\˜†§¯”"ÈÞ7SöTñ²(‰$¡ ˆ±É° ¯û¾ÄAÕèä`YËo¶°±YÁÓ'ID#NTí˜aØ Á¡’¤‘~µòx’ƒªgÏßb,$aXáê’B—Bâ^…Sm!³ºý_±ÍëÌW8-ø<T•ÄJI¯¢z­Ëâ§Ê–ÅQ­Ö¡($‰ô œCg ðõ»A)9U¦” àwƒ1Û†.4›|M¯Û0M³3£§ÊׯŽÂlɨÕm˜&_Ç<½·Ï°[bX\˜†Ïëø¯èó:p÷ÎìÊ{ †a§iWß½-›ã¦r†üýN$nŸÃ÷£Ø-êàüÏ©7®áñ£[øy܃õ&rŸ[Ùšnß'pvª—ÏGå`4"c,$Ááh¡Z­#àwÃlÉØ)0äòMl|l–+ûÖ\63˜ï$ºP ÷{ijDcÚŸG€¢`Œ£V·QÞc(”YöðОÏfÿþv›á©¢Úí®n!©ª$.I¤×¶¡›&_3 ;m4øRî]°ÓªßljPݪµSIEND®B`‚netmrg-0.20/www/webfiles/img/status-red-nottriggered.png0000664000076400007640000000130610173042724023611 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ1²4tÚSIDATxœ“½OqÇ¿÷ÊqŽÄã(ăFˆ“1`Ÿ›vr•¡n »éäßabbâÂÿBœ5âKH``áM<ˆz¹„;¸ßý:´R›ÓÏü|ò¼3x…¡i!Â.+ËÆïÏçExÞ”:N•N&ejÛ¥Ø`ðüÏÌÅh4Ë*J…K$–¹Dl$F’@]Ô4Aú}n·é=>î|èõ®ç²f9U=á3UXY—JÁ< ‡ÇãNn£ÙÍ̓ww·ít®yCÓB¬¢TøLF771 pytãâbÞNl}kÅ"”…€çÕéùyeàykÜ÷pøŸNóy<«*~ìïcÔj½¬~­ÓSèÛÛƒAÐÑhÁ3Í;–•å—H€K¥pY*a6ã-¦ã1.Á¥Óà’I°ŠR`¿?ÇF"pá¯RßÂ8;ƒÃó`5 Œ,çXð¼ÈHž†ÃwÅF†F’ŸOdáySêºÇãÿ%+º¸.@È”¥ŽS¥¦ é÷Tß#¶±‰aà™&¨mWY:™”I¿Òé`­X„ ¾)Š¡>íí´Z ½¨e•YjÛ%Òí6ÝFŠãàóÁbùü?¿C!³z¤ÝnRË*10Ðõ,·¸x"ärª°º .†Ãó]‡Ä0 ­fõ:Ü««r{»¥Õj×óÛ&“Y&­ðKKËÜÇ¿Ö!I€ëÂ3M^¤Ýnz÷÷;Z­öç¶_èzˆ vYE)0²œƒÏ'‚)µí*µ¬2µ¬R´ÙœÕOË`E¾²æIEND®B`‚netmrg-0.20/www/webfiles/img/yellow_led_off.gif0000664000076400007640000000161110173042724021774 0ustar silfreedsilfreedGIF89a÷„{{{½½½ÿÿÿÿÿÿ€€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ùÿ,fÿ  `Áÿ$ÀpÀ€ƒ À ‡J|hÐ F‚;zÌ(±bA‡,r$àр˔'|éÒbÌ‚4a0IqfÍ‚** )rgÆ¡D- ÙhУ8 j2aTƒ ;netmrg-0.20/www/webfiles/img/hide.gif0000664000076400007640000000010010173042724017704 0ustar silfreedsilfreedGIF89a ‘ÿÿÿ7Bbÿÿÿ!ù, ”¡Æë^X;e–ñ¡/;netmrg-0.20/www/webfiles/img/red_led_on.gif0000664000076400007640000000163010173042724021076 0ustar silfreedsilfreedGIF89a÷€ÿ{{{½½½ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ùÿ,uÿ  `Áÿ,Àƒ 0Àà‡J|X@@Ç0ähpaÈŒ€”ØqáE“$  ḟsΜ gÅ“6kèó'Å•4{¦¬¨dIL›rôèÀ€¨RZ½š1bHŠ\»&TX2a@;netmrg-0.20/www/webfiles/img/status-unknown-triggered.png0000664000076400007640000000135710173042724024023 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ*­<ú1|IDATxœ}“MKQ†ß{ïL:N>h2‰¢Æ©„4Ø»h)ÅEéª ‚(tÛmíº¥».úºéBW.…"H‹L­%mÚ‚ó!óU˜ïÜÛEIjA|Vgq8¼¼‡àE]UÈ‚W'K}™aŒ¥DÃqd¶}&3[®Vóf»»OºÃ`¢hÚRRfTAØ`Ð4€s Ñ¨q”ªn®Vw—‹»f¡'&Šñpˆm$'=Ñ©¸ŠØ˜ Ÿ— ÕpPâøöã{y§\ýåÎï‰¢ÐtrÒ½{[CÄ X[·°µmÃuÆ€¹;V½0B Œ!Ê?9i1}8«¨ Y0‡”ÔT܃ˆAñòuÇuÑËÁu÷[ì}uðæUÉ„Ç5‘²,±@½:Y2£ bc ÖÖ­ÿÄ‹×Þ¾;ÅxLŨ© à§K´O#3aƒÁç%ØÚ¶/»l~èÀç#ˆºNf(c$¨i@«%àºWºp] Vw¡iªJ‚TJ48ÂcWËŒÎ%„@ƒ:ŽÌ6šÎßT¯âÞ¬ÛêMÛ–YÚ>“™ÊÇA‰ceÑ‹°A/ÃÅ“Ç~ì9ÊËÖzúSH<Ю‘Áþˆ‚Guü>8,sHù÷Ôûs^<¿Ž“S‰Ï6òßÏsõ†xFàÆôa|dHÙ¸™ôD“ Æc*|>‚ZÝÅ@„Áv€ý"G¾à`÷‹S®¹ó¹ÍáB¯Û±[¥x˜¥ÇL%5j*ˆšFÁ¹D½)P®pËÔý>ºðÓ%]'3ªJ‚B aÛ2kY"cµåjþc´÷UüË GÍ—¢IEND®B`‚netmrg-0.20/www/webfiles/img/status-red-triggered.png0000664000076400007640000000130410173042724023066 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ1>BœQIDATxœ}“½N"Q†ß9gf&À3»‰€bE$leAbÔkBjoà·¥†°ÐÂÊ„¨!‚†?Q6„,$ÌÀœs¶ ¢›lxêïI¾÷û‘ðwËŠ@QJD׋R0˜‡,«à|%<¯!–˪pÝÊÏñøÏg½´m;G £Fãñ#ƒD£4 Â÷!l4 :|:½ø1>oåwÛÎQÓ¼•³YSI§A“IH¡ølbš€ë‚õûðÛm¬_^&üííÜî÷ŸåwËŠèÉÙ¬©ƒ˜&Üz«‡€1€R¨…‚—— {{€,›«ÇÇÚ˜ó_2¥Dãñ#%1M̯¯!&“¯A0†ÕÝüfárJ&>™­çó!º^¤ñ8h2 ·^ÿWüŸL°¬T@S)ÐDÄ0ŠD ó$… mZÝÁêþR8 bYt=O ˪¤ià³Ù&ã.ŸN!i¨œ¯„ïo¦Jén™RË|`lE„ç5„ã® µPØéª''€ç;„ë6ˆX.«l4ë÷7ë0ÍÿŠÄ4¡_]u»`Ã!ÄbQ%Âu+l0èøí6Äl†p¹ õôô+¥PÏι¹˜Ï±nµÀz½ŽX,*Œc±Ýß¿UòySÉd@S)Há0øtºÉèy`Ý.Ö­ü§§ {}=·šÍçímÿN$r’m×äÃÃ#zp°Y‡¦¾î8`Ã!X¯×áV³ùuÛŸŒc±ˆ •ˆa%]Ï#PÁØJ¸nC,U±XTìNgûUmªUäIEND®B`‚netmrg-0.20/www/webfiles/img/red_led_off.gif0000664000076400007640000000161110173042724021233 0ustar silfreedsilfreedGIF89a÷„{{{½½½ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ùÿ,fÿ  `Áÿ$ÀpÀ€ƒ À ‡J|hÐ F‚;zÌ(±bA‡î,r$àÑË”'|éÒbÌ‚4a0IqfÍ‚** )rgÆ¡D- ÙhУ8 j2aTƒ ;netmrg-0.20/www/webfiles/img/access_denied.png0000664000076400007640000000267410167357434021617 0ustar silfreedsilfreed‰PNG  IHDR–21îµMbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÓ)ÉÓ–IIDATxœí›½nÛ:ÇÙ‹ ”£FRÎàQ“¤ÉΘÙÜ¢w¦ÚÏàt’ßÞèõf´=Ižª“éå('!Þß—­ ×:€çÁuûú*¾‹]·7™œ*‚ŸÏ@B®C¬Â¡ár¹¸»»à¿õWPTBž2,¦Sø¾ÜI~^!Ô–å±O\mYJÆgÖµ_ܯ³çsRÈ_ž™O¾„3â÷ësì¡‹¿6ŸW3Æú_Xì— „è=Y(†6!üÌ„•Ó)8â‰Ô ˆG)/ê„Bõ|.µAôð³ÀBèÍf·nÈ5Pt-”€±/fY¥£ˆ5cMóŒÿiÎ̽eó•Éôr4ðB~®þS):HßÃÞËØø³m¸JKÆKÝ~Bø4g~ÉÒeòû„¸bá(Rv"õ(EBgpE›‡÷ÐãØ¤ºΠźÄIU¬‚?Upk¯´¢÷ƒÕ<3q~bêBš!•)„!Ç}Ñw¸ ÓëõYt',œ€€€6›í~!¿ ŽþöC;дø÷7»oÜ´pÝ—þžµ´´ôªŒH$ÊHKKópôþîÜyhÜT®FLúÕuÀƒ«Îì<è[›;€òh`ìqÜp#ô—ÞÉÎÎ~àÃ`0²’““íÆÀ5 &Pߘl ¹ Üʈ Ð5W¡z{]k1@\\]f P!š¿†ÿ*7Ú¿k›1löQ°Î„¡X,–€ÇãÙ­æ}€E(ó€Gzàþ¯öNLê)pÀùx nÐ]êä‰,†Éòàmà\, kA{Ÿ¹SÛÉ …}‰jž {ÅppInŸ‘³™[Ç€ÖƒîAœi܈þq¾eíç7~€i™ár¹§(V1ÐwP}ØÆ'+‡n¹^‚Pϯ€˜‘X ’ˆ&9 2Ïù ®Ô5Djž”'2ÃápD+ã~°¾:^£/)®h›øÎOÁ‚U‰çL‚D¯%!¯ ÆOsOsûØOì‰eÒiuRMî.€b€@<ŸÂíK{a8wNÜœj?Y¦×É‚%> ìl¹K™¨z×ɋߨ =iXÍ{ÁÛ\Û¾ö»§`Äbqîg[6PÑ èˆçRøn9 ¾4œ^é…Ä@ ™èHòÆe™VùÏè#!AÝuÆÁ²Ã¿8ÀX­ÖMŸ¼§@m‚7J¤,x=ƒÍ.g!ˆmO h {ßfaÓ¾Õ¾ZæÏçä‰[HÇ÷Ñ,¬­? €Ì„ñær¹‹8¼)€ç9ýPæ³éØ#f“"Ø#fÁgÊa°r!…­K™úÐÆg€éìÚÀaL>UòÞdbXý”JeCC¡P¸¥¨¨Èú´—Á™n‹Sÿè8!V›½œY7FpjdÚ'⼑4ë­duõ(y§r”BÈþýûïðšÉÂ`³Ù[ׯ_ïbN“J[Âpê÷š²L_Dx ¼Ï í£Éìê·^£ãÂ*/tm•JÕ'¿¹èƒ!´°°ׯ_‡Íf{“[ûб-„9aGͧ#G`·)Ê¡cppmmm7ÅS:®Çã5VWWûíÛ·ÏO©T²(Š¢ñù|0γáNËýèðó Ãσ†\!"ßé;üرcÚâââ,Ƨv–™˜˜øsLLLojjªùäÉ“D«Õ>çÛÓµ222êŸ{† ¸III±±±-kÖ¬)**"½½½³"ñññ?Î f†Xr¹|«T*ýC&“ X›››Ÿ æðáæÀÀÀås3U4‰D²Z&“•ÅÇÇ÷äçç›ëêêˆÍfs “’’òÏ\ƒ8(888L&“’J¥m¹¹¹†‹/³Ù< D£Ñ¸¸¸ /f†ü¤Réθ¸¸úM›6©KJJlƒ=zÔ&‰6º œÛ¿.ŋ޽½³ÕjuhGGÇRWÿH¶æ¨—/=IEND®B`‚netmrg-0.20/www/webfiles/img/show.gif0000664000076400007640000000010310173042724017756 0ustar silfreedsilfreedGIF89a ‘ÿÿÿ7Bbÿÿÿ!ù, ”¡¶°œ‚Ê{›xqÏÎtR;netmrg-0.20/www/webfiles/img/blue_led_off.gif0000664000076400007640000000161110173042724021410 0ustar silfreedsilfreedGIF89a÷„{{{½½½ÿÿÿÿÿÿ€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ùÿ,fÿ  `Áÿ$ÀpÀ€ƒ À ‡J|hÐ F‚;zÌ(±bA‡,r$àр˔'|éÒbÌ‚4a0IqfÍ‚** )rgÆ¡D- ÙhУ8 j2aTƒ ;netmrg-0.20/www/webfiles/img/colortable.gif0000664000076400007640000001725310173042724021142 0ustar silfreedsilfreedGIF87a!C÷ÿÿÿÿÿÌÿÿ™ÿÿfÿÿ3ÿÿÿÌÿÿÌÌÿÌ™ÿÌfÿÌ3ÿÌÿ™ÿÿ™Ìÿ™™ÿ™fÿ™3ÿ™ÿfÿÿfÌÿf™ÿffÿf3ÿfÿ3ÿÿ3Ìÿ3™ÿ3fÿ33ÿ3ÿÿÿÌÿ™ÿfÿ3ÿÌÿÿÌÿÌÌÿ™ÌÿfÌÿ3ÌÿÌÌÿÌÌÌÌÌ™ÌÌfÌÌ3ÌÌÌ™ÿÌ™ÌÌ™™Ì™fÌ™3Ì™ÌfÿÌfÌÌf™ÌffÌf3ÌfÌ3ÿÌ3ÌÌ3™Ì3fÌ33Ì3ÌÿÌÌÌ™ÌfÌ3Ì™ÿÿ™ÿÌ™ÿ™™ÿf™ÿ3™ÿ™Ìÿ™Ì̙̙™Ìf™Ì3™Ì™™ÿ™™Ì™™™™™f™™3™™™fÿ™fÌ™f™™ff™f3™f™3ÿ™3Ì™3™™3f™33™3™ÿ™Ì™™™f™3™fÿÿfÿÌfÿ™fÿffÿ3fÿfÌÿfÌÌfÌ™fÌffÌ3fÌf™ÿf™Ìf™™f™ff™3f™ffÿffÌff™fffff3fff3ÿf3Ìf3™f3ff33f3fÿfÌf™fff3f3ÿÿ3ÿÌ3ÿ™3ÿf3ÿ33ÿ3Ìÿ3ÌÌ3Ì™3Ìf3Ì33Ì3™ÿ3™Ì3™™3™f3™33™3fÿ3fÌ3f™3ff3f33f33ÿ33Ì33™33f333333ÿ3Ì3™3f333ÿÿÿÌÿ™ÿfÿ3ÿÌÿÌÌÌ™ÌfÌ3Ì™ÿ™Ì™™™f™3™fÿfÌf™fff3f3ÿ3Ì3™3f333ÿÌ™f3,!Cÿ¯ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹siܘë® q]»E²ä­k¶Rª´u­–Ë—µ®ÑšI“ÖµJ8sVºF©§OJ×& :隤£H%]‹Ä´i¤k¢J…t-ŽÕ«q®ÁÙÊε7`þ¹æ¦¬Y7×Ú¨]Ûæ›·pÙ\kB·n“kLòêerm‰ß¿K®)LXɵ$ˆ'¹†¤±c$×RHžœâŠË˜Q\;Á¹ó‰k&B‹6q­„éÓ%®‘X͚ĵ°c¸F ¶m×èÞ=àš€ßÀ\ @¼x€k’+ ãF!?Ž4IåÊ”-aº”YsæM8yþÿ씨P£I.uÊêÔ¨U±ZÕÚuëW±`Éž-›–­Z·q½5—]táµW^}æ—`… v˜bˆ1öXc‘Q&™e™]¶™gœ6Zh¥¡fšj­­öšl°Ñv[m¹ñ¦›oÁý6œqÄ!·\rÍ9×QtÒQWÝuØi·]wÞÞxä™w^zê±×Þ{ðÉ7_}öá—ß~üù÷_€Xà*¸`ƒBá„Zxa†rØá‡ Š8b‰&¢˜âŠ,ºøbŒ2ÒXã8^£ãŽ¡„Vÿh!†nÈ¡‡†("‰%žˆ¢Š+¶è"Œ1ÎH£7æètÑj¢+) £59ª¤?IJ¥IYê¦SiЧ]y*¨g‰Ê©q™jª{© «…¹ª¬ÉJ­™Ùꮣ銯­ù*°· ˱Ák²Ë)˳!9[´*Iûµ4Y›¶>i;·HyÛ¸R‰{¹\™ºf©»»p¹[¼zÉû½„Ù›¾Žé;¿˜ùÛÀ¢ |Á¬¶)¼ÃÀ9\ÄÊIü"ùx, ‘6¹’@)Y“J9ù”TI™•^Y9–hiÙ—ryÿy˜|‰™†™¹š©Y›š¹ùœ¤É™®Ù9ž¸éÙŸÂùy Ì ª#Å Yü#I¤ÇG")ò’Lšü$”*OI¥ËWb)ó–\Úü%˜:I¦Ïg¢)ôšlý&œJÏI§Ówâ)õž|Zý' ZkDz>b¤i$ÈI*Ir“N¢¥”,Wi%ÌYjIs—^⦘<—i&ÐiªIt›nBZœäÄ´:Ù jyÒÕúä'¬jPÛëZ÷À–º±­ÎläK›ùØ&»·ÑNní«Ûûð¶»½õÎoö þG¼ÃOqÿk\!×¼É=ÏrÌœ9g½Ïa#@ ¢ÿ‡HÄ"ñˆH,È/–ÈÄ_\ÃPŒ¢/®Ñ‹*Z±×à…·È‹kìâ‹`ÜÅ5tAÆ2êâ›H£7q M¸ñš¸F&æHÇL\xÌ#&®q‰>úñ×°„ i‰kÜሼÃ5ìÀÈFÚáuˆ¤$ëp :Xò’t¸Æ6ÉÉ9\C  ¥®1…Ršr ׂ*W)…kDá•°ŒÂ5 @ËZBáOÈ¥.Ÿp 'øò—N¸Æ †IÌ\ÃÈL¦ ®Ñ‚f:³×`4§É‚k¬àšØ\Á5TÀÍnªà §8p ˜óœ ¸FÖÉÎ\ðŒ'®q€zÚó×0€>÷iÿ4‘‰O”"©xÅ*f‘‹Zôb¿8F3’kLcáèF9ÖqŽwÔ#ùøÇ>’‚4d"¹HG2’“Œd%1iIMvr“Ÿ%(IyÊR¦’•ªte,_9K[Ò—»Ìe/éKas˜ÇT&2™ùÌfF“šÒ´f6¯¹Morœã g9ÑiNu¶sï”'<éyÏz擟úôç?(ÐÔ MèBêЇFT¢­èE1ªÑvÔ£ éHIjÒ“¦T¥,méKa*Ó™ÖÔ¦8ÍéNyêÓŸU¨D-êQ‘ªÔ¥6Õ©PêT©jÕ«fU«\íêWÁ*Ö±–Õ¬hMë5ÖÊÖ¶ÿ´ E¨BÚP‡B4¢¥¨E/šQr´£©HGZR“¢4¥+e©K_S™Ò´¦7Å©NwÚSŸ5¨C%ªQšT¥2µ©O…ªT§ZU«b5«[åªW¿V±’µ¬gE«ZÿPÞöйåânÃØ[3þvÁ…ãpëX\=÷É%ärÙ\G>w’ÑÅät;Y]Q^÷”ÙeåvcÙ][~w—áæx‹Y^ež÷™é¥æz³Ù^o¾wœñEç|ÛY_yÞ÷žùåç~›Ø_)þ׊Þâ€ÁXà2X ~ã‚éØà<>Øä„YáF^X’¾ä†9ÙáP~Ø”!^åˆaYâZžXÿ—)þ劉Ùâd¾Ø™1žæŒ±YãnÞXœ9>çŽÙÙãxþØžAÞçÚÖ)¾‹qíâ\ÅX×3Þ•yã^íØ×=þ-ä`YØG–’‰Íäb=ÙØQ>•‘mådeYÙ[^–—™ æfÙÙe~š¡­æhµYÚož–œ©MçjÝÙÚy¾Ÿ±íçl×Zä(®q]2]ëúd¼æuÊ|íë•Ø-¶°_FlbÇÌØÆž²‘]3e+ûfÌfvΜíìAÚ=“¶´FmjÍÚÖ¶±]ô«íÖ·&Y®sm²]ïe½îµÊ~ýk–;Ø.ö°aVìbËìØÇ¦Y²“ÿm³e/gÍn¶ÎžýlžE;Ú>›ö´Víj íÚ×&Z¶´e¸£imSšÛ—®¸¦/ÞéqƒºÜ£ö¸©Ažjv³Úݯ>¹¬S^ëzãúÞ»†¹¯elàÇι²wÞìƒC;áIŒ»ÜçN÷ºÛ݈ÅȻދq bøýïĸÆ0Oøa\CˆO¼0®ŒÆ;>׆ä'Œk„âò˜Å5@Áù΃⟽è?q O˜þôž¸F'VÏúN\ƒ°='®Ñ‡ÚÛ¾×àƒîwχkìá÷ÀßÃ5ô@üâëáyH¾òóp <8ÿùx¸F¦Oý,\ ØÏ>®q…î{ÿ ×°‚ÿøÇo…kTáüè¯Â5¨ÀþöSá5ˆ¿ükp Øÿþ4¸Æ öÏÿ\C€2p 1P€× ¸€0p ð€×Xp ø×àøp 0‚$Ø×À(˜‚ {§w}x~'x…7x‡§xˆÇx×x‘Gy’gy™wy›çyœz£z¥‡z¦§z­·z¯'{°G{·W{¹Ç{ºç{Á÷{Ãg|ć|Ë—|Í}Î'}Õ7}×§}ØÇ}ß×}áG~âg~éw~ëç~ìóõ‡ö§ý·ÿ'€H€X€ È€ è€ø€hˆ˜ÿ‚(‚%8‚'¨‚(È‚-Èw0ƒ3Hƒ6xƒ9¨ƒ<؃?„B8„Eh„H˜„KÈ„Nø„Q(…TX…Wˆ…Z¸…]è…`†cH†fx†i¨†l؆o‡r8‡uh‡x˜‡{ȇ~ø‡(ˆ„Xˆ‡ˆˆŠ¸ˆèˆ‰“H‰–x‰×‰š¸‰28ƒ5hƒ8˜ƒ;ȃ>øƒA(„DX„Gˆ„J¸„Mè„P…SH…Vx…Y¨…\Ø…_†b8†eh†h˜†kȆnø†q(‡tX‡wˆ‡z¸‡}臀ˆƒHˆ†xˆ‰¨ˆŒØˆ‰’8‰•h‰˜Ø‚/ƒåXxç¨xéøxëHyí˜yïèyñÿ8zóˆzõØz÷({ùx{ûÈ{ý|ÿh|¹| }Y}©} ù} I~ ™~é~9‰Ù)€y€É€i!¹# ‚%Y‚'©‚)¹w+ x-Ix/™x1éx39y5‰y7Ùy9)z;yz=Éz?{Ai{C¹{E |GY|I©|Kù|MI}O™}Qé}S9~U‰~WÙ~Y)[y]É_€ai€c¹€e gYi©kùmI‚o™‚qé‚›xhxŸ¸x¡y£Xy¥¨y§øy©Hz«˜z­èz¯8{±ˆ{³Ø{µ(|·x|¹È|»}½h}¿¸}Á~ÃÿX~Ũ~Çø~ÉH˘ÍèÏ8€Ñˆ€ÓØ€Õ(×xÙÈÛ‚Ýh‚߸‚ᘉsùwu鉟˜—¢8Š}iЧ˜ª¸Š…銯˜˜²8‹i‹·™º¸‹•é‹¿˜™Â8ŒiŒÇšÊ¸Œ¥éŒÏ˜šÒ8­i×›Ú¸µéߘ›y7 œØ‰w Š¡¸—¤XЉЩ8˜¬ØŠ‡ ‹±¸˜´X‹‰‹¹8™¼Ø‹— ŒÁ¸™ÄXŒŸ‰ŒÉ8šÌØŒ§ ѸšÔX¯‰Ù8›ÜØ· Žâ¨£¼É£¿‰ Â© Å9¤ÈY¤Ë¡Î9¡ÑɤÔé¤×©¡ÚÉ¡ÝY¥ày¥ã9¢æÿY¢éé¥ì ¦ïÉ¢òé¢õy¦ø™¦ûY£þy£w÷© ª¢:ªD´ ¦zªËp ʰª¬ª × °«Ép ÈP«¶Š ×p ºº«Çp Æð«Àj ×p ÄZ¬§p ¦¬Êj ×P Îú¬¥p ¤0­ÔJ ×0 Øš­£p ¢Ð­Þ* ×0â:®ƒp ‚p®è*×ìÚ®p €¯ò ×ðöz¯p ~°¯üê×ð°_p ^P°ë×Ð »°]p \ð°Ë×°[±[p Z±«×°û±;p :0²$«×(›²9p 8в.‹×p2;³7p 6ÿp³8k×p<Û³p ´Bk×PF{´p °´LK×0Pµp PµV+ª§ªª­ºª¯*«°J«·Z«¹Ê«ºê«Áú«Ãj¬ÄŠ¬Ëš¬Í ­Î*­Õ:­×ª­ØÊ­ßÚ­áJ®âj®éz®ëê®ì ¯ó¯õНöª¯ýº¯ÿ*°K°[° ˰ ë°û°k±‹±›± ²+²%;²'«²(˲/Û²1K³2k³9{³;ë³< ´C´E‹´F«´M»´O+µPKµW[µY«µ©Úµ^ ¶a;¶dk¶g›¶j˶mû¶p+·s[·v‹·y»·|ë·¸‚ÿK¸…{¸ˆ«¸‹Û¸Ž ¹‘;¹”k¹—›¹šË¹û¹ +º£[º¦‹º©»º¬ëº¯»²K»µ{»¸«»»Û»¾ ¼Á;¼Ä{ Æ{¼Èûµ`+¶c[¶f‹¶i»¶lë¶o·rK·u{·x«·{Û·~ ¸;¸„k¸‡›¸ŠË¸û¸+¹“[¹–‹¹™»¹œë¹Ÿº¢Kº¥{º¨«º«Ûº® »±;»´k»·›»ºË»½û»À+¼Ã[¼Z˵]+Á²JÁ·jÁ¼ŠÁÁªÁÆÊÁËêÁÐ ÂÕ*ÂÚJÂßjÂäŠÂéªÂîÊÂóêÂø Ãý*ÃKÃkà ‹Ã«ÃËÃëà Ä%+Ä*ÿKÄ/kÄ4‹Ä9«Ä>ËÄCëÄH ÅM+ÅRKÅWkŨŠÅ­ªÅ±ÊŶêÅ» ÆÀ*ÆÅJÆÊjÆÏŠÆÔªÆÙÊÆÞêÆã Çè*ÇíJÇòjÇ÷ŠÇüªÇËÇëÇ È+ÈKÈkÈ‹È$«È)ËÈ.ëÈ3 É8+É=KÉBkÉG‹ÉL«ÉQËÉVëÉ[‹¼®ª¼³Ê¼¸ê¼½ ½Â*½ÇJ½Ìj½ÑŠ½Öª½Ûʽàê½å ¾ê*¾ïJ¾ôj¾ùоþª¾˾ë¾ ¿+¿K¿k¿!‹¿&«¿+Ë¿0ë¿5 À:+À?KÀDkÀI‹ÀN«ÀSËÀXëÀÆ Ê¬*ÊË˼¦ÿü¼Ð«ÊÓK½®|½Ø+ËÛ˽¶ü½à«ËãK¾¾|¾è+Ìë˾Æü¾ð«ÌóK¿Î|¿ø+ÍûË¿Öü¿¬ÍLÀÞ|À,Î ÌÀælª0¼ÊKÊÍ뼨½ÒËÊÕk½°œ½ÚKËÝ뽸¾âËËåk¾Àœ¾êKÌíë¾È¿òËÌõk¿Ðœ¿úKÍýë¿ØÀÌÍlÀàœÀ LÎ üÀgÎiÍÎ5ýÎ7-Ïp]ÏrÏ>½Ï@íÏyÐ{MÐG}ÐI­Ð‚ÝЄ ÑP=ÑRmÑ‹ÑÍÑYýÑ[-Ò”]Ò–Òb½ÒdMªÌÝÜÎýÜ¢ Ò=ÝÑp ÐpÝØ ×ð ÜÝÝÏÿp ÎÞâí ×Ð æ}ÞÍp ̰ÞìÍ ×Ð ðß­p ¬PßöÍ ×° ú½ß«p ªðß® × ^à©p ¨à Ž ×þà‰p ˆ0áŽ×pžá‡p †Ðán×P">â…p „pâ(N×P,Þâep dã2N×06~ãcp b°ã<.×@äap `PäF×J¾äAp @ðäP×ðT^å?p >åZî×Ð^þå=p <0ædÎ×Ðhžæp ÐænÎ×°r>çp pçx®×|Þçp 肎AÝÓmÝÙÿ}ÝÛíÝÜ ÞãÞåÞæ­Þí½Þï-ßðMß÷]ßùÍßúíßþßnàŽà žà á.á>á®áÎáÞá!Nâ"nâ)~â+îâ,ã3ã5Žã6®ã=¾ã?.ä@NäG^äIÎäJîäQþäSnåTŽå[žå]æ^.æe>æg®æhÎæoÞæqNçrnçy~ç{îç|èƒè…nèÕèŠÎèþè.é“^閎陾éœîéŸê¢Nê¥~ꨮê«Þê®ë±>ë´në·žëºÎë½þëÀ.ìÃ^ìÆŽìɾìÌîìÏíÒNíÕ~íØ®íÛÞíÞîá>îänîçÿžîêÎîíþîð~ ò>ïô¾èŒîèé’Né•~阮é›Þéžê¡>ê¤nê§žêªÎê­þê°.ë³^ë¶Žë¹¾ë¼îë¿ìÂNìÅ~ìÈ®ìËÞìÎíÑ>íÔníמíÚÎíÝþíà.îã^îæŽîé¾îìîîïè‰îóÞ ôã-ôèMôímôòô÷­ôüÍôîôõ .õNõnõŽõ®õ$Îõ)îõ.ö3.ö8Nö=nöBŽöG®öLÎöQîöV÷[.÷`N÷en÷jŽ÷o®÷tÎ÷yî÷~øƒ.øÔMøÙmøÝøâ­øçÍøìíøñ ùö-ùûMùÿnùŽù ®ùÎùîùú.ú#Nú(nú-Žú2®ú7Îú<îúAûF.ûKNûP×~ $øãš„ }\ëÑÐak<$Näq­ÃEŒ®qàØ‘Ãµ !En¸¦ÁäI ×2¬d™á˜11\»ÍæÍh× íä íÚ3 AŸ]sVÔ¨³kÍ”.mvÙS¨Ì®µ¢ZµÕ5VYµ²º¶Êë×U×T%«êZ*´iS]CÕÖ-ªk‰äÎMt Ñ]¼ˆ®âÛ÷Ð5CºVÈðáB×-fLèZÈ‘Ë\#SÙ2™kc4osMÌgÐb®…!]:Ì50©Uƒ¹Äõë ׀̦ D`ÿÁ"dø°aDŠ-f¼¸Ñ#G#C–DiReË•/e¤‰ó¦Îž; JôhѤL•:útªUªX·fí ֫زcϪEËömÛ¸tåÚÍ{w¯_¾,°Â3L±Æ{L2È(»¬²Ì8Ó̳Ð>Í4ÒP[-µÖ`sM¶Úf» 7ÝvëÍ7à‚Ž8ãŽKN9æš{:馫κœ²ÓŽ»î¾O¼ñÊ3½ôÖcϽ÷⓾úîÃO¿ýúóÀ$ÐÀTÁ„P +´à 7äÐÃC·ÜvãÍ·ß‚ޏâŽCN¹åšsºè¦£®&±Ën;î¼û.<ñÈ+ÿï<ôÔ[¯=÷à‹o>úì»/?ýøëï?°@LpA|0B )¬ðB 5ܰCA qÄ‚JTèćR¤hÅŒZôèÅ‘bDiÆ–j”‰&d“UvYf›uöYh£•vZj«µöZl³Õv[n»µæ[p­¹¦rË­æjÒU—šk¦q÷Ýi®‘f^z¥¹f|óåYúõW–kbxàX®å`„a¹æ†~åW"–Ø•k±øâG®qdc޹¦CnäFJ6™‘kQyåE®Qäe˜¹f šk^ã5rÖYkÒðùç4®Ach¢Ñ¸æ ¤“>ã3švÚŒkŽzê#®1ÿâj¬¸¦®».â"›ˆk†0ûì!®bm¶…¸f¸ãáê¶[„kBÐ{ï®áoÀA¸æ ÿàW܃gÃw\sÉEwÝtÛ…×]yë÷^}ñå÷ß~&X`ƒ>xa‡†xâˆ+ÆØb;Þøc‘A&ùä’SfYe—c~yf›iÆyçœ{Úg¡‹úh¥‘fú馣¦Zj«³¾zk¯¹{ì°ËFÛlµÛ^ûm¹á¦ûîºóæ[o¿ÿ{pà G|ñÄw\ÜÈ%§¼òË1×|óÎyt¡éLwºÔ©Žu­{ìd7»ÚÙw¹Ûï|÷»à xÅ;ò”·ÿ¼æ9zÑ›õ¬w½ìi{ÝûøÄ7¾ò™}é[ûÜ÷¾øÉ~õsÖýð—¿ÉQÎr—Ëœæ8×¹ÏNt£+éP—ºÕ±Îu¯‹ìhW»ÛáNw»ëáÏxÇKžò˜×¼çAOzÓ«žõ°—½íqÏ{ß ŸøÈW¾ó¡O}ëkŸûà¿ùÑÏ~Žƒ\䂸®!«ˆõ:¢¾’ø¯%¬‰ {¢Ã¢8±)b¬Š»¢È²x²-²¬‹1û¢Í¸³1­ŒE;£ÒÒø´5R­Y{£×â8¶9¢­Žm»£Üòx·=ò­û£á¹¸A†«æ:¤ºù®EÒ«‘ùz¤¿"9°Iÿ"¬’ »¤Ä2y±Mr¬“!û¤ÉB¹²Q¬”5;¥ÎRù³U­•I{¥Ób9µYb­–]»¥Øry¶]²­—qû¥Ý‚¹·a®˜…;¦â’ù¸ükìê_¼þg¯îk€+`Á¨°>lk`Æè±Žl‚(«`Ë.(³ Þlƒ<ë`Ð>h´.m„P+aÕN¨µ~m…dkaÚ^è¶Îm†x«aßn(¸n‡Œëáý–Y®fò¯Ñ`«IÀf ì&NF°œ¬`:1˜Ávr°ƒñaëIÂæ…)ì' [Pư 4¬aBq˜Ã†ò°Y>¼ªþö÷Lÿýošà5 xÀm*pßtàÇ)Á žÓ‚\§7øN~pž"á=MxÂ}ªp…ÿtá *ÃÔ†7\¨wøÐo5V¢­(W1êÕZÖ£˜ iYIzÖ“~V¥¡m©[a ×™¢Ö¦ªÍé]yš×ŸÆV¨³-*`‘*Ø¥êÖ©¼jb©Ú-øÆW¾ó¥o}í{_ü"+ ;netmrg-0.20/www/webfiles/img/newtop.png0000664000076400007640000002653010173042724020345 0ustar silfreedsilfreed‰PNG  IHDR”2ºyò'bKGDÿÿÿ ½§“ pHYs  d_‘tIMEÒ 8 nÊ‚ IDATxœÝ½Û¯$G~ç÷‰[fdVVUVsºÏ!Ùœéá\D$jä™ÑŒ Õîl Ö’-/ôâÅîƒ_ühø/àƒ xaÀ—'cß°×m`µk­ ­,¯´‚´;I#k.Ò\HŠd_ØçtUʪŒÌŒ‹²N“ÍîÓähÔhv³*~‘ñÍ_Ä/~—ˆ_‰ÏýÒ?J¬×8‹µXιÃÿ[pìø÷¢®iq8¨ÏðÚ7qö Ü[Ÿ‚[SØšÖ­aµ‚Å»ÁZœ[ckíái‡/-c§r¬€ pøïÕ8¬…¢¶´k‡³5u+g?òÔíú‹¯6Ó üŠÊ¬]C¥aíÚZü¡G«Áã±ïðÞƒóTÚãÎÞ4h<çœkÀ¼®ðÎ#ô߮ЦÀkwçªúß8m+¬öà <űÂ#ÐÚbµgí¾ïÁ®Ö|ÔqüuÀ ×îî»3Ð9jkY;‡µ5ÖZl}ŠsçVàîж¶ã,,ÐâXáÜêÜ]ê«YïÖÀjœÑÖB±8¬Ž‡ÎX¯_ÃÖãÊ'¾{´ÆÅ0>c‡¥®ëCð×Ç_ êS?õ^µÚÔã …®˜Ú ´Ç­¾qTVã}µšæJõúQ kô8[í õñ ®é°X¼í͸‚ðx´^ýàÁ¸Zðh¦hïѶÀ7çWà ¶>¦iÖжx#¨ª\ÀÖÕøù#l©NNø¨ã¨NÎ>òÔÉÙW^õ€óá°_:¼>l¡•Æãiƒm´U¤ßRÛ)VkïƒÕ ÃyÇSéq+jZO5­q®Á2Åù­5LOàÁ]ôâø‡§Ò𯝍í­aݬÇå`<–){€·'à¡Ò£*oÜŠJ\ãù¨ãÀ™<uûs¿üªÖçÆÙï°øÆ÷x÷§àU­¡ñTu…Åàx •Ö°Õ8áÀWh Zk4ÛæÄVë9©NqÞLºÁy¨í¨²½]€ó4~…­oá]öïÇ— ý8¬6«5hw[×|ÔqØêø#AœýÌ«CÍVïìé1ÚwãÞÜ8œóh¶4.à¼G· ‹ÆãT§·ÐÚá›§+Àã´Å7+S¼¶hÀ5w±ÕÞ{Üì» Z[ð šéaï^ÁÀH¶7óÆ9´¬Æ7Ž:ïüGƒZÜþ«öø í<Þ?À;ƒµzl¯§> ½¨ëoôhÜé çhkжƻ5'Õ1¾iðvuk´w +ðm5Þƒwk¼Õ+Öâ±XëhœÇ³ ÞÔõ‚Æ5ão5Ú{¼shìèòίø¨ãøë€AMoÿì«ÚæœÖZÛ·÷ ZW¼ @¼Æ£Á­©¬¥q ØzìÖ õhHúƒ+ë½߈öتgtsðX Þ¿k ~n…÷ Þ êÓcÜyCUcñ~‹ó‚ª®ñhœk¨´fíuó‘Ç G—t\k·¢–B@/(%0^’M%™QìÃÀ´’T“‚Auô]ÇbQ#º1W×5¢[!\n6¨‰@-º'›Jbˆ»žÐô(URÊ!Z„°@1¾+;z9u}6ú ëÑcy5\¹ÄkwðzkF¶ÇqŒ¡ApŒßœÁÃ÷W¼G;ºèu î]¸ÕØv½ùêÇè:;çpëñÏè;¸Ðü»áøë€A}ê ¿ô*MÖÒucyY¢»ûß2;™PJ…*Ë¢ÄkI>“¨Ö`‹)ÝnƒN–jQ±Ù¬©ê[ìßþG/œáÚ–¬Oèd9gV”Lòõ¼ Ê@<ŸVT ¡it}Jã;£ihÆUïu…Õ«+¦•Åãq~‹÷•ÿ:‚ûÂ2Y–èГi (L%™h‰*æt—[¢É*²½Ø³í/ýŒÆï™šœ–„?ôTº ŸM “Tq ¨km‘ÞpÙ?¤ëý¡CF0{ږÚ|o˜¿…ì{Ó‡ï­]Œ†¢=ú1ò(mQÛGÝae[[+í*`·vc_,Æ•}HwŒ|q•qcäØ^9J‡ˆñHÅ¡­{ôÝŠcÔm ÚaÖR ” +$j»c²<¡œ—äBa´‡YÉ~ïH½gr’“µ·ˆ­B\Âå°' {¤ZbŒ„Ù„åbBôkæv‚È"™ÈQ7–œ_Ü'_å<”’ùܳyБ ÚvŒÔ®[°Å ¹ªCÔ˜+5 ¶>çX¿Ç£€®ww5F‚9D’ݨþ»nè , $Ïa…Euk¶ƒ;ô_#¥ Ï æ6§[ß·æÔ"º‚Åâ”õú¥¸¢ ®¡ÛtØÉ‚aX#SǦ…Ü ò+KèttØrÄ¡D‰E09zŽõÚk&Öb LíÒ.H"§s@·>l[ë1°m-p6¾/··CZ„X ô¶`QZ†õ=´.0t_0=>eµ¾Çd/i­¥žC»vØ¢>DÓpYˆ/ÿÒÿ”¸{W,˜L.zŽ&³ãŒÍ¯þW\GÇŸû;ø[ƒÍå%Ê—Üí4Þ'”’ÜÌ¢Ì/¿ÁåÿoOå×Õ1òKÿ%›mOh=ý0Ó9ÎmX; …zaÙ ë•ãtq•^8¥<²QÇÕ|ÀaíÁÆx´¤¯–ëØ—Љ‚e!Å‚íƒ7PÒQ 6ÓèXµŽ,&BÌH™£u‰Âéè;AY.† A!GÎ|6§uVm"î³yNr@—›Ž³¥eÐQãó: ·îÝ£+jò6#O–”'HS"¶²DL‰6Zæ6‘òë{¯-‹bÁ‹)KÕ±í;J)Ò"‹ž®ƒ<ÏçY6g¿_b:`䳚֭Xµ?˜,´[¯Y§µEjI‰ÂT†ù,csít‚‹¯ÿ/žÞ¢¼õ2›o¿M4vH”™EkÍ|:Áè9—×ðK ǧKöí2›Ñ×:¬È9­‹Ñx`n1à`'2—Wù.Çh\^á€wÕõ¸%ÜÅžÞf½vCÁÑrÔÆûõ›,KÏäìêíwe"ŒÉa´†rŠßí¹¸èX––®Lʒݬd9•èòv˜–¾‡h5eQg4{I~…ˆ nÝ(‰F²¬$^M‘²§ï;nä9]×rysÎÙl{7#¥D–A»¾‡9~‘‡[Ôn‰r*ˆÞB´ØÓ3Äë÷Г’‰’TUÑšù4C-jth¶—Üœçô½ Ër6ÓœÊ$‚y‹;÷(”¡i"Þw”²À.rœp¤) õ?ÿŸ¿êð#_TT, UžÍ7~ãú•î×X~òË`2ö”éhû*1ɶ{‡Ë7þä©ì*/˜½ø9Ú&ѺˆÁиÕcÞ ëhÜ–f+¨Msí 4[´.h¼çÖË·¹Â¡kwk¤iÀšuC}\vŽAõ-Q21Ï,Ù$£Ê+æË’lV3›&¢$h"Yô¬›6·!˜d‚6œVšzŽrÁ´()¬aR¶”Æ TNZ2°Z“R‰ž ©EDÃÉÙ%6Ìó)óIÏ´šòügna1äD¦7r¬Ò,ʈJ=å¼ÀwŽ£5¢dÀ0xt082Ø*'3&R’å’ªÔV!äÀÑrJYe,gtâæÔàcÇT‚ b^à½fÛ6¨ôáe¡ï¾vw\Ëu ›KD9e?ô,‹“gè§‘ºË šÿ÷W?ü‹,š–>ËaZ"ûˆ.3Äþz^AÄû‡dåwyN;»AX= ®ØN<:ßckÀYïÑw÷ì+#ôÊvz Çz4Я2õãyËúÞ=¤h!©´dRhr—pç/FÒf†Œ€”P‰j=CŠˆ£Ï³˜OX]^PU/Ðlß¡¶†<3doýÃ9äÅ„d±Û£¥¥ê:¹ÀŸ¾B=‰Ð—äÓ)áß"}GbD"ʈ”­Tô¯$€Êðo÷$ûÐ#e†.gg5¾ó°Èû %û6йHß㊒%žålƤ®PCG¼ü Úo}›¾y‡Ëæ‚ä=)Fòé2Ë‹ç8¾ýE.CŽP/îÝ¡ÈçØKØ6‘N¤% ½^9ê…Ų¦£Äô¶(ß}à„xçÏ~—ÛÏ }òi6«ž¶í)*TˆhžÉ«€àw˜Ø‘¯wèlÆz}!&£÷áV8WrKnÔ±\0ààõŒ›ã{q\B³\{Zcãr³¡”–zlžãïÿ9›oþ‹gŽóäßËÐg‹y+Z2›N(KC)î~ã7ŸÉ[œ~}ö}o˜å)=¿ñìç}M?þ 'ŸýÙ…œd½ȧ¥j™͘šÀî{¿ÍݯÿÃþ:ÃÜæÁá_ _ûuf/|š?ñ÷¨OŽxëü5Zk¶Ý ç,óüÙ²¶wHæ “¡Ký¡¾ý{ÿEÚ0¨;í‰m‡—ôÁ_Ï”"{÷5x\¸¸cíÚƒçp5ÆÅá WöÁ«9¼ çÁ»‚÷â¿]åñLOÍúÞ=œ[SY BY“¢ÄHóøÚûßæÆ4Q-§¤èÈÓ€–;üƒ?ý@^) 2%‹Â` Óây>ˆ¶¯»ÿò¿Å˜£$¥,"P)ƒÍ s.yû·þ{îüþ?yædz]¾õÜù—ÿÔÝc9¯™f#†R.¨m>6z†,¤µ–úÑj¶tܧë7ôý³µË{©o6œÿÉÿÅÍy†–Mz´š¡Õõ}$ Øvç s¦ÓŠ-½[#EA/×£ÛÞ ¤HÙ!‹ÃŸMA)–”¢ \,‘BPË+o¦/èå=ú~Mß úþË¢@Šbl»X ü[˜l =2þ¯§öþk·%ï6ä&aSGY”„w¾ó¼BzŒò? dÀ˜þC¿×gQèölÿ¦šôDyÎR ä©åø¤áõ_ÿïØßýî_¹ïaÉÃßýGˆpV^®¤Gq§q&þ¬,–Å!n¶@[Æ0]ŸAXC~“< ˜rò býÝ?eúüg˜Þø4"d`z¤ÌŸÁ‘ðCƒh3rßÐt‘•Ì&s”óáŠÎZ:À:…Ã1K—¬g–œ„#Æšs….»5óúÜ–"‡G¸õšØÞ%"Ø]ì8^Ö”…eê±…¡#îþoæd¾…YÁ,ÏùîÛþ¼’HŠ-ƒÎHJ/¯m«³œ¬œ!xúæz Óžß!swx¾¸ R=ãßû_è6ï•gÿý¯’¦¯”ÅÅs\[2£Ä‰¶ë¨™jX¿†sí(°Öá,Ä õ,§,Ëk_GC»ãÎü3>ý³Ÿ>Â6¿~õ !22Ér2(LE.;ÄÉMªÎQÌ-ÛnNÞ÷uè4§ 3B›0•a¿ZÓU97Ê¥,{ßSa 8,¼£eYÎ¥KLbÇà#;Ÿ!$T(IêÉ1N—Kbl®}ÖÜý7>ýú°B—7Ø}ïwžà;ûÄmÞþÎûŸ"M"I¶XeŸà»"ïÍnÅvß1¸D–ê¹å?ý·®PÑ5X Æ”üåïþ³kû¾õ3?Gšqï|C×] t†5駿Ȭï¸|ã{d“)Y}vŽ+Oqî!2ŸÍ’yˆ$ÛR‹Gñ( ìÖ÷ÆÜ‚MÛãLÛÓQ8‚áÃyyï§óï|/}•?òE¼y¶&uŽ1 %4ÞS™ˆºÿ&‚„¿ @Š £-¾Oh™!Ò{Ì⌼<%ÞýcdžQ ;Lž‘M @åhÎk_ýǚ犖_þ$wв ž"«”7?ñ1¾óÕw·#qõås?„Ú½ÃöþñܸýqBxr²ˆ$I“Rd@‚¾Þ{VJRX B£=ج@ù=ßýߺ–'« }GÛnˆ~xj›êÅO°Ý9.Ö†^âƒ@7vY!eNÌù´$%ÅD’Ä¡# ‘ŒIÁŽ—rD®qnƒÅnæ´’ÌÚ­á‘‹½“t¬YfÏ3|€†úìW~†?üÕ_g·Z?ñ]ßîùÓþyéó_º–_¹±$™!±t>J€)ÚŒé@ZvDÕÓGGäÉÐFJ‰åÇ^|âóæîëÜøÔ+lî¼Eôó~ú3¼ý­o<ù0‘€ˆBáSÂûëZßøKºæ×IR´›‡¸Í“ï÷Š&§Ïá3Cê÷ćo_Û.å»mƒÀäsru‰e`’zôÈ zR7úŽ|ë="¯¤¢Ù ÊP°#!Ü]êÅs‡SW495¬·LÓº$ú8j¨¡ºv€½‡ýùŸåßü¯¿ò(êú^ºóío’ü³]d¡2D7 ªŒL‹Ç¾ÓYÎéË?Nz’Є(Ã@Œ‚HBåvýõ/ûYäv{rÒ £¼Ÿ6¶Ì2;9æòÁù£Ï6wÞd^çÜùÚëO´Ÿžòæ7þì‰ÏSJ"Þµ“Z]?®¦SE‚tQ0ûìçi·-ù¤$l¯÷“ÉÁò*cV/ñø\î7׿Z¯hòÊÏá¤%(E¿ºÀžLÀžÛ]åMÁÑb=n‡k¬µtÎa&sr×ïÛ»}Kq|Ês¯¼ÂÛüÇOms÷»ÏŽ…¤èˆR`’#½Ï›.¦3¾ð‹¿ÌvP¸vÃ0hÚfÀ ‰sf×Ð_4,òï3¹yŒŽe]°þó?äûð¯ÞígVócÿéÁùfÏ~»gµíhe‰¼Ø³¼1%¤''}J‰®ó,^xá± uyÿiØsñúã¸æ§§D­Ÿ¾å ‰ &Ç„¡…§hÄ”·_¾ôYv¥‰ýžg*ø˜ˆÉ ÅÓKfŠâ$±ß¶¤hñyÉò‡?ÇÅŸ}íC ÆdÚC*æCRŠô} k<ƒtØÙ¢½Ïz“0ï—WJ8ײyèØïw´½`±¬2"ÒOÆ¡RJ QA>azóŒË»ï¼íöqGHI¶8¡ÒµÚ@ûTúú\ž2†TT,~ì'YÅ÷~÷Iï®ßïyý·“›ó('®!JRy½† ëLn“4Û=˜ó/ÿ=*Ó1)ó‰áo•ï}õß<Á+…§í{bИÖÑ%ÅœZz®ª¶€ËàÐ,Æ[¸5„žÜG˜O¹~Q¶û™/X<ÿ#÷Þ¢=¶f{l°RJi0ÄÈììÖcêýTÜ$¢úžô4 Ÿ}ïv-Õ¬Àûë=Ó!Vë–aØ“Ÿ>O¹ù£?MO…m4AL)''L¦–Iöš4RLÙhÚ‡!¦©rfù¡SÈR UBЧäÖR±…DqóEà®Å0{áE¶­#3ö‘6züñ ¢'ŸÔÏJDcðµÙ{œ‹(™¿üìïéÇcÚó{ÌÖIyô)ˆ†nÔ/½Âý?ú¿Ÿhëãî¿ú§|âgÿ3*;#DE5:¯Ç5w¿Ë[ß|ÒC蜣5+|+˜,ÎØu!Ô èÖ8w8@Ô¶Ôg·Ñ–¸ÑËÛScÇäpý¬Ä. ¢ï‰©[±i[T½`ñ£_ââOþõ¼º‘$úZK„|ÒO‘R"¥Çf>AbŒìö;Ú¾@а [Rß2,?Ž<¿‹êŸ|nˆ‰í~ Iò{äìirâûò›­™Òï;вˆ§„ ¼÷ì¶-¤Éòvûë·¼¾÷ôq@å7v“ 6Í@/öc?Bûý¯?•¯ùî Ši}IV4öEf_>#Ýÿsöw¾Où¬Kq`ë#г!o~ŒËmËååžÝeO4¤†Afé!³åÇñ;‰µëN\U]€Esñ¹¯üÃäXáZ('cŽÈõ›e”¹'Sމíº=¾¿d·èw m(é;M¦ô2GzÉÑ'^Bï.I±!Ó‰\7˜,è¹mÜ ÙIDAT Å€)Zhw>(Bêˆ ¦3Éb±D+”Vİ%ùJ£¤F`HHú¤éö‰K¯ ½Gš Â+bÌ!o ¦“ä#¾;§u»ý€ë5v²À3%Ë ØÜçä‹YÚ⻆nXÑí.ñÒà¶>hL^c­ÂNr2<Ȇе\vûÍž(,eo 2Ãt)Ëœ®9§÷Ëí–¶IÏ)²)EQ2) y©PaÏö nK×õ\®;š>Òö–ÌNÐÙ Œi)ó› XÝQØH =!t¸AÛž^ÎzE×ç "¢CÏìfM6l‘gŠ ‡Ñw J(b^’;eè;vmdsÙàº!Ú½#È)> D¬ÐÓ# ]"U>†|ìx&ÊÙÑ‚²Ö¢¯î¥[;Ö6ØÊ|¼Åm¿"Ø)ë-Yêp{Gßu´]Ï™YÒ%Èn€ö´ï\PžÍ‘›Àà[.}‰º|€V%ð't=ÎGšJ¤íA¶RöˆAà‡ A ¤ )ˆ}‹Ô†]ð‚ÁéC™£’ªl‰-CkØö¿ïˆdè;tqĶϩ«‚&8Þ }ÿóLÓ´ !%†'ô-É–¨¨VƒÅ¬öä”д»ž~ß²ÚDú4%Ëd¯ð®£ë$ÞÁ~×ÒÆŒäj2#™9»v”†U³E¤)6ø}‹'°Ûw gdYFaæ´º$yGFN;4ÄbÂj»Áˆ¡ëð!Òž!ôdfI"Â.éÄû—Ø:Cî{”êB¢’˜)ÆXBô¤fŒµ¥ÍŠÁ%zß²k=ƒPyN¤"zE*oP‹šŸaMÁ°]麫E\Ýyc<±yuú¼(FÛf2¹Éåå[ˆNÁörˆìéiÚºñÌ8.&ÌÄPXß—X›ÑÞóØÙwÿ!}wŽ)§ í±Ô´û^’PDeÉr‹÷I¤2¼sÑ0ÑàÚ€* Ý¶¨ä&‡°Ç“Åœýv…23tJº˜hBNܶH˜húD.flûsb(ˆ»‡XsCO$ƒßS KL9«vCÂ@»×H)6O úÍžV0;ƒõ¡Êi.„Œ½˜PV¯ 1b¥¡y¸##Ѷ YjÚ0o;Va@Ó±~Gpt:cûÎ9‰$`hú±œP›)RRLªSšæˆì¢(<ûÎc‡$a CEÕÞ•¨<Ñœw˜¢ÄŸoñÃSL1ñ O×wÈ4Ž9 ‰‘®‡®( œ“LlIS-§ì/fç¸, B86+Ééí³ÃøñúAºýòÏÇìX Ϲ†,%bŸ‘©C’ ®#¦€Ñú.’Û#.]BTÇTÚ²sBêéÈ€‹=Lgsº”胦s;‚°4%E; hc‘æˆ.ìñzß{ßI ‚½×H:A¿¹¤Kˆ’0za†IQ¢ƒÌ$ÉGvû-2$“gK„™¢„!ËsŽf7ñn`6»Á‡+|^bϦWô½£‚ 4™¶lË|qÌ %}ÈèÝš ,Rh¢®È”f?ô(“!õ’}‰W3|ëñ¡CÄ£ LV dIQ΃ ø‡"¦œÞõ¸”£U†f‚.&dÚÒ‡+4ÉX³`@ãÝ@Œ®è»ˆµG¬v”KJ™³KSâAž„F±j¡(¦ôIÐ †Îµx2¢‡.h‘¦íH"Céš!%dyЦ@A.§”vB–¤´L«:üƒ»xS u5–øA£Î>õ ¯Žw¸¯ª¾NiS‹{çM’*h‡‡S “"èçˆ%`t ‰D!. !1Ç3š¦C5kÒdŠs>‡6TÌˆÉ (@jŒ^â1סÍe™38GG$… ºœÐ\¶(™p^SLçÄX¤Bg3$=ŠŠ¨$ÆÔ÷$ohü†i6¥Ã3l"ó9^´˜ÉœLf£iº Þ Úa‹¤Á =)MG&3ôÑ’nçÓ]çñ¤QH1#¡áÈô}Rèý¥E†ï;!ÌȦsvÛ£ûAPΧ ƒaH©JRtH*d>G Pr:Þ*)ôÒã.î’ôçWȬD¡²èI¡`H £#qÅ+5êhN»÷¨ýª®¡Æv1ÃEJ9 …R ‚Ì0äÅM¦õ^ks²ù”Ë‹Fìiº@UOñáPŠZ[ð+ðuö©Ÿz?ž Öx=V°sÆ¢ ‘û®ø^QÕÇZ {ƒLÍ™Mf™Ef‰Î”h1%T˜Ñ…Â$Mµ¸A§¦d"ÇOædÂR–c±«éÉKÄ!IAȦ˜ØQÔÇ(•#óš€BiÑ`”¦Z“ A–Oió)õlJŒ "ô@‰1+(¤¢Ï*2%Iº$ËdRÐí#Óz‰ï`ÍMAe ¬Éø|J®—¤ù ©2L˜Ba’¢ªoàä„,e#rÊINÕÉK„ÞcT"š9&õ#“#óC’H9Ðõ`d¢ª˜ɲŠ.Ÿ“™%@ª™š³ŠB(:S`D<Èbö¤,ò2=cZÎ(²™Ag&djN˜NBa’Ä:fLê›tjF&,¾¬ÉdA9) "2=ù$In )_’ÑS,OR!².Æ+S§ªk´K86Ú¢Înýü«ci;hð ÷^j;e?8d²”…¡é¶$5#JI¦ ²ÌpÙh‘1- ¼;Çw;]Hú^b¤Â”µHYÓ–¤rʼ¤OÙ „T„0 w[DvD[Z¤ÏPÞUD–·(É& T·¦M2[0- öAÄD‰=BDhÙGrtÿë¢f?8DÌ(¬d½;'ˆOÀƒÉ—½'“–iYý%qèÂbJEß+ŒP˜r‚h÷Hi‰\’¤¡Ì,}Ôˆ>!¤$FØm‘Ù1í¤DrØå€(ž§’®˜"ÛsöI8&†è2¤ª2 ¥EÄ–]Ѳ(fìû+YdYL‰j”…É4ÛaÀÈœiQº B·GˆSjúA“©Œl2EvݨÙ‘´¥´,*h¤ÊH)"÷ ";f_dˆN€Ûàqc7ÎVÐÜ¥ñtEeAÂêÝÒ9v,„PÛ‚zqF!$Tiè厡º‰T9‹£RúÉŒNN(Š’NŒ9+G1Æ&„ ëz:§òåƒÊP”¶”“ŒAÍX, ¢œÐ‹^*ºÉ”¾ßSžCYÁPÝdyüqTØ ô‚aÛQNn"U†ô©¦tB!Ä%èB Š EY±˜LY._¤P†^„PtâWŒÑ“º¶ÑÑ:YQN¦ô*+§¨ ©‘RÑw=]§ò9DzeÆÄ²Ê(&¬¨YŒ8:©é«ý°§›†Å±Å7‡{£Õ1~½ôX_±Xàhшño/ý~ˆ=®¡€gmÆ’ÄÚ¬wxm«‘^eæi­¯¢¸mƒ>9;œ[n±Ö cTãÏBhËGGƒþÿ ÃvD`mº±lµ5Xßáuñï& ëÜ£"WÌîõtn¬OFma}Øͬ+8 nœu,ßmwU–£ÅžÖ¸{÷•€9µ¨åŽÇ~h[\Q<*¯÷èFÅX|aŒ±¬×¸Ã¥B¨©­wU`ô£ÃŽUU?ÒÔâö^m¼Af3h­+´ïxôÛjί@OÇrÃV€®Æš)_?ë°u <ç *}õó ïVxg¨êêЗ…¢@ ©ë±´?l¡1šj¬¥Ìø5âÔc;üV‰cÅG‡cû‘Çðÿ¼Ÿ»Z‘ódIEND®B`‚netmrg-0.20/www/webfiles/img/access_denied.xcf0000664000076400007640000000412507702153612021575 0ustar silfreedsilfreedgimp xcf file–2BB/ gimp-commentCreated with The GIMPžÜ>6 Deniedÿ     0A6 U6 eˆÿˆÿˆÿªýUþqªªùq8ªªUªø88ªªªªü8qªªýq8ÿþþªÿÿùªUÿÿâÿøUUÿÿÿÿüUªÿÿîÆÿÿUqÆÿÿªÿÆUUü8UÿÿþÿõUUÿÿÿÿUUðªÿÆUUªÿÿâÿÿU÷ªÿÿªÿªëUÿÿâÿÿÿUUÿÿÿÿUüªÿªøUÿÿqÿÿUÿúqªÿªëUÿÿqÿÿÿUUÿÿÿÿUüªÿªùªÿÆÿÿUúªÿªªÿÿìªUÿÿâÿÿÿUUÿÿÿÿúUªÿªþUÿÿþUúªÿªªÿÿìªUÿÿUÿÆÿÿUUÿÿÿÿúUªÿªþUÿÿþUøâÿªÿªëUÿÿÆÿ8ÿÿUUÿÿÿÿUüªÿªùÿâÿÿU÷Uÿÿ8ªÿªëUÿÿ8ÿÆÿÿUUÿÿÿÿUüªÿªíâÿÿÿUqÿÿƪÿªüUÿÿþªÿÿõUUÿÿÿÿUõªÿªUâÿÿÿÿúâªÿÿúªUÿÿþÿÿøUUÿÿÿÿüUªÿÿýUÿÿýªqþªÿÿúªUÿÿõÿÿUUÿÿÿÿüUªÿÿüÆ= Accessÿ     , ‡= ›= «ÜÿÜÿÜÿüªªþUªªþUù8ªªqþ8ªªû8ªªUúªqûqÿÿ8ýUâÿÿýâUýÆÿÿûUÿÿþÿÿûª8ÿÿýâûâÿÿªäUÿÿâqUUÆÿÿUâÿÿUUÿÿªUÿÿUUîÿÿªqÿÿ8ÆÿâUâÿù8ÿâÿÿüâÿª÷ªªÿâøUªª8UÿÿïUÿÿqª8ÿÿU8ªqùÆÿÆÿûUÿÿÿþqüUÿÿú8ÿÿªûâÿâ8øÿÿ8UÿâüªÿªüUÿÿþUÿÿþªÿÿúÆUÿÿýâUòÿÆÿÿqªÿªüUÿÿþUÿÿýUÆÿÿúªÿÿüqÿÿùÆqÿÿûÿÿUüUÿÿûâÿúªÿâqÿÿù8ÿÿø8UUÆÿâøUUUÿÿô8U8UÿªUUÿûÆÿ߯ÿªÿÿª8qÿÿª8ÿÿâU8âÿâUÿÿëÿâªÿ8ÿÿUUÿâ8ÿÿ8øUÿÿÿÿþªýUâÿÿûâUÿÿýÿÿûâÆÿÿûUªÿÆüâÿý8ªÿÿýª8øâÿÿÆqþUÿÿùÆÿÿªúÿÿÆU–2 Backgroundÿ     å–2=I–2%1 €· € € €· € €L·LLK% netmrg-0.20/www/webfiles/img/yellow_led_on.gif0000664000076400007640000000163010173042724021637 0ustar silfreedsilfreedGIF89a÷€ÿ{{{½½½ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€€ÿÿ@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ùÿ,uÿ  `Áÿ,Àƒ 0Àà‡J|X`AÇ0ähpaÈŒ€”ØqáE“ $.X  ḟsΜ© gÅ“6k*èó'Å•4{¦¬¨dIL›rôèÀ€¨RZ½š1bHŠ\»&TX2a@;netmrg-0.20/www/webfiles/img/status-yellow-triggered.png0000664000076400007640000000124410173042724023632 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓk0#ƒ1IDATxœ…“OKTQ‡Ÿ÷œ{¯G]Œ3ˆNA(¶j!aÑPY÷5ú®£].ÒË\DТEB Æ"øßDZîÜ{î9-üK‘=«wñ>ð{ßóᇇ3=ÖnW ™ '¼O"“€«B´¨õÀB©ôîçU¿\{{SãÞ·–”Ê—ƒ`­ €,Î`í.Î5k"¹™þþ«×ò…xº† a8J#’ùS”*1Ön‘¦¤é÷†Hçt_ßûU¹ˆúãk>,󥊜Ÿ/Ón2@cÌ$]]sxß"Ž¿¦ë5­ï?¬Ý®(•/GÑ(Jiµ^á\ãÖ&2âø#Iò|~ž(ùFÙ¹zEA2ƒÁ0ççˈ78×àìì-a8B ὟU"á„ÖDr—QÿMB$‡RED¢ å}Á¹ÓËï"#ËŽQÊY¤.ÞÑ^nUÿGÖh]Â{‹HG¢ÀU;bŒ™¼S5æ)ÐÆ¹&ÞÛª‚hÑÚ]¬Ý¢«kî2Áß(U »û%Önbí"zQi=°à\³–¦xß"ŸŸÇ˜©[#hŒyFoïk¼ÿE’¬‘eõšRÅØß>í•0|Tˆ¢1Âp‘YvŒÖ% µ›$ÉiºÞ€hºTZZ½¾íƒƒãÞÇKZß+ÁJQÊà½Å¹&ÖîeõšHçL©´tsÛWUzœ«W¼÷³"Ñd‘HGâ½­ŠèE¥Š Åâ›ë_õÆý ÎÂríIEND®B`‚netmrg-0.20/www/webfiles/img/trans.gif0000664000076400007640000000005310173042724020131 0ustar silfreedsilfreedGIF89a€ÿÿÿ!ù,D;netmrg-0.20/www/webfiles/img/status-green-nottriggered.png0000664000076400007640000000135710173042724024145 0ustar silfreedsilfreed‰PNG  IHDR;Ö•JbKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ/rtJ|IDATxœ}“½OZaÆŸ÷Þûr/×€QëE@¡˜F+½)Ö4é¢a1鯂nMÜûtpëÐÍ©IW Ô¥I§¦K[ ­F£M£‚RËýx;?š´þ¦3œçäœçœCp‹™œâM؉3){Œ'¼‡ÕtÖÉ´­fJcíôúýBó*Ÿ\ñÜPÄÉõ¬ ~U¡¸ù>؈“¸°j¨E”õBöÜ:ÿ:Ø»ÇsC7ß·>j{è ‹cðÑ“¢Ú¨`ÀåJÆ!ò]üÒ¶ U£ÿÚß#39Å!sîÏÄÇjÔþRKÆÚö26K€uËG•IÌM,À4lµ¿`§ÉVÍÒ3A 41(øÕ°8©%ãͧWhhõ#ðãøöOw±8½„Qq¿ÍªÚdg'ΤBðÑÖ¶—ÿÞ¢¡Õ±²ù†B‡áâz’œHì17ßÁ¤ÝVïà{é+8S@/߉8cOxH¨6*Ýï‚•z 6"A ÔÃ1°šÉ ¸¼·÷ È~˜0À`Õ8u2V D`ˆ*“wjUe %87ÏÐaZ†k[ÍTÅ(¢dbnb.Qþ§Pe¼ˆ¾DQ?@Ù( e]¦8µÓe½ÍwvaH§—ðÈûäf¨Þ)¼žy8Lä´œèGÙ–ÕH˜Í#÷ßzDT}£â84 ÎP©— È~p” ¨ §íà§¶Y¨ÇñÕ‘½k‹žçÃ?°2DƒªB‡ÑË÷woÎÍ3”Nô£lÍ<_Ù¸¹í+fóA‡ƒ“.®')gL ÔÃ`Õ:LË´¬ËTËj¤ß·¯¿ê° {SßAqIEND®B`‚netmrg-0.20/www/webfiles/sub_devices.php0000664000076400007640000001510610447332363020555 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Sub-Devices"), array("text" => "Type") ); // end make_display_table(); GLOBAL $SUB_DEVICE_TYPES; for ($i = 0; $i < db_num_rows($results); $i++) { $row = $rows[$i]; $type = "" . $SUB_DEVICE_TYPES[$row["type"]] . ""; /* next hop handling */ if ($row['type'] == 2) // network interface sub-device { $nh_res = db_query("SELECT value FROM sub_dev_variables WHERE sub_dev_id={$row['id']} AND name='nexthop'"); if ($nh_row = db_fetch_array($nh_res)) // next hop located { $nhd_res = db_query("SELECT dev_id FROM sub_devices WHERE id = {$nh_row['value']}"); if ($nhd_row = db_fetch_array($nhd_res)) { $type .= " [Next Hop: " . get_dev_sub_device_name($nh_row['value']) . "]"; } } } make_display_item("editfield".($i%2), array("checkboxname" => "subdevice", "checkboxid" => $row['id']), array("text" => $row["name"], "href" => "monitors.php?sub_dev_id={$row['id']}&tripid={$_REQUEST['tripid']}"), array("text" => $type), array("text" => formatted_link("Add Templates", "graphs.php?action=applytemplates&sub_dev_id={$row['id']}&tripid={$_REQUEST['tripid']}", "", "applytemplate") . " " . formatted_link("Parameters", "sub_dev_param.php?dev_id={$_REQUEST['dev_id']}&sub_dev_id={$row['id']}&tripid={$_REQUEST['tripid']}", "", "parameters") . " " . formatted_link("View", "view.php?action=view&object_type=subdevice&object_id={$row['id']}", "", "view") . " " . formatted_link("Duplicate", "{$_SERVER['PHP_SELF']}?action=duplicate&dev_id={$_REQUEST['dev_id']}&sub_dev_id={$row['id']}&tripid={$_REQUEST['tripid']}", "", "duplicate") . " " . formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&dev_id={$_REQUEST['dev_id']}&sub_dev_id={$row['id']}&tripid={$_REQUEST['tripid']}", "", "edit") . " " . formatted_link("Delete", "javascript:del('".addslashes($row['name'])."','{$row['id']}')", "", "delete")) ); // end make_display_item(); } make_checkbox_command("", 5, array("text" => "Duplicate", "action" => "multiduplicate"), array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked sub-devices?") ); // end make_checkbox_command make_status_line("sub-device", $i); ?>
0) { $query = db_query("SELECT * FROM sub_devices WHERE id = {$_REQUEST['sub_dev_id']}"); $row = db_fetch_array($query); } make_edit_table("Sub-Device Properties"); make_edit_text("Name:", "name", 40, 80, $row["name"]); make_edit_select_from_array("Sub-Device Type:", "type", $GLOBALS['SUB_DEVICE_TYPES'], $row["type"]); make_edit_select_from_table("Device:", "edit_dev_id", "devices", $_REQUEST["dev_id"]); make_edit_hidden("action","doedit"); make_edit_hidden("sub_dev_id", $_REQUEST["sub_dev_id"]); make_edit_hidden("dev_id", $_REQUEST["dev_id"]); make_edit_hidden("tripid", $_REQUEST["tripid"]); make_edit_submit_button(); make_edit_end(); end_page(); } // end displayedit(); ?> netmrg-0.20/www/webfiles/graphs.php0000664000076400007640000002523110367515603017547 0ustar silfreedsilfreed"; make_plain_display_table("", checkbox_toolbar("edit"), "" ); // end make_display_table(); $query = "SELECT * FROM graphs WHERE type='template' ORDER BY name"; $graph_results = db_query($query); while ( $graph_row = db_fetch_array($graph_results) ) { make_edit_checkbox($graph_row["name"], "graph[{$graph_row["id"]}]", $_REQUEST["graph"][$graph_row["id"]]); } // end graphs echo ""; echo ""; $sub_dev = (!empty($_REQUEST["sub_dev_id"])) ? $_REQUEST["sub_dev_id"] : -1; if (($sub_dev == -1) || ($_REQUEST['edit_subdev'] == 1)) { make_edit_select_subdevice($sub_dev, array(), 'multiple size="10"'); if (strstr($_SERVER['HTTP_REFERER'], "graphs.php") && !($_REQUEST['edit_subdev'] == 1)) { $return = $_SERVER['HTTP_REFERER']; } else { foreach ($_SESSION["netmrgsess"]["grpnav"][$_REQUEST['tripid']] as $breadcrumb) { if ($breadcrumb['type'] == "device") { $return = "sub_devices.php?dev_id={$breadcrumb['id']}&tripid={$_REQUEST['tripid']}"; break; } else $return = "groups.php"; } } make_edit_hidden("return", $return); } else { $label = "Sub Device:
"; $label .= get_dev_sub_device_name($sub_dev); $label .= " [change]
"; make_edit_label($label); make_edit_hidden("subdev_id[1]", $sub_dev); make_edit_hidden("return", $_SERVER["HTTP_REFERER"]); } make_edit_hidden("action", "doapplytemplates"); make_edit_submit_button(); make_edit_end(); } // end applytemplates() function doapplytemplates() { while (list($skey,$svalue) = each($_REQUEST["subdev_id"])) { while (list($gkey,$gvalue) = each($_REQUEST["graph"])) { apply_template($svalue, $gkey); } reset($_REQUEST["graph"]); } header("Location: {$_REQUEST['return']}"); exit(0); } // end doapplytemplate() function display() { if (empty($_REQUEST['type'])) { $_REQUEST['type'] = "custom"; } begin_page("graphs.php", ucfirst($_REQUEST['type']) . " Graphs"); js_checkbox_utils(); js_confirm_dialog("del", "Are you sure you want to delete graph ", "?", "{$_SERVER['PHP_SELF']}?action=dodelete&type={$_REQUEST['type']}&graph_id="); ?>
" method="post" name="form"> checkbox_toolbar()), array("text" => "Name"), array() ); // end make_display_table(); $query = "SELECT * FROM graphs WHERE type='{$_REQUEST['type']}'"; if (isset($_REQUEST["order_by"])) { $query .= " ORDER BY {$_REQUEST['order_by']}"; } else { $query .= " ORDER BY name"; } // end if order_by $graph_results = db_query($query); $graph_total = db_num_rows($graph_results); for ($graph_count = 1; $graph_count <= $graph_total; ++$graph_count) { $graph_row = db_fetch_array($graph_results); $graph_id = $graph_row["id"]; if ($graph_row['type'] == "template") { $apply_template_link = " " . formatted_link("Apply Template To...", "{$_SERVER['PHP_SELF']}?action=applytemplates&graph[$graph_id]=on", "", "applytemplate"); } else { $apply_template_link = ""; } make_display_item("editfield".(($graph_count-1)%2), array("checkboxname" => "graph", "checkboxid" => $graph_id), array("text" => $graph_row["name"], "href" => "graph_items.php?graph_id=$graph_id"), array("text" => formatted_link("View", "enclose_graph.php?type=custom&id=" . $graph_row["id"], "", "view") . " " . formatted_link("Duplicate", "{$_SERVER["PHP_SELF"]}?action=duplicate&type=" . $graph_row['type'] . "&id=" . $graph_row["id"], "", "duplicate") . $apply_template_link), array("text" => formatted_link("Edit", "{$_SERVER["PHP_SELF"]}?action=edit&graph_id=$graph_id", "", "edit") . " " . formatted_link("Delete", "javascript:del('" . addslashes($graph_row['name']) . "', '$graph_id')", "", "delete")) ); // end make_display_item(); } // end graphs // FIXME: There should be a better way to do this $duplicate_array = array("text" => "Duplicate", "action" => "multiduplicate"); $apply_template_array = array("text" => "Apply Templates", "action" => "applytemplates"); $delete_array = array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked graphs?"); if ($graph_row['type'] == "template") { make_checkbox_command("", 4, $duplicate_array, $apply_template_array, $delete_array ); // end make_checkbox_command } else { make_checkbox_command("", 4, $duplicate_array, $delete_array ); // end make_checkbox_command } make_status_line("{$_REQUEST["type"]} graph", $graph_total); ?>
[Show Advanced]'); make_edit_hidden("base", $graph_row["base"]); make_edit_hidden("max", $graph_row["max"]); make_edit_hidden("min", $graph_row["min"]); make_edit_hidden("options_nolegend", isin($graph_row["options"], "nolegend")); make_edit_hidden("options_logarithmic", isin($graph_row["options"], "logarithmic")); } // end else hide advanced if ($_REQUEST["action"] == "edit") { make_edit_hidden("graph_id", $_REQUEST["graph_id"]); make_edit_hidden("type", $graph_row['type']); } else { make_edit_hidden("type", $_REQUEST['type']); } make_edit_hidden("action","doedit"); if (!empty($_REQUEST["return_type"])) { make_edit_hidden("return_type",$_REQUEST["return_type"]); make_edit_hidden("return_id",$_REQUEST["return_id"]); } // end if return_type make_edit_submit_button(); make_edit_end(); } // end edit() ?> netmrg-0.20/www/webfiles/error.php0000664000076400007640000000170007702161445017407 0ustar silfreedsilfreed
netmrg-0.20/www/webfiles/get_graph.php0000664000076400007640000000416210146521464020220 0ustar silfreedsilfreedstart(); $timer->addmarker("before headers"); } // end if debug /***** Expiration Headers *****/ // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); if (isset($_REQUEST["debug"])) { $timer->addmarker("before auth"); } else { // Image Type header("Content-type: image/png"); } // we need to auth different ways depending on type of graph switch($_REQUEST["type"]) { case "template" : GraphCheckAuth($_REQUEST["type"], $_REQUEST["subdev_id"]); break; case "template_item" : GraphCheckAuth($_REQUEST["type"], $_REQUEST["subdev_id"]); break; case "custom_item" : $q = db_query("SELECT graph_id FROM graph_ds WHERE id='{$_REQUEST['id']}'"); $r = db_fetch_array($q); GraphCheckAuth($_REQUEST["type"], $r['graph_id']); break; default : GraphCheckAuth($_REQUEST["type"], $_REQUEST["id"]); break; } // end switch type for auth if (empty($_REQUEST["hist"])) { $_REQUEST["hist"] = 0; } if (isset($_REQUEST["debug"])) { $timer->addmarker("after auth"); $timer->addmarker("before get command"); } // figure out what our command for generating the graph will be $command = get_graph_command($_REQUEST["type"], $_REQUEST["id"], $_REQUEST["hist"], $_REQUEST["type"] == "template"); if (isset($_REQUEST["debug"])) { $timer->addmarker("after get command"); $timer->addmarker("before exec command"); echo(rrdtool_syntax_highlight($command)); exec($command); $timer->addmarker("after exec command"); echo("

"); $timer->stop(); $timer->debug(); $timer->showtime(); } else { passthru($command); } ?> netmrg-0.20/www/webfiles/user_prefs.php0000664000076400007640000000654610361026461020441 0ustar silfreedsilfreed netmrg-0.20/www/webfiles/about.php0000664000076400007640000000234410561766272017403 0ustar silfreedsilfreed
NetMRG

The Network Monitoring, Reporting, and Graphing Tool

Version

Copyright ©2001-2007 Brady Alleman, Douglas E. Warner and Kevin Bonner.

Special thanks to our other contributors.

This project is licensed under the terms of the GPL, Version 2.
Other licensing arrangements may be available upon request. Please contact licensing@netmrg.net.


NetMRG is a project of TreehouseTechnologies.
netmrg-0.20/www/webfiles/contributors.php0000664000076400007640000000233410361026461021010 0ustar silfreedsilfreed
NetMRG

The Network Monitoring, Reporting, and Graphing Tool

Other Contributors

Code
Ryabkov (Rojer) Deomid has contributed many patches, fixing bugs that are difficult to reproduce.

Suggestions and Comments
Ian Berry, the main developer of Cacti, has a lot of insight into graphing software which has helped this project.
Patrick Haller assisted with concurrency debugging in the original gatherer.

Testing and Debugging
The staff of CTI Networks, Inc. was finding bugs in NetMRG long before the rest of the world knew about it.
netmrg-0.20/www/webfiles/ajax.php0000664000076400007640000000545710774565003017217 0ustar silfreedsilfreedaddClearSelect("subdevice"); $dev_id = null; $sub_dev_id = null; if ($type == "device") { $dev_id = $id; $resp->addClearSelect("monitor"); } else { if ($id < 0) { // MORE "Internal" hacks $dev_id = -1; $sub_dev_id = $id; } else { $dev_id = db_fetch_cell("SELECT dev_id FROM sub_devices WHERE id = '$id'"); $sub_dev_id = $id; } } if ($dev_id == -1) { // Internal Device if ($sub_dev_id === null) { redraw_monitor("subdevice", -1, $resp); } $resp->addCreateOption("subdevice", "-Internal-", -1); $resp->addAssign("subdevice", "selectedIndex", 0); } else { $q = db_query("SELECT id, name FROM sub_devices WHERE dev_id='$dev_id' ORDER BY name"); $first = true; $i = 0; $selected = -1; while ($row = db_fetch_array($q)) { if ($first && ($sub_dev_id === null)) { redraw_monitor("subdevice", $row['id'], $resp); $first = false; } $resp->addCreateOption("subdevice", $row['name'], $row['id']); if ($row['id'] == $sub_dev_id) $selected = $i; $i++; } if ($sub_dev_id !== null) $resp->addAssign("subdevice", "selectedIndex", $selected); } return $resp; } function redraw_monitor($type, $id, $rp = null) { $resp = ($rp !== null ? $rp : new netmrgXajaxResponse()); $mon_id = null; $sub_dev_id = null; if ($type == "subdevice") { $sub_dev_id = $id; $resp->addClearSelect("monitor"); } else { if ($id < 0) { // more "Internal" hacks. yay. $sub_dev_id = -1; $mon_id = $id; redraw_subdevice("subdevice", $sub_dev_id, $resp); } else { $sub_dev_id = db_fetch_cell("SELECT sub_dev_id FROM monitors WHERE id = '$id'"); $mon_id = $id; redraw_subdevice("subdevice", $sub_dev_id, $resp); } } if ($sub_dev_id == -1) { // "Internal" subdevice $resp->addCreateOption("monitor", "-Fixed Value-", -1); $resp->addCreateOption("monitor", "-Sum of all graph items-", -2); if ($mon_id == -2) { $resp->addAssign("monitor", "selectedIndex", 1); } else { $resp->addAssign("monitor", "selectedIndex", 0); } } else { $q = db_query("SELECT id FROM monitors WHERE sub_dev_id='$sub_dev_id'"); $i = 0; $selected = -1; while ($row = db_fetch_array($q)) { $resp->addCreateOption("monitor", get_short_monitor_name($row['id']), $row['id']); if ($row['id'] == $mon_id) $selected = $i; $i++; } if ($mon_id !== null) $resp->addAssign("monitor", "selectedIndex", $selected); } return $resp; } $xajax->processRequests(); ?> netmrg-0.20/www/webfiles/monitors.php0000664000076400007640000002402710376174022020133 0ustar silfreedsilfreed
" method="post" name="form"> checkbox_toolbar()), array("text" => "Test"), array("text" => "Data"), array("text" => "Graph") ); // end make_display_table(); $mon_results = db_query("SELECT * FROM monitors WHERE sub_dev_id='{$_REQUEST['sub_dev_id']}'"); $mons = array(); while ($arow = mysql_fetch_array($mon_results)) { $arow['short_name'] = get_short_test_name($arow['test_type'], $arow['test_id'], $arow['test_params']); array_push($mons, $arow); } function mon_sort($a, $b) { return strcmp($a['short_name'], $b['short_name']); } usort($mons, mon_sort); $mon_count = 0; foreach ($mons as $mon_row) { $mon_id = $mon_row["id"]; if ($mon_row["data_type"] != -1) { $graph = ""; } else { $graph = "Not Graphed"; } // end if data type if ((!isset($mon_row['delta_time'])) || ($mon_row["delta_time"] == 0) || !isset($mon_row['last_val'])) { $rate_of_change = ""; } else { $rate_of_change = sanitize_number($mon_row["delta_val"] / $mon_row["delta_time"],2); } // end if delta if (!isset($mon_row['last_val'])) { $mon_row['last_val'] = ""; } else { $mon_row['last_val'] = sanitize_number($mon_row['last_val']); } if (!isset($mon_row['last_time'])) { $mon_row['last_time'] = ""; } $data = '
Value ' . $mon_row["last_val"] . '
Rate of Change '. $rate_of_change .'
Time Stamp '. $mon_row["last_time"] .'
'; $html_name = htmlspecialchars($mon_row['short_name']); $java_name = addslashes($html_name); make_display_item("editfield".($mon_count%2), array("checkboxname" => "monitor", "checkboxid" => $mon_row['id']), array("text" => $html_name, "href" => "events.php?mon_id={$mon_row['id']}&tripid={$_REQUEST['tripid']}"), array("text" => $data), array("text" => $graph), array("text" => formatted_link("Duplicate", "{$_SERVER['PHP_SELF']}?action=duplicate&mon_id=$mon_id&sub_dev_id={$_REQUEST['sub_dev_id']}&tripid={$_REQUEST['tripid']}", "", "duplicate") . " " . formatted_link("Edit", "{$_SERVER['PHP_SELF']}?action=edit&mon_id=$mon_id&sub_dev_id={$_REQUEST['sub_dev_id']}&tripid={$_REQUEST['tripid']}", "", "edit") . " " . formatted_link("Delete","javascript:del('$java_name', '$mon_id')", "", "delete")) ); // end make_display_item(); $mon_count++; } // end for each monitor make_checkbox_command("", 5, array("text" => "Duplicate", "action" => "multiduplicate"), array("text" => "Delete", "action" => "multidodelete", "prompt" => "Are you sure you want to delete the checked monitors?") ); // end make_checkbox_command make_status_line("monitor", $mon_count); ?>
function validateform() { if (document.editform.min_val.value != 'U' && document.editform.max_val.value != 'U' && document.editform.min_val.value >= document.editform.max_val.value) { alert('Minimum not allowed to be greater than or equal to Maximum'); return false; } return true; } function make_min_undefined() { document.editform.min_val.value = 'U'; } function make_max_undefined() { document.editform.max_val.value = 'U'; } "; make_edit_select_test($mon_row['test_type'], $mon_row['test_id'], $mon_row['test_params']); make_edit_group("Graphing Options"); make_edit_select_from_table("Data Type:", "data_type", "data_types", $mon_row["data_type"]); make_edit_text("Minimum Value:", "min_val", "10", "20", $mon_row["min_val"]); make_edit_text("Maximum Value:", "max_val", "10", "20", $mon_row["max_val"]); make_edit_label('[make minimum undefined] [make maximum undefined]'); make_edit_group("Ownership"); if ($_REQUEST["edit_subdevice"] == 1) { make_edit_select_subdevice($_REQUEST["sub_dev_id"]); } else { $label = "Subdevice:
"; $label .= get_dev_sub_device_name($_REQUEST['sub_dev_id']); $label .= " [change]
"; make_edit_label($label); make_edit_hidden("subdev_id[]", $_REQUEST["sub_dev_id"]); } make_edit_hidden("action","doedit"); make_edit_hidden("mon_id",$_REQUEST["mon_id"]); make_edit_hidden("sub_dev_id",$_REQUEST["sub_dev_id"]); make_edit_hidden("tripid",$_REQUEST["tripid"]); make_edit_submit_button(); make_edit_end(); end_page(); } // end edit(); function redirect() { header("Location: monitors.php?sub_dev_id={$_REQUEST['sub_dev_id']}&tripid={$_REQUEST['tripid']}"); } // end redirect() function do_edit() { if ($_REQUEST["mon_id"] == 0) { $db_cmd = "INSERT INTO"; $db_end = ""; } else { $db_cmd = "UPDATE"; $db_end = "WHERE id='{$_REQUEST['mon_id']}'"; } if ($_REQUEST["min_val"] == "U") { $_REQUEST["min_val"] = "NULL"; } if ($_REQUEST["max_val"] == "U") { $_REQUEST["max_val"] = "NULL"; } db_update("$db_cmd monitors SET sub_dev_id='{$_REQUEST['subdev_id'][0]}', test_type='{$_REQUEST['test_type']}', test_id='{$_REQUEST['test_id']}', test_params='" . $_REQUEST['test_params'] ."', data_type='{$_REQUEST['data_type']}', min_val={$_REQUEST['min_val']}, max_val={$_REQUEST['max_val']}, tuned=0 $db_end"); } // end do_edit() ?> netmrg-0.20/www/webfiles/enclose_graph.php0000664000076400007640000000770307774170011021076 0ustar silfreedsilfreed'); echo('
'); echo('Show History
'); if ($_REQUEST['type'] == 'template' || $_REQUEST['type'] == 'custom') { echo('Dissect
'); } echo('Advanced
'); } function show_history() { $opts = template() . "type={$_REQUEST['type']}&id={$_REQUEST['id']}"; echo('
'); echo('
'); echo('
'); echo('
'); echo('
'); echo('

'); echo('Normal View
'); } function show_dissection() { $opts = template() . "type={$_REQUEST['type']}&id={$_REQUEST['id']}"; $dbq = db_query("SELECT id FROM graph_ds WHERE graph_id = '{$_REQUEST['id']}' AND mon_id != -2 ORDER BY position, id"); echo('
'); while ($dbr = mysql_fetch_array($dbq)) { echo('
'); } echo('

'); echo('Normal View
'); } function show_advanced() { if (!isset($_REQUEST['start'])) { $_REQUEST['start'] = "+yesterday"; } if (!isset($_REQUEST['end'])) { $_REQUEST['end'] = "+5 minutes ago"; } if (!isset($_REQUEST['min'])) { $_REQUEST['min'] = "0"; } if (!isset($_REQUEST['max'])) { $_REQUEST['max'] = "0"; } $opts = template() . "type={$_REQUEST['type']}&id={$_REQUEST['id']}&start={$_REQUEST['start']}&"; $opts .= "end={$_REQUEST['end']}&min={$_REQUEST['min']}&max={$_REQUEST['max']}"; echo('
'); echo('

'); echo('
'); make_edit_hidden("action", "advanced"); make_edit_hidden("type", $_REQUEST['type']); make_edit_hidden("id", $_REQUEST['id']); if ($_REQUEST['type'] == "template") { make_edit_hidden("subdev_id", $_REQUEST['subdev_id']); } echo('Start:  '); echo('End:  '); echo('Max:  '); echo('Min:   '); echo('
'); echo('
'); echo('Normal View
'); } end_page(); ?> netmrg-0.20/www/Makefile.in0000664000076400007640000002504311000016361015776 0ustar silfreedsilfreed# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # These settings are pulled into Makefile.in by automake VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Make.inc subdir = www ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(netmrg_wwwdir)" nobase_netmrg_wwwDATA_INSTALL = $(install_sh_DATA) DATA = $(nobase_netmrg_www_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RRDTOOL = @RRDTOOL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WWWDIR = @WWWDIR@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_MAKEFLAGS = \ ` test "$(VERBOSE)" = "1" && echo $(ECHO_N) "" \ || echo $(ECHO_N) "-s" ` # options to install files in the www directory netmrg_wwwdir = @WWWDIR@ nobase_netmrg_www_DATA = include lib webfiles all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Make.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign www/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign www/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-nobase_netmrg_wwwDATA: @$(NORMAL_UNINSTALL) @$(am__vpath_adj_setup) \ list='$(nobase_netmrg_www_DATA)'; for p in $$list; do \ $(am__vpath_adj) \ echo " rm -f '$(DESTDIR)$(netmrg_wwwdir)/$$f'"; \ rm -f "$(DESTDIR)$(netmrg_wwwdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(netmrg_wwwdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-nobase_netmrg_wwwDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_netmrg_wwwDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nobase_netmrg_wwwDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-nobase_netmrg_wwwDATA @SET_MAKE@ # override the default netmrg_www install install-nobase_netmrg_wwwDATA: $(nobase_netmrg_www_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(netmrg_wwwdir) @echo " INST $(nobase_netmrg_www_DATA)" @list='$(nobase_netmrg_www_DATA)'; for p in `find $$list -name 'CVS' -prune -o -name '*\.in' -prune -o -name 'Makefile*' -prune -o -type f -print`; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \ $(nobase_netmrg_wwwDATA_INSTALL) $$d$$p $(DESTDIR)$(netmrg_wwwdir)/$$f; \ else :; fi; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: netmrg-0.20/www/Makefile.am0000664000076400007640000000145610303005040015764 0ustar silfreedsilfreed@SET_MAKE@ include $(top_srcdir)/Make.inc # options to install files in the www directory netmrg_wwwdir=@WWWDIR@ nobase_netmrg_www_DATA = include lib webfiles # override the default netmrg_www install install-nobase_netmrg_wwwDATA: $(nobase_netmrg_www_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(netmrg_wwwdir) @echo " INST $(nobase_netmrg_www_DATA)" @list='$(nobase_netmrg_www_DATA)'; for p in `find $$list -name 'CVS' -prune -o -name '*\.in' -prune -o -name 'Makefile*' -prune -o -type f -print`; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \ $(nobase_netmrg_wwwDATA_INSTALL) $$d$$p $(DESTDIR)$(netmrg_wwwdir)/$$f; \ else :; fi; \ done netmrg-0.20/www/include/0000775000076400007640000000000011000016355015353 5ustar silfreedsilfreednetmrg-0.20/www/include/config.php.in0000664000076400007640000000625510447321376017766 0ustar silfreedsilfreed netmrg-0.20/www/include/config_site-dist.php0000664000076400007640000000116310156172335021333 0ustar silfreedsilfreed netmrg-0.20/www/lib/0000775000076400007640000000000011000016355014476 5ustar silfreedsilfreednetmrg-0.20/www/lib/misc.php0000664000076400007640000000243610263073103016153 0ustar silfreedsilfreed'); return $img; } // end get_img_tag_from_status() function get_color_from_situation($situation) { switch ($situation) { case 0: $color = "blue"; break; case 1: $color = "green"; break; case 2: $color = "yellow"; break; case 3: $color = "red"; break; default: $color = "blue"; break; } // end switch situation return $color; } // end get_color_from_situation() // seed with microseconds function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } function htmlcolor_to_rgb($htmlcolor) { $c = str_replace("#", "", $htmlcolor); $r1 = substr($c,0,2); $g1 = substr($c,2,2); $b1 = substr($c,4,2); $r = hexdec($r1); $g = hexdec($g1); $b = hexdec($b1); return array("r" => $r, "g" => $g, "b" => $b); } function rgb_to_htmlcolor($r, $g, $b) { return sprintf("#%02x%02x%02x", $r, $g, $b); } ?> netmrg-0.20/www/lib/auth.php0000664000076400007640000002071410361027217016164 0ustar silfreedsilfreed 0) { $auth_valid = true; } else { $auth_valid = false; } // end if we have a result or not return $auth_valid; } // end check_user(); /** * check_user_pass($user, $pass); * * verifies a username and password agains what's in the database * $user = username * $pass = password */ function check_user_pass($user, $pass) { $auth_valid = false; $auth_select = "SELECT 1 FROM user WHERE user='$user' AND pass=MD5('$pass')"; $auth_result = db_query($auth_select); if (db_num_rows($auth_result) > 0) { $auth_valid = true; } else { $auth_valid = false; } // end if we have a result or not return $auth_valid; } // end check_user_pass() /** * IsLoggedIn(); * * verifies a username and password in the session * against what's in the database * and that the user isn't spoofing their ip * and that they haven't been logged in too long */ function IsLoggedIn() { if (( ($GLOBALS["netmrg"]["externalAuth"] && (check_user($_SESSION["netmrgsess"]["username"]) || check_user($GLOBALS["netmrg"]["defaultMapUser"]))) || (!$GLOBALS["netmrg"]["externalAuth"] && check_user_pass($_SESSION["netmrgsess"]["username"], $_SESSION["netmrgsess"]["password"])) ) && $_SESSION["netmrgsess"]["remote_addr"] == $_SERVER["REMOTE_ADDR"] && time() - $_SESSION["netmrgsess"]["accessTime"] <= $GLOBALS["netmrg"]["authTimeout"]) { return true; } // end if the username/password checks out and the ips match return false; } // end IsLoggedIn(); /** * get_full_name($user) * * gets $user's full name */ function get_full_name($user) { $q = db_query("SELECT fullname FROM user WHERE user='$user'"); $r = db_fetch_array($q); return $r["fullname"]; } // end get_full_name() /** * check_auth($level) * * checks the logged in user's auth level to be sure they have * at least auth level $level. If not, send them away */ function check_auth($level) { // if they aren't logged in if (!IsLoggedIn()) { $_SESSION["netmrgsess"]["redir"] = $_SERVER["REQUEST_URI"]; if ($GLOBALS["netmrg"]["externalAuth"]) { header("Location: {$GLOBALS['netmrg']['webroot']}/login.php"); exit(0); } // end if externalauth header("Location: {$GLOBALS['netmrg']['webroot']}/error.php?action=invalid"); exit(0); } // end if they aren't logged in // if they don't have enough permissions else if ($_SESSION["netmrgsess"]["permit"] < $level) { header("Location: {$GLOBALS['netmrg']['webroot']}/error.php?action=denied"); exit(0); } // end if they don't have enough permissions } // end check_auth() /** * viewCheckAuth($object_id, $object_type) * * called from the 'view.php' page * checks that the user is allowed to see this page */ function viewCheckAuth($object_id, $object_type) { global $PERMIT; check_auth($GLOBALS['PERMIT']["SingleViewOnly"]); // the groups this object_id is in $object_id_groups = GetGroups($object_type,$object_id); if (!in_array($_SESSION["netmrgsess"]["group_id"], $object_id_groups) && $_SESSION["netmrgsess"]["permit"] == $PERMIT["SingleViewOnly"]) { return false; } // end if allowed group id is not in this objects groups and we're SVO return true; } // end viewCheckAuth() /** * viewCheckAuthRedirect($object_id, $object_type) * * called from the 'view.php' page * checks that the user is allowed to see this page * and redirects if they are not */ function viewCheckAuthRedirect($object_id, $object_type) { if (!viewCheckAuth($object_id, $object_type)) { $_SESSION["netmrgsess"]["redir"] = $_SERVER["REQUEST_URI"]; header("Location: {$GLOBALS['netmrg']['webroot']}/error.php?action=denied"); exit; } // end if not authorized } // end viewCheckAuthRedirect() /** * EncloseGraphCheckAuth() * * makes sure that the logged in user can view a graph * * type = template, custom, mon, tinymon * id = id of item * */ function EncloseGraphCheckAuth($type, $id) { global $PERMIT; check_auth($GLOBALS['PERMIT']["SingleViewOnly"]); // the groups this object_id is in $object_id_groups = array(); switch ($type) { case "mon" : case "tinymon" : $object_id_groups = GetGroups("monitor",$id); break; case "template" : $object_id_groups = GetGroups("subdevice",$id); break; case "custom" : $object_id_groups = GetGroups("customgraph",$id); break; } // end switch graph type if (!in_array($_SESSION["netmrgsess"]["group_id"], $object_id_groups) && $_SESSION["netmrgsess"]["permit"] == $PERMIT["SingleViewOnly"]) { $_SESSION["netmrgsess"]["redir"] = $_SERVER["REQUEST_URI"]; header("Location: {$GLOBALS['netmrg']['webroot']}/error.php?action=denied"); exit; } } // end EncloseGraphCheckAuth(); /** * GraphCheckAuth() * * makes sure that the logged in user can view a graph * * type = template, custom, mon, tinymon * id = id of item * */ function GraphCheckAuth($type, $id) { global $PERMIT; check_auth($GLOBALS['PERMIT']["SingleViewOnly"]); // the groups this object_id is in $object_id_groups = array(); switch ($type) { case "mon" : case "tinymon" : $object_id_groups = GetGroups("monitor",$id); break; case "template" : case "template_item" : $object_id_groups = GetGroups("subdevice",$id); break; case "custom" : case "custom_item" : $object_id_groups = GetGroups("customgraph",$id); break; } // end switch graph type if (!in_array($_SESSION["netmrgsess"]["group_id"], $object_id_groups) && $_SESSION["netmrgsess"]["permit"] == $PERMIT["SingleViewOnly"]) { readfile($GLOBALS["netmrg"]["fileroot"]."/webfiles/img/access_denied.png"); exit; } } // end GraphCheckAuth(); /** * ResetAuth() * * reset authentication variables */ function ResetAuth() { if (isset($_SESSION["netmrgsess"])) { unset($_SESSION["netmrgsess"]); $_SESSION["netmrgsess"] = array(); $_SESSION["netmrgsess"]["username"] = ""; $_SESSION["netmrgsess"]["password"] = ""; $_SESSION["netmrgsess"]["remote_addr"] = ""; $_SESSION["netmrgsess"]["permit"] = ""; $_SESSION["netmrgsess"]["accessTime"] = ""; } // end if isset netmrg session } // end ResetAuth() /** * get_permit($user) * * gets the user's permission level */ function get_permit($user) { if (IsLoggedIn()) { global $PERMIT; if ($GLOBALS["netmrg"]["verhist"][$GLOBALS["netmrg"]["dbversion"]] >= $GLOBALS["netmrg"]["verhist"]["0.17"]) { $sql = "SELECT IF(disabled=0, permit, '".$PERMIT["Disabled"]."') AS permit FROM user WHERE user='".$user."'"; } // end if the disabled column works else { $sql = "SELECT permit FROM user WHERE user='".$user."'"; } // end if no disabled column $handle = db_query($sql); $row = db_fetch_array($handle); return $row["permit"]; } // end if there is somebody logged in, get their permissions return false; } // end get_permit() /** * GetUserID() * * gets the user id of the logged in user */ function GetUserID() { if (IsLoggedIn()) { $sql = "SELECT id FROM user WHERE user='" . $_SESSION["netmrgsess"]["username"] . "'"; $handle = db_query($sql); $row = db_fetch_array($handle); return empty($row["id"]) ? false : $row["id"]; } // end IsLoggedIn return false; } // end GetUserID() /** * get_group_id() * * gets the group id of the logged in user * $user = the username of get info on */ function get_group_id($user = "") { if (empty($user)) { $user = $_SESSION["netmrgsess"]["username"]; } // end if no user set if (IsLoggedIn()) { $sql = "SELECT group_id FROM user WHERE user='$user'"; $handle = db_query($sql); $row = db_fetch_array($handle); return $row["group_id"]; } // end IsLoggedIn return false; } // end get_group_id() /** * view_redirect() * * redirects the logged in user to the 'view' page * if they only have 'single view' priviledges or they * weren't on their way to somewhere else */ function view_redirect() { if (empty($_SESSION["netmrgsess"]["redir"]) || ($_SESSION["netmrgsess"]["permit"] == 0)) { header("Location: {$GLOBALS['netmrg']['webroot']}/device_tree.php"); exit(0); } else { $redir = $_SESSION["netmrgsess"]["redir"]; unset($_SESSION["netmrgsess"]["redir"]); header("Location: $redir"); exit(0); } // end if we don't have a redir page or we do } // end view_redirect() ?> netmrg-0.20/www/lib/static.php0000664000076400007640000004423610772742446016535 0ustar silfreedsilfreed 1, "0.10pre2" => 2, "0.10" => 3, "0.12" => 4, "0.13" => 5, "0.14" => 6, "0.15" => 7, "0.16" => 8, "0.17" => 9, "0.18" => 10, "0.18.1" => 11, "0.18.2" => 12, "0.19" => 13, "0.19.1" => 14, "0.20" => 15, ); // end verhist $MENU = array( "Reporting" => array( array("name" => "Tree", "link" => "device_tree.php", "descr" => "", "authLevelRequired" => 0), // array("name" => "Device", "link" => "device_centered.php", "descr" => "", "authLevelRequired" => 0), array("name" => "Log", "link" => "event_log.php", "descr" => "Display a list of the most recent events.", "authLevelRequired" => 1), array("name" => "Slide Show", "link" => "view.php?action=slideshow&type=0", "descr" => "Displays all devices, one page at a time.", "authLevelRequired" => 1), array("name" => "Search", "link" => "search.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "View", "link" => "view.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Enclose Graph", "link" => "enclose_graph.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Display Graph", "link" => "get_graph.php", "descr" => "", "authLevelRequired" => 0, "display" => false) ), "Admin" => array( array("name" => "Devices", "link" => "grpdev_list.php", "descr" => "", "authLevelRequired" => 1), array("name" => "Device Types", "link" => "dev_types.php", "descr" => "", "authLevelRequired" => 2), array("name" => "Device Properties", "link" => "dev_props.php", "descr" => "", "authLevelRequired" => 2, "display" => false), array("name" => "Notifications", "link" => "notifications.php", "descr" => "", "authLevelRequired" => 1), array("name" => "Custom Graphs", "link" => "graphs.php?type=custom", "descr" => "", "authLevelRequired" => 1), array("name" => "Template Graphs", "link" => "graphs.php?type=template", "descr" => "", "authLevelRequired" => 1), array("name" => "Script", "link" => "tests_script.php", "descr" => "External Programs", "authLevelRequired" => 2), array("name" => "SNMP", "link" => "tests_snmp.php", "descr" => "SNMP Queries", "authLevelRequired" => 2), array("name" => "SQL", "link" => "tests_sql.php", "descr" => "Database Queries", "authLevelRequired" => 2), array("name" => "Users", "link" => "users.php", "descr" => "User Management", "authLevelRequired" => 3), array("name" => "Legacy Device Admin", "link" => "devices.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Legacy Group Admin", "link" => "groups.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Color Picker", "link" => "color_dialog.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Conditions", "link" => "conditions.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Events", "link" => "events.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Graph", "link" => "graphs.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Graph Items", "link" => "graph_items.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Monitors", "link" => "monitors.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Recache", "link" => "recache.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Responses", "link" => "responses.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "SNMP Cache View", "link" => "snmp_cache_view.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Sub-Devices", "link" => "sub_devices.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Sub-Device Parameters", "link" => "sub_dev_param.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Web Updater", "link" => "updater.php", "descr" => "", "authLevelRequired" => 0, "display" => false) ), "Prefs" => array( array("name" => "Prefs", "link" => "user_prefs.php", "descr" => "Personal Preferences", "authLevelRequired" => 0) ), "Logout" => array( array("name" => "Logout", "link" => "logout.php", "descr" => "End your NetMRG Session.", "authLevelRequired" => 0), array("name" => "Login", "link" => "login.php", "descr" => "", "authLevelRequired" => 0, "display" => false) ), "Help" => array( array("name" => "About", "link" => "about.php", "descr" => "", "authLevelRequired" => 0), array("name" => "Manual", "link" => "http://wiki.netmrg.net/wiki/Users_Manual", "descr" => "", "authLevelRequired" => 0), array("name" => "Forum", "link" => "http://lists.netmrg.net/", "descr" => "Benefit from the NetMRG Community.", "authLevelRequired" => 0), array("name" => "Bugs", "link" => "http://bugs.netmrg.net/", "descr" => "Report bugs and request features.", "authLevelRequired" => 0), array("name" => "Contributions", "link" => "contributors.php", "descr" => "", "authLevelRequired" => 0, "display" => false), array("name" => "Error", "link" => "error.php", "descr" => "", "authLevelRequired" => 0, "display" => false) ) ); // end $MENU // add a dynamic 'resume slide show' link $rss_action = (!empty($_REQUEST["action"]) && $_REQUEST["action"] == "slideshow") ? "slideshow" : ""; if ( !empty($_SESSION["netmrgsess"]["slideshow"]) && count($_SESSION["netmrgsess"]["slideshow"]["views"]) != $_SESSION["netmrgsess"]["slideshow"]["current"] && $_SESSION["netmrgsess"]["slideshow"]["current"] != 0 && $rss_action != "slideshow") { $rss_jump = $_SESSION["netmrgsess"]["slideshow"]["current"] - 1; array_push($MENU["Reporting"], array("name" => "  Resume Slide Show", "link" => "view.php?action=slideshow&jump=$rss_jump", "descr" => "Resumes slide show in progress.", "authLevelRequired" => 1)); } // end if in the middle of a slide show // local menu created by CreateLocalMenu() // for just this user with their entries they can see $LOCAL_MENU = array(); // the current main nav group we're under $LOCAL_MENU_CURTREE; $LOCAL_MENU_CURITEM; $PERMIT = array( 'Disabled' => -1, 'SingleViewOnly' => 0, 'ReadAll' => 1, 'ReadWrite' => 2, 'Admin' => 3 ); // end $PERMIT $ALIGN_ARRAY = array( 1 => "Left", 2 => "Right", 3 => "Right Split" ); // end ALIGN_ARRAY $RRDTOOL_ITEM_TYPES = array( 1 => "LINE1", 2 => "LINE2", 3 => "LINE3", 4 => "AREA", 5 => "STACK" ); // end RRDTOOL_ITEM_TYPES $RRDTOOL_CFS = array( 1 => "AVERAGE", 2 => "MAX" ); // end RRDTOOL_CFS $SPECIAL_MONITORS = array( -1 => "-Fixed Value-", -2 => "-Sum of all graph items-" ); // end SPECIAL_MONITORS $TEST_TYPES = array( 1 => "Script", 2 => "SNMP", 3 => "SQL", 4 => "Internal" ); // end TEST_TYPES $PERMIT_TYPES = array( $PERMIT["SingleViewOnly"] => "Single View Only", $PERMIT["ReadAll"] => "Read All", $PERMIT["ReadWrite"] => "Read/Write", $PERMIT["Admin"] => "Read/Write/User Admin" ); // end PERMIT_TYPES $SUB_DEVICE_TYPES = array( 1 => "Group", 2 => "Network Interface", 3 => "Disk" ); // end SUB_DEVICE_TYPES // bread crumb type order $BC_TYPES = array( "group" => 0, "device" => 1, "int_snmp_cache_view" => 2, "disk_snmp_cache_view" => 2, "sub_device" => 3, "monitor" => 4, "event" => 5 ); // end BC_TYPES $TRIGGER_TYPES = array( 1 => "On Change", 2 => "Never (disabled)" ); // end TRIGGER_TYPES $SITUATIONS = array( 0 => "Disabled", 1 => "Normal", 2 => "Warning", 3 => "Critical" ); // end SITUATIONS $LOGIC_CONDITIONS = array( 0 => "AND", 1 => "OR" ); // end LOGIC_CONDITIONS $CONDITIONS = array( 0 => "<", 1 => "=", 2 => ">", 3 => "≤", 4 => "≠", 5 => "≥" ); // end CONDITIONS $VALUE_TYPES = array( 0 => "Current Value", 1 => "Delta Value", 2 => "Rate of Change", 3 => "Last Value" ); // end VALUE_TYPES $VIEW_ITEM_TYPES = array( 'graph' => "Graph", 'template' => "Templated Graph", 'separator' => "Separator" ); // end VIEW_TIME_TYPES $INTERFACE_STATUS = array( 1 => "Up", 2 => "Down", 3 => "Testing", 4 => "Unknown", 5 => "Dormant", 6 => "Not Present", 7 => "Lower Layer Down" ); // end INTERFACE_STATUS $INTERFACE_TYPE = array( 1 => "Other", 6 => "Ethernet", 15 => "FDDI", 18 => "DS1", 20 => "BRI", 21 => "PRI", 22 => "PTP Serial", 23 => "PPP", 24 => "Loopback", 28 => "SLIP", 32 => "Frame Relay", 33 => "RS232", 37 => "ATM", 39 => "SDH", 45 => "V.35", 46 => "HSSI", 47 => "HIPPI", 49 => "AAL5", 53 => "Virtual", 71 => "802.11", 107 => "IMA", 117 => "Gigabit Ethernet", 134 => "ATM Subinterface" ); // end INTERFACE_TYPE $SNMP_VERSIONS = array( 0 => "No SNMP Support", 1 => "SNMPv1", 2 => "SNMPv2c"/*, 3 => "SNMPv3"*/ ); // end SNMP_VERSIONS $RECACHE_METHODS = array( 0 => "Never refresh cache", 1 => "Refresh on SNMP agent restart", 2 => "Refresh on interface count change", 3 => "Refresh on interface count mismatch", 4 => "Always refresh cache" ); // end RECACHE_METHODS $SCRIPT_DATA_TYPES = array( 1 => "Error Code", 2 => "Standard Out" ); // end SCRIPT_DATA_TYPES // searches through various types looking for |ARG| // |ARG| should already by escaped before being used in these queries // SQL statements should return two items; the id and the matched name $SEARCH_ITEMS = array( 'group' => array( 'name' => "Group", 'sql' => array("SELECT id, name FROM groups WHERE name LIKE '%|ARG|%'") ), 'device' => array( 'name' => "Device", 'sql' => array("SELECT id, name FROM devices WHERE name LIKE '%|ARG|%' OR ip LIKE '%|ARG|%'", "SELECT dev_id AS id, name FROM dev_prop_vals val LEFT JOIN devices dev ON val.dev_id=dev.id WHERE value LIKE '%|ARG|%'") ), 'subdevice' => array( 'name' => "Sub Device", 'sql' => array("SELECT id, name FROM sub_devices WHERE name LIKE '%|ARG|% GROUP BY id'", "SELECT sub_dev_id AS id, CONCAT(name, ' - ', value) AS name FROM sub_dev_variables WHERE value LIKE '%|ARG|%' GROUP BY sub_dev_id") ) ); // end SEARCH_ITEMS $TIMEFRAME_DAILY = array( 'name' => "Daily", 'start_time' => "-108000", 'end_time' => "-360", 'break_time' => (time() - (date("s") + date("i") * 60 + date("H") * 3600)), 'sum_label' => "24 Hour", 'sum_time' => "86400", 'show_max' => false ); // end TIMEFRAME_DAILY $TIMEFRAME_WEEKLY = array( 'name' => "Weekly", 'start_time' => "-777600", 'end_time' => "-360", 'break_time' => (time() - (date("s") + date("i") * 60 + date("H") * 3600 + date("w") * 86400)), 'sum_label' => "7 Day", 'sum_time' => "604800", 'show_max' => true ); // end TIMEFRAME_WEEKLY $TIMEFRAME_MONTHLY = array( 'name' => "Monthly", 'start_time' => "-3628800", 'end_time' => "-360", 'break_time' => (time() - (date("s") + date("i") * 60 + date("H") * 3600 + date("d") * 86400)), 'sum_label' => "4 Week", 'sum_time' => "2419200", 'show_max' => true ); // end TIMEFRAME_MONTHLY $TIMEFRAME_YEARLY = array( 'name' => "Yearly", 'start_time' => "-36720000", 'end_time' => "-360", 'break_time' => (time() - (date("s") + date("i") * 60 + date("H") * 3600 + date("z") * 86400)), 'sum_label' => "1 Year", 'sum_time' => "31536000", 'show_max' => true ); // end TIMEFRAME_YEARLY $TIMEFRAMES = array( $TIMEFRAME_DAILY, $TIMEFRAME_WEEKLY, $TIMEFRAME_MONTHLY, $TIMEFRAME_YEARLY ); // Return the path to an image based on the internal name of the image. function get_image_by_name($img_name) { $image = ""; switch ($img_name) { // graphics case "applytemplate" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['applytemplate']}"; break; case "edit" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['edit']}"; break; case "logo" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['logo']}"; break; case "delete" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['delete']}"; break; case "disk" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['disk']}"; break; case "duplicate" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['duplicate']}"; break; case "parameters" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['parameters']}"; break; case "arrow-up" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-up']}"; break; case "arrow-right" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-right']}"; break; case "arrow-down" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-down']}"; break; case "arrow-left" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-left']}"; break; case "arrow-up-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-up-disabled']}"; break; case "arrow-right-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-right-disabled']}"; break; case "arrow-down-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-down-disabled']}"; break; case "arrow-left-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow-left-disabled']}"; break; case "arrow_limit-up" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-up']}"; break; case "arrow_limit-right" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-right']}"; break; case "arrow_limit-down" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-down']}"; break; case "arrow_limit-left" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-left']}"; break; case "arrow_limit-up-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-up-disabled']}"; break; case "arrow_limit-right-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-right-disabled']}"; break; case "arrow_limit-down-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-down-disabled']}"; break; case "arrow_limit-left-disabled" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['arrow_limit-left-disabled']}"; break; case "slideshow" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['slideshow']}"; break; case "recachedisk" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['recachedisk']}"; break; case "recacheproperties" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['recacheproperties']}"; break; case "viewdisk" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['viewdisk']}"; break; case "recacheinterface" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['recacheinterface']}"; break; case "viewinterface" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['viewinterface']}"; break; case "view" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['view']}"; break; case "viewgraph-on" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['viewgraph-on']}"; break; case "viewgraph-off" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['viewgraph-off']}"; break; // LEDs case "blue_led_on" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-unknown-trig']}"; break; case "blue_led_off" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-unknown-untrig']}"; break; case "green_led_on" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-good-trig']}"; break; case "green_led_off" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-good-untrig']}"; break; case "yellow_led_on" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-warning-trig']}"; break; case "yellow_led_off" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-warning-untrig']}"; break; case "red_led_on" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-critical-trig']}"; break; case "red_led_off" : $image = "{$GLOBALS['netmrg']['imagedir']}/{$GLOBALS['netmrg']['imagespec']['status-critical-untrig']}"; break; // Tree Expand/Collapse case "hide" : $image = "{$GLOBALS['netmrg']['staticimagedir']}/hide.gif"; break; case "show" : $image = "{$GLOBALS['netmrg']['staticimagedir']}/show.gif"; break; } return $image; } // end get_image_by_name(); $alt_color = 0; function get_color_by_name($color_name) { GLOBAL $alt_color; $color = "#FFFFFF"; switch ($color_name) { case "site_background" : $color = "#EDEBEB"; break; case "site_text" : $color = "#000000"; break; case "site_link" : $color = "#076D07"; break; case "site_vlink" : $color = "#076D07"; break; case "site_alink" : $color = "#FF0000"; break; case "edit_header" : $color = "#000088"; break; case "edit_fields" : { if ($alt_color == 0) { $alt_color = 1; $color = "#CECECE"; } else { $alt_color = 0; $color = "#E4E4E4"; } break; } case "edit_header_text" : $color = "#C0C0C0"; break; case "edit_main_header" : $color = "#005000"; break; case "edit_main_header_text" : $color = "#C0C0C0"; break; case "menu_background" : $color = "#D9D9D9"; break; } return $color; } // end get_color_by_name ?> netmrg-0.20/www/lib/format.php0000664000076400007640000011646710774565003016536 0ustar silfreedsilfreed * @author Douglas E. Warner */ /********************************************* * * Site-Wide Display Functions * *********************************************/ /** * begin_page() * * starts the page w/ basic HTML * * @param string $pagename page that this is * @param string $prettyname shown in the title bar * @param boolean $refresh whether to refresh this page or not * @param string $bodytags options for the tag */ function begin_page($pagename = "", $prettyname = "", $refresh = false, $bodytags = "", $javascript_files = array()) { // gather errors from prerequisits being met or not $prereqs_errors = PrereqsMet(); $display_menu = false; // always include these javascripts $extra_jscript_files = $javascript_files; $javascript_files = array(); $javascript_files[] = 'onload.js'; $javascript_files[] = 'inputdefault.js'; $javascript_files[] = 'xajax.js'; $javascript_files[] = 'select.js'; $javascript_files = array_merge($javascript_files, $extra_jscript_files); // determine if we should display the menu or not $display_menu = (IsLoggedIn() && !UpdaterNeedsRun() && count($prereqs_errors) == 0); DisplayPageHeader($pagename, $prettyname, $refresh, $display_menu, $bodytags, $javascript_files); ?>
tag */ function DisplayPageHeader($pagename = "", $prettyname = "", $refresh = false, $display_menu = false, $bodytags = "", $javascript_files = array()) { echo ''."\n"; ?> <?php print GetPageTitle($prettyname); ?> /include/netmrg.css" /> printJavascript("", "xajax_js/xajax.js", ""); if (count($javascript_files) > 0) { foreach ($javascript_files as $jsfile) { echo ' '."\n"; } // end foreach jsfile } // end if we have javascript to load ?> >  '."\n"; } // end DisplayPageHeader(); /** * DisplayTopMenu(); * * Displays a menu bar along the top of the page */ function DisplayTopMenu() { global $LOCAL_MENU, $LOCAL_MENU_CURTREE, $LOCAL_MENU_CURITEM; CreateLocalMenu(); echo '
'."\n"; echo "
    \n"; while (list($menuname, $menuitems) = each($LOCAL_MENU)) { echo '
  • '; echo $menuname; echo "
  • \n"; } // end while we still have menu items echo "
\n\n"; echo "  \n"; echo '
'."\n"; echo "
\n\n"; echo '
'."\n"; echo " \n\n"; echo "  \n"; echo '
'."\n"; echo "
\n\n"; } // end DisplayTopMenu(); /** * PrepGroupNavHistory($type, $id) * * prepares a nav bar that is used along the tops of the pages under 'Groups' * and keeps a history of where you've been * * $type = (group, device, int_snmp_cache_view, disk_snmp_cache_view, * sub_device, monitor, event) * $id = */ function PrepGroupNavHistory($type, $id) { global $BC_TYPES; // default trip id if (empty($_REQUEST["tripid"])) { srand(make_seed()); $_REQUEST["tripid"] = md5(time()*rand()); } // end if no trip id $tripid = $_REQUEST["tripid"]; // setup array to hold group nav if (!isset($_SESSION["netmrgsess"]["grpnav"])) { $_SESSION["netmrgsess"]["grpnav"] = array(); } // end if no group nav array if (!isset($_SESSION["netmrgsess"]["grpnav"][$tripid])) { $_SESSION["netmrgsess"]["grpnav"][$tripid] = array(); } // end if no group nav trip array // push type onto breadcrumbs /** * breadcrumbs = array( * "type" => (group|device|sub_device|monitor|event), * "id" => x * ); */ $last_type = ""; $last_id = ""; if (count($_SESSION["netmrgsess"]["grpnav"][$tripid]) != 0) { $last_type = $_SESSION["netmrgsess"]["grpnav"][$tripid][count($_SESSION["netmrgsess"]["grpnav"][$tripid])-1]["type"]; $last_id = $_SESSION["netmrgsess"]["grpnav"][$tripid][count($_SESSION["netmrgsess"]["grpnav"][$tripid])-1]["id"]; } // end if we have some bread crumbs already if (count($_SESSION["netmrgsess"]["grpnav"][$tripid]) == 0 || $BC_TYPES[$last_type] <= $BC_TYPES[$type]) { if (($type == $last_type && $id != $last_id) || ($id == $last_id && $type != $last_type) || ($type != $last_type && $id != $last_id)) { $found = false; foreach ($_SESSION["netmrgsess"]["grpnav"][$tripid] as $triparr) { if ($triparr["type"] == $type && $triparr["id"] == $id) { $found = true; break; } // end if found our trip info } // end foreach trip breadcrumb if (!$found) { array_push($_SESSION["netmrgsess"]["grpnav"][$tripid], array("type" => $type, "id" => $id)); } // end if we haven't already pushed this item on } // end if type and id are different from last } // end if we can push the breadcrumb onto our history } // end PrepGroupNavHistory(); /** * DrawGroupNavHistory($type) * * draws a nav bar along the tops of the pages under 'Groups' * * $type = (group, device, int_snmp_cache_view, disk_snmp_cache_view, * sub_device, monitor, event) * $id = */ function DrawGroupNavHistory($type, $id) { global $BC_TYPES; $tripid = $_REQUEST["tripid"]; // loop through each breadcrumb and display it ?>
History $BC_TYPES[$type]) { $_SESSION["netmrgsess"]["grpnav"][$tripid] = array_slice($_SESSION["netmrgsess"]["grpnav"][$tripid], 0, $count); continue; } // end if we're past our current type // cut of extra groups if ($type == "group" && $breadcrumb["type"] == "group" && $breadcrumb["id"] != $id && !in_array($breadcrumb["id"], GetGroupParents($id)) ) { $_SESSION["netmrgsess"]["grpnav"][$tripid] = array_slice($_SESSION["netmrgsess"]["grpnav"][$tripid], 0, $count); break; } // end if group and not our parent or ourself // display the proper link switch ($breadcrumb["type"]) { case "event" : $t = ' : '; $t .= ''; $t .= get_event_name($breadcrumb["id"]); $t .= "\n"; print $t; break; case "monitor" : $t = ' : '; $t .= ''; $t .= get_short_monitor_name($breadcrumb["id"]); $t .= "\n"; print $t; break; case "int_snmp_cache_view" : $t = ' : '; $t .= ''; $t .= "interface cache"; $t .= "\n"; print $t; break; case "disk_snmp_cache_view" : $t = ' : '; $t .= ''; $t .= "disk cache"; $t .= "\n"; print $t; break; case "sub_device" : $t = ' : '; $t .= ''; $t .= get_sub_device_name($breadcrumb["id"]); $t .= "\n"; print $t; break; case "device" : $t = ' : '; $t .= ''; $t .= get_device_name($breadcrumb["id"]); $t .= "\n"; print $t; break; case "group" : $t = ' : '; $t .= ''; $t .= ($breadcrumb["id"] == 0) ? "All Groups" : get_group_name($breadcrumb["id"]); $t .= "\n"; print $t; break; } // end switch type $count++; } // end foreach breadcrumb ?>
Logged in as '; $logintext .= ''; $logintext .= space_to_nbsp($_SESSION["netmrgsess"]["prettyname"]); $logintext .= "\n"; } else { $logintext .= 'Not Logged In'."\n"; } // end if logged in or not return $logintext; } // end GetLoginInfo(); /** * CheckInstallState() * * checks things like whether the updater needs run and the * prerequisites are met before allowing you to view the rest * of the webpage * * @param array array of errors returned by prerequisite checks */ function CheckInstallState($prereqs_errors = array()) { global $PERMIT; // if we need to run the updater, don't do anything else if (IsLoggedIn() && (UpdaterNeedsRun() || count($prereqs_errors))) { if (UpdaterNeedsRun()) { if (strpos($_SERVER["PHP_SELF"], "updater.php") !== false) { echo "\n"; if ($_SESSION["netmrgsess"]["permit"] != $PERMIT['Admin']) { ?> This installation is currently unusable due to a recent upgrade. Please contact your administrator to have the rest of the upgrade performed.
logout
Your installation is currently in an unusable state; please proceed to update your installation here
logout
\n"; foreach ($prereqs_errors as $error) { echo ''.$error.'
'."\n"; } // end foreach prereq error end_page(); exit(); } // end if prereqs weren't met } // end if logged in and updater needs run or prereqs weren't met } // end CheckInstallState(); /** * MakeNavURI($name, $link, $title, $onclick, $alias=array()); * * makes a navigation uri link and will include #navcurrent id * if $link or items in $alias are equal to $_SERVER["SCRIPT_URL"] */ function MakeNavURI($name, $link, $title = "", $onclick = "", $alias=array()) { $currentid = ""; $a_title = ""; $a_onclick = ""; array_push($alias, $link); if (in_array(basename($_SERVER["SCRIPT_NAME"]), $alias)) { $currentid = ' class="navcurrent"'; } // end if we're at the current page if (!empty($title)) { $a_title = ' title="'.htmlentities($title).'"'; } // end if a title exists if (!empty($onclick)) { $a_onclick = ' onclick="'.addslashes($onclick).'"'; } // end if a title exists return ''.$name.''; } // end MakeNavURI(); /** * space_to_nbsp() * * converts all spaces in the string to non-breaking spaces * * @param string $input string w/ spaces to have replaced */ function space_to_nbsp($input) { return str_replace(" ", " ", $input); } // end space_to_nbsp(); /** * GetClassList($class_array) * * returns a string with the class items passed in $class_array() */ function GetClassList($class_array = array()) { $class_list = ""; if (count($class_array) > 0) { $class_list = ' class="'.implode(' ', $class_array).'"'; } // end if class items return $class_list; } // end GetClassList(); /********************************************* * * List Display Functions * *********************************************/ /** * make_display_table() * * displays the beginnings of a table with a specific title * * @param string $title the title of the table * @param string $addlink the link to use to add something if it doesn't * refer to this page * @param array $header_element an array containing 'text' describing the link * and 'href' that the text points at. this can be an * arbitrary number of array items, and they can be empty */ function make_display_table($title, $addlink = "") { $elements = array(); for ($item_num = 2; $item_num < func_num_args(); $item_num++) { $item = func_get_arg($item_num); array_push($elements, $item); } make_display_table_array($title, $elements, $addlink); } /** * make_display_table_array() * * displays the beginnings of a table with a specific title * * @param string $title the title of the table * @param array $elements an array of arrays containing 'text' describing the link * and 'href' that the text points at. this can be an * arbitrary number of array items, and they can be empty * @param string $addlink the link to use to add something if it doesn't * refer to this page */ function make_display_table_array($title, $elements, $addlink = "") { ?>
"> ">Add
[]"> ">
"$value $unit")); } #+++++++++++++++++++++++++++++++++++++++++++++ # # Edit Form Creation Functions # #+++++++++++++++++++++++++++++++++++++++++++++ function make_table_tag() { ?>
Checked Items:    <';javascript:if(window.confirm('')){document.form.submit();}" href="#">>
" method="post" name="editform">
>


value pairs to include at the beginning of the option list * $end_array_list = array of key=>value pairs to include at the end of the option list * $where = where clause for query */ function make_edit_select_from_table($header, $name, $table_name, $selected, $select_options = "", $begin_array_list = array(), $end_array_list = array(), $where = "1") { make_edit_select($header, $name, $select_options); // loop through things to put @ the beginning of the select box while (list($key, $value) = each($begin_array_list)) { make_edit_select_option($value, $key, ($key == $selected)); } // end while we have array list // Draw Select Options from SQL table DrawSelectOptionsFromSQL($table_name, $selected, $select_options, $where); // loop through things to put @ the end of the select box while (list($key, $value) = each($end_array_list)) { make_edit_select_option($value, $key, ($key == $selected)); } // end while we have array list make_edit_select_end(); } // end make_edit_select_end /** * Creates a select options with items named by the table's name field, and id'd by tables id field * * $table_name = mysql table field * $selected = row id to be selected (if any) * $select_options = things like javascript that apply to this select box * $where = where clause for query */ function DrawSelectOptionsFromSQL($table_name, $selected, $select_options="", $where="1") { $item_results = db_query("SELECT * FROM $table_name WHERE $where ORDER BY name,id"); $item_total = db_num_rows($item_results); for ($item_count = 1; $item_count <= $item_total; ++$item_count) { $item_row = db_fetch_array($item_results); $item_name = $item_row["name"]; $item_id = $item_row["id"]; $item_selected = ($item_id == $selected); make_edit_select_option($item_name, $item_id, $item_selected); } // end for } // end DrawSelectOptionsFromSQL(); /** * Makes edit control from an array * * $header = displayed header of the control * $name = name of the control within the form * $array_list = array of items to place in the control */ function make_edit_select_from_array($header, $name, $array_list, $selected, $select_options = "") { make_edit_select($header, $name, $select_options); // loop through things to put @ the end of the select box while (list($key, $value) = each($array_list)) { make_edit_select_option($value, $key, ($key == $selected)); } // end while we have array list make_edit_select_end(); } // Creates a form select control function make_edit_select_option($name, $value, $selected) { if ($selected) { ?>





' . $header . '
'); ?>

>


Monitor:
function redisplay(selectedIndex) { window.location = '{$_SERVER['PHP_SELF']}?mon_id={$_REQUEST['mon_id']}&sub_dev_id={$_REQUEST['sub_dev_id']}&dev_type={$_REQUEST['dev_type']}&tripid={$_REQUEST['tripid']}&action={$_REQUEST['action']}" . $dev_thingy . "&type=' + selectedIndex; } "; // if we've been passed a test type if (!empty($_REQUEST["type"])) { $test_type = $_REQUEST["type"]; } // end if test type is set // else default to test type 1 (script) else if (empty($test_type)) { $test_type = 1; } // end if no test type GLOBAL $TEST_TYPES; make_edit_select_from_array("Monitoring Type:", "test_type", $TEST_TYPES, $test_type, "onChange='redisplay(form.test_type.options[selectedIndex].value);'"); if ($test_type == 1) { make_edit_group("Script Options"); if ($_REQUEST["action"] == "add") { make_edit_select_from_table("Script Test:", "test_id", "tests_script", "dl4392l234"); } // end if adding else { make_edit_select_from_table("Script Test:", "test_id", "tests_script", $test_id); } // end if editing } if ($test_type == 2) { make_edit_group("SNMP Options"); if ($_REQUEST["action"] == "add") { make_edit_select_from_table("SNMP Test:", "test_id", "tests_snmp", "dl4392l234"); } // end if adding else { make_edit_select_from_table("SNMP Test:", "test_id", "tests_snmp", $test_id); } // end if editing } if ($test_type == 3) { make_edit_group("SQL Options"); if ($_REQUEST["action"] == "add") { make_edit_select_from_table("SQL Test:", "test_id", "tests_sql", "dl4392l234"); } // end if adding else { make_edit_select_from_table("SQL Test:", "test_id", "tests_sql", $test_id); } // end if editing } if ($test_type == 4) { make_edit_group("Internal Test Options"); if ($_REQUEST["action"] == "add") { make_edit_select_from_table("Internal Test:", "test_id", "tests_internal", "dl4392l234"); } // end if adding else { make_edit_select_from_table("Internal Test:", "test_id", "tests_internal", $test_id); } // end if editing } make_edit_text("Parameters:", "test_params", 50, 100, htmlspecialchars($test_params)); } // end make_test_selection // Special Functions function color_block($color) { return "     "; } function cond_formatted_link($enabled, $text, $link = "", $caption = "", $img = "") { if ($enabled) { return formatted_link($text, $link, $caption, $img); } else { return formatted_link_disabled($text, $img); } } function formatted_link($text, $link, $caption = "", $img = "") { $text = space_to_nbsp($text); $returnstr = ""; if (!empty($img)) { $titletext = $text; $titletext .= empty($caption) ? "" : " - $caption"; $returnstr = ''; $returnstr .= ''.$titletext.''; $returnstr .= ''; } # end if image else { $returnstr = '<>'; } # no image return $returnstr; } // end formatted_link function formatted_link_disabled($text, $img = "") { $returnstr = ""; if (!empty($img)) { $returnstr = ''.$text.''; } # end if image else { $returnstr = "<$text>"; } # end if no image return $returnstr; } // end formatted_link_disabled function image_link($img_name, $title, $link) { $returnval = ''; $returnval .= '' . $title . ''."\n"; return $returnval; } function image_link_disabled($img_name, $title) { return '' . $title . ''."\n"; } /* JavaScript Code Blocks */ function js_confirm_dialog($function_name, $before = "", $after = "", $url_base = "") { ?> [*] ' . '[0] ' . '[-]'; } function js_color_dialog() { ?> 0) { echo "
The following errors were encountered:
"; // foreach error foreach ($errors as $error) { echo '
'."\n"; echo $error; echo "
\n"; } // end foreach error } // end if we have errors } // end DisplayErrors(); /** * DisplayResults($Results) * * display array of results */ function DisplayResults($results) { if (count($results) > 0) { echo "
The following results occured:
"; // foreach error foreach ($results as $result) { echo '
'."\n"; echo $result; echo "
\n"; } // end foreach result } // end if we have results } // end DisplayResults(); ?> netmrg-0.20/www/lib/processing.php0000664000076400007640000011707610522167603017412 0ustar silfreedsilfreed 10000) { return "Never"; exit; } $num_secs = $new_secs; $new_secs = $num_secs % 3600; $hours = ($num_secs - $new_secs) / 3600; $num_secs = $new_secs; $new_secs = $num_secs % 60; $mins = ($num_secs - $new_secs) / 60; $res = ""; if ($the_secs > 0) { if ($days > 0) { $res = sprintf("%d days, ", $days); } $res .= sprintf("%02d:%02d:%02d", $hours, $mins, $new_secs); } else { $res .= "Unavailable"; } return $res; } // end format_time_elapsed function sanitize_number($number, $round_to = 2) { $format = "%4." . $round_to . "f"; if ($number < 1000) { return sprintf($format, $number); } elseif ($number < 1000000) { return sprintf("$format k", $number / 1000); } elseif ($number < 1000000000) { return sprintf("$format M", $number / 1000000); } elseif ($number < 1000000000000) { return sprintf("$format G", $number / 1000000000); } else { return sprintf("$format T", $number / 1000000000000); } } // end sanitize_number function paraphrase($string, $length, $etc = "...") { if (strlen($string) <= $length) return $string; return substr($string, 0, $length) . $etc; } function make_spaces($length) { return str_repeat(" ", $length); } // end make_spaces function make_nbsp($length) { return str_repeat(" ", $length); } // end make_nbsp // prepends spaces to a string to cause it to be a certain length function align_right($string, $length) { $space_length = $length - strlen($string); return(make_spaces($space_length) . $string); } // end align_right function align_left($string, $length) { $space_length = $length - strlen($string); return($string . make_spaces($space_length)); } // end align_left function align_right_split($string, $length) { $space_length = $length - strlen($string); $pos = strrchr($string, " "); return(substr($string, 0, -strlen($pos)) . make_spaces($space_length) . $pos); } //end align_right_split // manipulates a string by applying the appropriate padding method function do_align($string, $length, $method) { if ($string == "") return ""; switch ($method) { case 1: $result = align_left($string, $length); break; case 2: $result = align_right($string, $length); break; case 3: $result = align_right_split($string, $length); break; } // end switch($method) return($result); } // end do_align function rrd_legend_escape($string) { if ($string == "") return ""; $string = str_replace(":", "\:", $string); return (":" . escapeshellarg($string)); } function get_microtime() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } function isin($haystack, $needle) { return is_integer(strpos($haystack, $needle)); } function compare_interface_names($a, $b) { $astuff = preg_split("~([-/\. ])~", strtolower(trim($a)), 0, PREG_SPLIT_DELIM_CAPTURE); $bstuff = preg_split("~([-/\. ])~", strtolower(trim($b)), 0, PREG_SPLIT_DELIM_CAPTURE); for ($i = 0; $i < max(count($astuff), count($bstuff)); $i++) { if (isset($astuff[$i])) { if (isset($bstuff[$i])) { if ($astuff[$i] != $bstuff[$i]) { if (is_numeric($astuff[$i]) && (is_numeric($bstuff[$i]))) { return $astuff[$i] - $bstuff[$i]; } else { return strcmp($astuff[$i], $bstuff[$i]); } } } else { return 1; } } else { return -1; } } return 0; } function compare_mac_addresses($a, $b) { $astuff = explode(":", $a); $bstuff = explode(":", $b); for ($i = 0; $i < 6; $i++) if (strlen($astuff[$i]) == 1) { $astuff[$i] = "0" . $astuff[$i]; } for ($i = 0; $i < 6; $i++) if (strlen($bstuff[$i]) == 1) { $bstuff[$i] = "0" . $bstuff[$i]; } $a1 = implode("", $astuff); $b1 = implode("", $bstuff); return strcmp($a1, $b1); } function compare_ip_addresses($a, $b) { $astuff = explode(".", $a); $bstuff = explode(".", $b); for ($i = 0; $i < 4; $i++) while (strlen($astuff[$i]) != 3) { $astuff[$i] = "0" . $astuff[$i]; } for ($i = 0; $i < 4; $i++) while (strlen($bstuff[$i]) != 3) { $bstuff[$i] = "0" . $bstuff[$i]; } $a1 = implode("", $astuff); $b1 = implode("", $bstuff); return strcmp($a1, $b1); } /** * simple_math_parse($input) * * $input - string to be parsed * * use eval to do math if everything looks safe. * * */ function simple_math_parse($input) { $val = 1; if (!preg_match("/[^012345467890.\/*\-+]/", $input)) { eval("\$val = $input;"); } return $val; } // RRD Support Functions /** * rrd_sum($mon_id, $start, $end, $resolution) * * $mon_id = monitor id of RRD to sum * $start = start time, formatted for RRDTOOL * $end = end time, formatted for RRDTOOL (defaults to "now") * $resolution = resolution of data, formatted for RRDTOOL (defaults to 1 day) */ function rrd_sum($mon_id, $start, $end = "now", $resolution = 86400) { $rrd_handle = popen($GLOBALS['netmrg']['rrdtool'] . " fetch " . $GLOBALS['netmrg']['rrdroot'] . "/mon_" . $mon_id . ".rrd AVERAGE -r $resolution -s $start -e $end", "r"); $row_count = 0; $sum = 0; while ($row = fgets($rrd_handle)) { // the first two lines are of no use if ($row_count > 1) { // ignore missing data points if (!preg_match("/nan/i", $row)) { $row_val = preg_replace("/.*: /", "", $row); list($mantissa, $exponent) = preg_split("/e/i", $row_val); $row_value = $mantissa * pow(10, intval($exponent)); $sum += $row_value; } } $row_count++; } $average = $sum / ($row_count - 1); $total_sum = $average * $resolution; pclose($rrd_handle); return $total_sum; } /** * rrdtool_syntax_highlight($txt) * * $txt = a string normally passed to rrdtool */ function rrdtool_syntax_highlight($txt) { $txt = preg_replace("/(#[0-9,a-f,A-F]+)/", "\\1", $txt); $txt = preg_replace("/(\s)DEF:/", "\\1DEF:", $txt); $txt = str_replace("\\n", "\\n", $txt); $txt = str_replace("CDEF", "CDEF", $txt); $txt = preg_replace("/(\s)(AREA|STACK|LINE1|LINE2|LINE3|HRULE|VRULE):/", "\\1\\2:", $txt); $txt = preg_replace("/:(MAX|AVERAGE|LAST)/", ":\\1", $txt); $txt = preg_replace("/(\s)(GPRINT|PRINT|COMMENT):/", "\\1\\2:", $txt); $txt = preg_replace("/(data\d+[lm]*)/", "\\1", $txt); //$txt = preg_replace("/=(.*\.rrd):/", "=\\1:", $txt); //$txt = preg_replace("/(\s)(\-+)(\s)/", "\\1\\2\\3", $txt); //$txt = preg_replace("/:(\".*\") /", ":\\1", $txt); return $txt; } // Templating Functions function expand_parameters($input, $subdev_id) { $query = db_query("SELECT * FROM sub_dev_variables WHERE type='dynamic' AND sub_dev_id=$subdev_id"); while (($row = db_fetch_array($query)) != NULL) { $input = str_replace("%" . $row['name'] . "%", $row['value'], $input); } //$input = preg_replace("/\%..+\%/", "N/A", $input); return $input; } // expand_parameters() function apply_template($subdev_id, $template_id) { // add the appropriate monitors to the subdevice $q = db_query("SELECT monitors.id, data_type, test_id, test_type, test_params, min_val, max_val FROM graph_ds, monitors WHERE graph_ds.graph_id='$template_id' AND graph_ds.mon_id=monitors.id"); for ($i = 0; $i < db_num_rows($q); $i++) { $row = db_fetch_array($q); if (empty($row['min_val'])) $row['min_val'] = "NULL"; if (empty($row['max_val'])) $row['max_val'] = "NULL"; // only add a new monitor if there is no existing one that matches the template if (dereference_templated_monitor($row['id'], $subdev_id) === false) { db_update("INSERT INTO monitors SET sub_dev_id=$subdev_id, data_type={$row['data_type']}, test_id={$row['test_id']}, test_type={$row['test_type']}, test_params='{$row['test_params']}', min_val={$row['min_val']}, max_val={$row['max_val']}"); } } // add templated graph to the device's view $q = db_query("SELECT dev_id FROM sub_devices WHERE id=$subdev_id"); $sd_row = db_fetch_array($q); $q = db_query("SELECT max(pos)+1 AS newpos FROM view WHERE object_type='device' AND object_id={$sd_row['dev_id']}"); $pos_row = db_fetch_array($q); if (!isset($pos_row['newpos']) || empty($pos_row['newpos'])) { $pos_row['newpos'] = 1; } db_update("INSERT INTO view SET object_id={$sd_row['dev_id']}, object_type='device', graph_id=$template_id, type='template', pos={$pos_row['newpos']}, subdev_id=$subdev_id"); // add templated graph to the sub-device's view $q = db_query("SELECT max(pos)+1 AS newpos FROM view WHERE object_type='subdevice' AND object_id=$subdev_id"); $pos_row = db_fetch_array($q); if (!isset($pos_row['newpos']) || empty($pos_row['newpos'])) { $pos_row['newpos'] = 1; } db_update("INSERT INTO view SET object_id=$subdev_id, object_type='subdevice', graph_id=$template_id, type='template', pos={$pos_row['newpos']}, subdev_id=$subdev_id"); } // apply_template() // Recursive status determination section //Takes a grp_id and returns the current group aggregate status function get_group_status($grp_id) { $status = -1; $grp_results = db_query("SELECT id FROM groups WHERE parent_id=$grp_id"); while ($grp_row = db_fetch_array($grp_results)) { $grp_status = get_group_status($grp_row["id"]); if (($grp_status > $status) && ($grp_status != 4)) { $status = $grp_status; } } // end while rows left $dev_results = db_query(" SELECT max(devices.status) AS status FROM dev_parents, devices WHERE grp_id = $grp_id AND dev_parents.dev_id=devices.id AND devices.status < 4 GROUP BY grp_id"); $dev_row = db_fetch_array($dev_results); $grp_status = $dev_row["status"]; if ($grp_status > $status) { $status = $grp_status; } return $status; } // end get_group_status() // Uniform Name Creation Section function get_short_monitor_name($mon_id) { $mon_query = db_query(" SELECT test_id, test_params, test_type FROM monitors WHERE monitors.id = $mon_id"); $mon_row = db_fetch_array($mon_query); return get_short_test_name($mon_row['test_type'], $mon_row['test_id'], $mon_row['test_params']); } function get_short_property_name($prop_id) { $prop_query = db_query(" SELECT test_id, test_params, test_type FROM dev_props WHERE dev_props.id = $prop_id"); $prop_row = db_fetch_array($prop_query); return get_short_test_name($prop_row['test_type'], $prop_row['test_id'], $prop_row['test_params']); } function get_short_test_name($test_type, $test_id, $test_params) { GLOBAL $TEST_TYPES; switch($test_type) { case 1: $test_query = "SELECT name FROM tests_script WHERE id = " . $test_id; break; case 2: $test_query = "SELECT name FROM tests_snmp WHERE id = " . $test_id; break; case 3: $test_query = "SELECT name FROM tests_sql WHERE id = " . $test_id; break; case 4: $test_query = "SELECT name FROM tests_internal WHERE id = " . $test_id; break; } // end switch test type $test_row = db_fetch_array(db_query($test_query)); $res = $test_row["name"]; if ($test_params != "") { $res .= " - " . $test_params; } return $res; } // end get_short_test_name() function get_monitor_name($mon_id) { $query_handle = db_query(" SELECT devices.name AS dev_name, sub_devices.name AS sub_name FROM monitors LEFT JOIN sub_devices ON monitors.sub_dev_id=sub_devices.id LEFT JOIN devices ON sub_devices.dev_id=devices.id WHERE monitors.id=$mon_id"); $row = db_fetch_array($query_handle); return $row["dev_name"] . " - " . $row["sub_name"] . " (" . get_short_monitor_name($mon_id) . ")"; } // end get_monitor_name() function get_graph_name($graph_id) { $graph_query = db_query("SELECT name FROM graphs WHERE id=$graph_id"); $graph_row = db_fetch_array($graph_query); return $graph_row["name"]; } function get_group_name($grp_id) { $grp_query = db_query("SELECT name FROM groups WHERE id=$grp_id"); $grp_row = db_fetch_array($grp_query); return $grp_row["name"]; } function get_device_name($dev_id) { $dev_query = db_query("SELECT name FROM devices WHERE id=$dev_id"); $dev_row = db_fetch_array($dev_query); return $dev_row["name"]; } function get_sub_device_name($sub_dev_id) { $dev_query = db_query("SELECT name FROM sub_devices WHERE id = $sub_dev_id"); if (db_num_rows($dev_query) == 0) return "Not Set"; $row = db_fetch_array($dev_query); return $row["name"]; } function get_dev_sub_device_name($sub_dev_id) { $dev_query = db_query(" SELECT devices.name AS dev_name, sub_devices.name AS sub_name FROM sub_devices LEFT JOIN devices ON sub_devices.dev_id=devices.id WHERE sub_devices.id = $sub_dev_id"); if (db_num_rows($dev_query) == 0) return "Not Set"; $row = db_fetch_array($dev_query); return $row["dev_name"] . " - " . $row["sub_name"]; } function get_event_name($event_id) { $e_query = db_query("SELECT name FROM events WHERE id=$event_id"); $e_row = db_fetch_array($e_query); return $e_row["name"]; } /** * GetNumAssocItems($object_type, $object_id) * * $object_type = (group, device, monitor, event) * $object_id = id */ function GetNumAssocItems($object_type, $object_id) { $db_result = db_query(" SELECT count(*) AS count FROM view, graphs WHERE view.graph_id = graphs.id AND object_type='$object_type' AND object_id='$object_id'"); $row = db_fetch_array($db_result); return $row["count"]; } // end GetNumAssocItems(); /** * GetGroupParents($group_id); * * returns all the groups parent group ids */ function GetGroupParents($group_id) { $group_arr = array(); $group_item = $group_id; while ($group_item != 0) { $group_item = db_fetch_cell("SELECT parent_id FROM groups WHERE id = '$group_item'"); array_push($group_arr, $group_item); } // end while more parents return $group_arr; } // end GetGroupParents(); /** * GetGroups($type,$id); * * returns an array of groups that this $type is in * */ function GetGroups($type,$id) { $group_arr = array(); switch ($type) { case "group": $query = array("SELECT '$id' as group_id"); break; case "device": $query = array(" SELECT groups.id AS group_id FROM groups, dev_parents, devices WHERE devices.id = '$id' AND devices.id = dev_parents.dev_id AND dev_parents.grp_id = groups.id GROUP BY group_id"); break; case "subdevice": $query = array(" SELECT groups.id AS group_id FROM groups, dev_parents, devices, sub_devices WHERE sub_devices.id = '$id' AND sub_devices.dev_id = devices.id AND devices.id = dev_parents.dev_id AND dev_parents.grp_id = groups.id GROUP BY group_id", " SELECT object_id AS group_id FROM view WHERE object_type='group' AND subdev_id = '$id' GROUP BY group_id" ); break; case "monitor": $query = array(" SELECT groups.id AS group_id FROM groups, dev_parents, devices, sub_devices, monitors WHERE monitors.id = '$id' AND sub_devices.id = monitors.sub_dev_id AND sub_devices.dev_id = devices.id AND devices.id = dev_parents.dev_id AND dev_parents.grp_id = groups.id GROUP BY group_id"); break; case "customgraph": $query = array(" SELECT object_id, object_type FROM view WHERE type = 'graph' AND graph_id = '$id'"); break; default: // an unknown type should have no groups return $group_arr; } // end switch($type) foreach ($query as $sql_cmd) { $db_result = db_query($sql_cmd); while ($r = mysql_fetch_array($db_result)) { if ($type == "customgraph") { $group_arr = array_merge($group_arr, GetGroups($r["object_type"],$r["object_id"])); } else { array_push($group_arr, $r["group_id"]); $group_arr = array_merge($group_arr, GetGroupParents($r["group_id"])); } } // end while we have results } return $group_arr; } // end GetGroups(); /** * GetSubdeviceParent($subdevice_id); * * returns the parent device of the $subdevice_id * * @param integer subdevice_id */ function GetSubdeviceParent($subdevice_id) { return db_fetch_cell("SELECT dev_id FROM sub_devices WHERE id = '$subdevice_id'"); } // end GetSubdeviceParent(); /** * GetUsername($uid) * * returns the username for a uid */ function GetUsername($uid) { $sql = "SELECT user FROM user WHERE id='$uid'"; $handle = db_query($sql); $row = db_fetch_array($handle); return $row["user"]; } // end GetUsername(); // Recursive Duplication Section function duplicate_device($dev_id) { // duplicate device db_query("CREATE TEMPORARY TABLE tmpdev SELECT id, name, ip, snmp_read_community, dev_type, snmp_recache_method, disabled, snmp_avoided, snmp_uptime, snmp_ifnumber, snmp_version, snmp_timeout, snmp_retries, snmp_port, no_snmp_uptime_check FROM devices WHERE id='$dev_id'"); db_query(" INSERT INTO devices (name, ip, snmp_read_community, dev_type, snmp_recache_method, disabled, snmp_avoided, snmp_uptime, snmp_ifnumber, snmp_version, snmp_timeout, snmp_retries, snmp_port, no_snmp_uptime_check) SELECT concat(name, ' (duplicate)'), ip, snmp_read_community, dev_type, snmp_recache_method, disabled, snmp_avoided, snmp_uptime, snmp_ifnumber, snmp_version, snmp_timeout, snmp_retries, snmp_port, no_snmp_uptime_check FROM tmpdev WHERE id='$dev_id'"); $new_dev_id = db_insert_id(); db_query("DROP TABLE tmpdev"); // duplicate parent associations db_query("CREATE TEMPORARY TABLE tmp_dev_parents SELECT grp_id, dev_id FROM dev_parents WHERE dev_id=$dev_id"); db_query("INSERT INTO dev_parents (grp_id, dev_id) SELECT grp_id, $new_dev_id FROM tmp_dev_parents WHERE dev_id=$dev_id"); db_query("DROP TABLE tmp_dev_parents"); // duplicate view db_query("CREATE TEMPORARY TABLE tmp_view SELECT object_id, object_type, graph_id, type, pos, separator_text, subdev_id FROM view WHERE object_id=$dev_id AND object_type='device'"); db_query("INSERT INTO view (object_id, object_type, graph_id, type, pos, separator_text, subdev_id) SELECT $new_dev_id, object_type, graph_id, type, pos, separator_text, subdev_id FROM tmp_view WHERE object_id=$dev_id AND object_type='device'"); db_query("DROP TABLE tmp_view"); // duplicate subdevices $res = db_query("SELECT id FROM sub_devices WHERE dev_id=$dev_id"); while ($row = db_fetch_array($res)) { duplicate_subdevice($row['id'], $new_dev_id); } } // end duplicate_device(); function duplicate_subdevice($subdev_id, $new_parent = -1) { if ($new_parent == -1) { $new_parent = "dev_id"; $name = "concat(name, ' (duplicate)')"; } else { $name = "name"; } // duplicate subdevice db_query("CREATE TEMPORARY TABLE tmp_sub_devices SELECT id, dev_id, type, name FROM sub_devices WHERE id=$subdev_id"); db_query("INSERT INTO sub_devices (dev_id, type, name) SELECT $new_parent, type, $name FROM tmp_sub_devices WHERE id=$subdev_id"); $new_subdev_id = db_insert_id(); db_query("DROP TABLE tmp_sub_devices"); // duplicate parameters db_query("CREATE TEMPORARY TABLE tmp_sub_dev_variables SELECT sub_dev_id, name, value, type FROM sub_dev_variables WHERE sub_dev_id=$subdev_id"); db_query("INSERT INTO sub_dev_variables (sub_dev_id, name, value, type) SELECT $new_subdev_id, name, value, type FROM tmp_sub_dev_variables WHERE sub_dev_id=$subdev_id"); db_query("DROP TABLE tmp_sub_dev_variables"); if ($new_parent != "dev_id") { // translate subdevices on device view $res = db_query("SELECT id FROM view WHERE object_id=$new_parent AND object_type='device' AND type='template' AND subdev_id=$subdev_id"); while ($row = db_fetch_array($res)) { db_query("UPDATE view SET subdev_id=$new_subdev_id WHERE id={$row['id']}"); } } // duplicate monitors $res = db_query("SELECT id FROM monitors WHERE sub_dev_id=$subdev_id"); while ($row = db_fetch_array($res)) { duplicate_monitor($row['id'], $new_subdev_id); } } // end duplicate_subdevice(); function duplicate_monitor($mon_id, $new_parent = "sub_dev_id") { // duplicate monitor db_query("CREATE TEMPORARY TABLE tmp_monitors SELECT id, sub_dev_id, data_type, min_val, max_val, test_type, test_id, test_params FROM monitors WHERE id=$mon_id"); db_query("INSERT INTO monitors (sub_dev_id, data_type, min_val, max_val, test_type, test_id, test_params) SELECT $new_parent, data_type, min_val, max_val, test_type, test_id, test_params FROM tmp_monitors WHERE id=$mon_id"); $new_mon_id = db_insert_id(); db_query("DROP TABLE tmp_monitors"); // duplicate events $res = db_query("SELECT id FROM events WHERE mon_id=$mon_id"); while ($row = db_fetch_array($res)) { duplicate_event($row['id'], $new_mon_id); } } // end duplicate_monitor(); function duplicate_event($ev_id, $new_parent = -1) { if ($new_parent == -1) { $new_parent = "mon_id"; $name = "concat(name, ' (duplicate)')"; } else { $name = "name"; } // duplicate event db_query("CREATE TEMPORARY TABLE tmp_events SELECT id, mon_id, trigger_type, situation, name FROM events WHERE id=$ev_id"); db_query("INSERT INTO events (mon_id, trigger_type, situation, name) SELECT $new_parent, trigger_type, situation, $name FROM tmp_events WHERE id=$ev_id"); $new_ev_id = db_insert_id(); db_query("DROP TABLE tmp_events"); // duplicate conditions db_query("CREATE TEMPORARY TABLE tmp_conditions SELECT event_id, value, condition, logic_condition, value_type FROM conditions WHERE event_id=$ev_id"); db_query("INSERT INTO conditions (event_id, value, condition, logic_condition, value_type) SELECT $new_ev_id, value, condition, logic_condition, value_type FROM tmp_conditions WHERE event_id=$ev_id"); db_query("DROP TABLE tmp_conditions"); // duplicate responses $res = db_query("SELECT id FROM responses WHERE event_id = $ev_id"); while ($row = db_fetch_array($res)) { duplicate_response($row['id'], $new_ev_id); } } // end duplicate_event(); function duplicate_response($rsp_id, $new_parent = "event_id") { db_query("CREATE TEMPORARY TABLE tmp_responses SELECT id, event_id, notification_id, parameters FROM responses WHERE id=$rsp_id"); db_query("INSERT INTO responses (event_id, notification_id, parameters) SELECT $new_parent, notification_id, parameters FROM tmp_responses WHERE id=$rsp_id"); db_query("DROP TABLE tmp_responses"); } // end duplicate_response(); function duplicate_graph($graph_id) { db_query("CREATE TEMPORARY TABLE tmp_graphs SELECT id, name, title, comment, width, height, vert_label, type, base, options, max, min FROM graphs WHERE id=$graph_id"); db_query("INSERT INTO graphs (name, title, comment, width, height, vert_label, type, base, options, max, min) SELECT concat(name, ' (duplicate)'), title, comment, width, height, vert_label, type, base, options, max, min FROM tmp_graphs WHERE id=$graph_id"); $new_grp_id = db_insert_id(); db_query("DROP TABLE tmp_graphs"); $ds_handle = db_query("SELECT * FROM graph_ds WHERE graph_id='$graph_id'"); while ($row = db_fetch_array($ds_handle)) { duplicate_graph_item($row['id'], $new_grp_id); } } // end duplicate_graph function duplicate_graph_item($item_id, $new_parent = -1) { if ($new_parent == -1) { $new_parent = "graph_id"; $label = "concat(label, ' (duplicate)')"; $move_others = true; } else { $label = "label"; $move_others = false; } db_query("CREATE TEMPORARY TABLE tmp_graph_ds SELECT id, mon_id, color, type, graph_id, label, alignment, stats, position, multiplier, start_time, end_time FROM graph_ds WHERE id=$item_id"); db_query("INSERT INTO graph_ds (mon_id, color, type, graph_id, label, alignment, stats, position, multiplier, start_time, end_time) SELECT mon_id, color, type, $new_parent, $label, alignment, stats, position, multiplier, start_time, end_time FROM tmp_graph_ds WHERE id=$item_id"); $new_id = db_insert_id(); db_query("DROP TABLE tmp_graph_ds"); if ($move_others) { $dq = db_query("SELECT graph_id, position FROM graph_ds WHERE id = $item_id"); $dr = db_fetch_array($dq); db_query("UPDATE graph_ds SET position = position+1 WHERE graph_id = {$dr['graph_id']} AND position > {$dr['position']}"); db_query("UPDATE graph_ds SET position = position+1 WHERE id = $new_id"); } } function move_graph_item($graph_id, $graph_item_id, $direction) { $query = db_query(" SELECT id, position FROM graph_ds WHERE graph_id=$graph_id ORDER BY position "); $row = array("id" => 0, "position" => 0); for ($ds_count = 0; $ds_count < db_num_rows($query); $ds_count++) { $last_row = $row; $row = db_fetch_array($query); if ($direction == "up") { if ($graph_item_id == $row['id']) { db_update("UPDATE graph_ds SET position = {$last_row['position']} WHERE id = {$row['id']}"); db_update("UPDATE graph_ds SET position = {$row['position']} WHERE id = {$last_row['id']}"); break; } } else { if ($graph_item_id == $row['id']) { $next_row = db_fetch_array($query); db_update("UPDATE graph_ds SET position = {$next_row['position']} WHERE id = {$row['id']}"); db_update("UPDATE graph_ds SET position = {$row['position']} WHERE id = {$next_row['id']}"); break; } } } } function delete_view_item($item_id) { $q = db_query("SELECT pos, object_id, object_type FROM view WHERE id=" . $item_id); $r = db_fetch_array($q); $pos = $r["pos"]; db_update("DELETE FROM view WHERE id=" . $item_id); db_update("UPDATE view SET pos = pos - 1 WHERE object_id=" . $r["object_id"] . " AND object_type='" . $r["object_type"] . "' AND pos > " . $pos); } function is_view_item_extreme($object_id, $object_type, $item_id, $which) { $query = db_query(" SELECT id, pos FROM view WHERE object_id=$object_id AND object_type='$object_type' ORDER BY pos $which"); $row = db_fetch_array($query); return ($row['id'] == $item_id); } function is_view_item_top($object_id, $object_type, $item_id) { return is_view_item_extreme($object_id, $object_type, $item_id, "ASC"); } function is_view_item_bottom($object_id, $object_type, $item_id) { return is_view_item_extreme($object_id, $object_type, $item_id, "DESC"); } function move_view_item($object_id, $object_type, $item_id, $direction) { //echo ("$object_id, $object_type, $item_id, $direction"); $query = db_query(" SELECT id, pos FROM view WHERE object_id=$object_id AND object_type='$object_type' ORDER BY pos"); $row = array("id" => 0, "pos" => 0); for ($i = 0; $i < db_num_rows($query); $i++) { $last_row = $row; $row = db_fetch_array($query); if ($direction == "up") { if ($item_id == $row['id']) { $next_row = db_fetch_array($query); db_update("UPDATE view SET pos = {$last_row['pos']} WHERE object_id = $object_id AND object_type = '$object_type' AND id = {$row['id']}"); db_update("UPDATE view SET pos = {$row['pos']} WHERE object_id = $object_id AND object_type = '$object_type' AND id = {$last_row['id']}"); break; } } else { if ($item_id == $row['id']) { $next_row = db_fetch_array($query); db_update("UPDATE view SET pos = {$next_row['pos']} WHERE object_id = $object_id AND object_type = '$object_type' AND id = {$row['id']}"); db_update("UPDATE view SET pos = {$row['pos']} WHERE object_id = $object_id AND object_type = '$object_type' AND id = {$next_row['id']}"); break; } } } } function move_view_item_top($object_id, $object_type, $item_id) { while (!is_view_item_top($object_id, $object_type, $item_id)) move_view_item($object_id, $object_type, $item_id, "up"); } function move_view_item_bottom($object_id, $object_type, $item_id) { while (!is_view_item_bottom($object_id, $object_type, $item_id)) move_view_item($object_id, $object_type, $item_id, "down"); } // Recursive Deletion Section (for orphan prevention if nothing else) function delete_group($group_id) { // get group info $grp_info_handle = db_query("SELECT * FROM groups WHERE id='$group_id'"); $grp_info = db_fetch_array($grp_info_handle); // reparent children groups db_query("UPDATE groups SET parent_id = '{$grp_info['parent_id']}' WHERE parent_id = '$group_id'"); // delete the group db_query("DELETE FROM groups WHERE id='$group_id'"); // delete the associated graphs db_query("DELETE FROM view WHERE object_type='group' AND object_id='$group_id'"); // get devices in this group $devs_in_grp_handle = db_query("SELECT dev_id FROM dev_parents WHERE grp_id='$group_id'"); $devs_in_grp = array(); while ($r = db_fetch_array($devs_in_grp_handle)) { array_push($devs_in_grp, $r["dev_id"]); } // end while devices in this group // delete devices from this group db_query("DELETE FROM dev_parents WHERE grp_id = '$group_id'"); // for each device we had, if it no longer has parents, delete it foreach ($devs_in_grp as $device_id) { $dev_res = db_query("SELECT 1 FROM dev_parents WHERE dev_id = '$device_id'"); if (db_num_rows($dev_res) == 0) { delete_device($device_id); } // end delete if this device has no parents left } // end foreach device we had } // end delete_group(); function delete_device($device_id, $group_id = false) { if ($group_id !== false) { // 'unparent' the device db_update("DELETE FROM dev_parents WHERE dev_id = '$device_id' AND grp_id = '$group_id'"); /** If this device is not part of any groups anymore, finish deleting it **/ $dev_parent_res = db_query("SELECT count(*) AS count FROM dev_parents WHERE dev_id = '$device_id'"); $dev_parent_row = db_fetch_array($dev_parent_res); } else { $dev_parent_row["count"] = 0; } if ($dev_parent_row["count"] == 0) { // delete the device db_update("DELETE FROM devices WHERE id = '$device_id'"); // remove the interface for the device db_update("DELETE FROM snmp_interface_cache WHERE dev_id = '$device_id'"); // remove the disk cache for the device db_update("DELETE FROM snmp_disk_cache WHERE dev_id = '$device_id'"); // remove the device properties db_update("DELETE FROM dev_prop_vals WHERE dev_id = '$device_id'"); // remove associated graphs db_update("DELETE FROM view WHERE object_type='device' AND object_id = '$device_id'"); $subdev_handle = db_query("SELECT id FROM sub_devices WHERE dev_id = '$device_id'"); while ($subdev_row = db_fetch_array($subdev_handle)) { delete_subdevice($subdev_row["id"]); } } // end if no parents left for device } // end delete_device(); function delete_subdevice($subdev_id) { // delete the subdevice db_update("DELETE FROM sub_devices WHERE id='$subdev_id'"); // delete the subdevice parameters db_update("DELETE FROM sub_dev_variables WHERE sub_dev_id='$subdev_id'"); $monitors_handle = db_query("SELECT id FROM monitors WHERE sub_dev_id='$subdev_id'"); while ($monitor_row = db_fetch_array($monitors_handle)) { delete_monitor($monitor_row["id"]); } $view_handle = db_query("SELECT id FROM view WHERE type='template' AND subdev_id=$subdev_id"); while ($view_row = db_fetch_array($view_handle)) { delete_view_item($view_row['id']); } } // end delete_subdevice(); function delete_monitor($monitor_id) { // check things that depend on this // * custom graphs // * template graphs db_update("UPDATE graph_ds SET mon_id = '-1', type = '4', multiplier = '0' WHERE mon_id = '$monitor_id'"); db_update("DELETE FROM monitors WHERE id='$monitor_id'"); $events_handle = db_query("SELECT id FROM events WHERE mon_id='$monitor_id'"); while ($event_row = db_fetch_array($events_handle)) { delete_event($event_row["id"]); } // end for each row } // end delete_monitor() function delete_event($event_id) { db_update("DELETE FROM events WHERE id='$event_id'"); db_update("DELETE FROM conditions WHERE event_id='$event_id'"); $responses_handle = db_query("SELECT id FROM responses WHERE event_id='$event_id'"); while ($response_row = db_fetch_array($responses_handle)) { delete_response($response_row["id"]); } } // end delete_event(); function delete_response($response_id) { db_update("DELETE FROM responses WHERE id=$response_id"); } function delete_graph($graph_id) { // delete the graph db_update("DELETE FROM graphs WHERE id = $graph_id"); // delete the graphs from associated graphs db_update("DELETE FROM view WHERE graph_id = $graph_id AND (type = 'graph' OR type = 'template')"); $ds_handle = db_query("SELECT id FROM graph_ds WHERE graph_id=$graph_id"); while ($ds_row = db_fetch_array($ds_handle)) { delete_ds($ds_row["id"]); } } // end delete_graph(); function delete_ds($ds_id) { $q = db_query("SELECT graph_id, position FROM graph_ds WHERE id=$ds_id"); $r = db_fetch_array($q); db_update("DELETE FROM graph_ds WHERE id=$ds_id"); db_update("UPDATE graph_ds SET position = position - 1 WHERE graph_id = {$r['graph_id']} AND position > {$r['position']}"); } // end delete_ds(); // Unified update/insert code // Generic function generic_insert($sql) { db_update("INSERT INTO $sql"); } function generic_update($sql, $id) { db_update("UPDATE $sql WHERE id='$id'"); } // Group function sql_group($grp_name, $grp_comment, $parent_id) { return "groups SET name='$grp_name', comment='$grp_comment', parent_id='$parent_id'"; } function create_group($grp_name, $grp_comment, $parent_id) { generic_insert(sql_group($grp_name, $grp_comment, $parent_id)); } function update_group($id, $grp_name, $grp_comment, $parent_id) { generic_update(sql_group($grp_name, $grp_comment, $parent_id), $id); } /** * addslashes_deep($value) * * adds slashes to all values inside $value */ function addslashes_deep($value) { return is_array($value) ? array_map('addslashes_deep', $value) : addslashes($value); } // end addslashes_deep(); /** * CreateLocalMenu(): * * creates a local version of the menu w/ only the user's authorized items */ function CreateLocalMenu() { global $MENU, $LOCAL_MENU, $LOCAL_MENU_CURTREE, $LOCAL_MENU_CURITEM; while (list($menuname, $menuitems) = each($MENU)) { // foreach menu item $authorized_subitems = array(); foreach ($menuitems as $menuitem) { if (basename($_SERVER["SCRIPT_NAME"]) == $menuitem["link"]) { $LOCAL_MENU_CURTREE = $menuname; $LOCAL_MENU_CURITEM = $menuitem["link"]; } // end if we're in this group, display its menu items if ($_SESSION["netmrgsess"]["permit"] >= $menuitem["authLevelRequired"] && $menuitem["display"] !== false) { array_push($authorized_subitems, $menuitem); } // end if we have enough permissions to view this subitem } // end foreach menu item // if we had some item output (ie, we had auth to view at least ONE item in this submenu) // and we're under this current menu heading if (count($authorized_subitems)) { $LOCAL_MENU[$menuname] = $authorized_subitems; } // end if item output wasn't empty } // end while we still have menu items } // end CreateLocalMenu(); /** * GetUserPref($module, $pref) * * returns the value for the $module and $pref wanted for user $uid */ function GetUserPref($uid, $module, $pref) { $sql = "SELECT user_prefs.value FROM user_prefs WHERE user_prefs.uid = '$uid' AND user_prefs.module = '$module' AND user_prefs.pref = '$pref'"; $handle = db_query($sql); if (db_num_rows($handle) > 0) { $row = db_fetch_array($handle); return $row["value"]; } // end if a result return ""; } // end GetUserPref(); /** * SetUserPref($uid, $module, $pref, $value) * * sets the $value for the $module and $pref for user $uid */ function SetUserPref($uid, $module, $pref, $value) { $sql = "SELECT user_prefs.id FROM user_prefs WHERE user_prefs.uid = '$uid' AND user_prefs.module = '$module' AND user_prefs.pref = '$pref'"; $handle = db_query($sql); if (db_num_rows($handle) > 0) { $row = db_fetch_array($handle); $update_query = "UPDATE user_prefs SET value = '$value' WHERE id = '{$row['id']}'"; } // end if a result else { $update_query = "INSERT INTO user_prefs SET uid = '$uid', module = '$module', pref = '$pref', value = '$value'"; } // end no result db_query($update_query); } // end SetUserPref(); /** * GetDBVersion() * * returns the version the database thinks we are */ function GetDBVersion() { $sql = "SELECT version FROM versioninfo WHERE module='Main'"; $handle = db_query($sql); $row = db_fetch_array($handle); return $row["version"]; } // end GetDBVersion(); /** * UpdaterNeedsRun() * * returns true if the updater needs run */ function UpdaterNeedsRun() { return ($GLOBALS["netmrg"]["verhist"][$GLOBALS["netmrg"]["version"]] > $GLOBALS["netmrg"]["verhist"][$GLOBALS["netmrg"]["dbversion"]]); } // end UpdaterNeedsRun(); /** * UpdateDBVersion($ver) * * updates the version the database is in */ function UpdateDBVersion($ver) { $sql = "UPDATE versioninfo SET version='$ver' WHERE module='Main'"; $handle = db_query($sql); } // end UpdateDBVersion(); /** * GetXMLConfig() * * reads xml config file and puts values in config array */ function GetXMLConfig() { $xmlconfig = GetXMLTree($GLOBALS["netmrg"]["xmlfile"]); // cosmetic variables $GLOBALS["netmrg"]["company"] = $xmlconfig["NETMRG"][0]["WEBSITE"][0]["COMPANY"][0]["VALUE"]; $GLOBALS["netmrg"]["companylink"] = $xmlconfig["NETMRG"][0]["WEBSITE"][0]["COMPANYLINK"][0]["VALUE"]; $GLOBALS["netmrg"]["webhost"] = $xmlconfig["NETMRG"][0]["WEBSITE"][0]["WEBHOST"][0]["VALUE"]; $GLOBALS["netmrg"]["webroot"] = $xmlconfig["NETMRG"][0]["WEBSITE"][0]["WEBROOT"][0]["VALUE"]; if (!isset($xmlconfig["NETMRG"][0]["WEBSITE"][0]["EXTERNALAUTH"])) { $xmlconfig["NETMRG"][0]["WEBSITE"][0]["EXTERNALAUTH"][0]["VALUE"] = false; } // end set default for external auth if ($xmlconfig["NETMRG"][0]["WEBSITE"][0]["EXTERNALAUTH"][0]["VALUE"] == "true") { $GLOBALS["netmrg"]["externalAuth"] = true; } // end if true else { $GLOBALS["netmrg"]["externalAuth"] = false; } // end else false // DB Config $GLOBALS["netmrg"]["dbhost"] = $xmlconfig["NETMRG"][0]["DATABASE"][0]["HOST"][0]["VALUE"]; $GLOBALS["netmrg"]["dbname"] = $xmlconfig["NETMRG"][0]["DATABASE"][0]["DB"][0]["VALUE"]; $GLOBALS["netmrg"]["dbuser"] = $xmlconfig["NETMRG"][0]["DATABASE"][0]["USER"][0]["VALUE"]; $GLOBALS["netmrg"]["dbpass"] = $xmlconfig["NETMRG"][0]["DATABASE"][0]["PASSWORD"][0]["VALUE"]; $GLOBALS["netmrg"]["dbsock"] = $xmlconfig["NETMRG"][0]["DATABASE"][0]["SOCKET"][0]["VALUE"]; $GLOBALS["netmrg"]["dbport"] = $xmlconfig["NETMRG"][0]["DATABASE"][0]["PORT"][0]["VALUE"]; // Path Config $GLOBALS["netmrg"]["rrdtool"] = $xmlconfig["NETMRG"][0]["PATHS"][0]["RRDTOOL"][0]["VALUE"]; $GLOBALS["netmrg"]["rrdroot"] = $xmlconfig["NETMRG"][0]["PATHS"][0]["RRDS"][0]["VALUE"]; $GLOBALS["netmrg"]["fileroot"] = $xmlconfig["NETMRG"][0]["PATHS"][0]["WEBFILEROOT"][0]["VALUE"]; $GLOBALS["netmrg"]["locale"] = $xmlconfig["NETMRG"][0]["PATHS"][0]["LOCALE"][0]["VALUE"]; // RRDTool Config $GLOBALS["netmrg"]["rrdtool_version"] = $xmlconfig["NETMRG"][0]["RRDTOOL"][0]["VERSION"][0]["VALUE"]; if (empty($GLOBALS["netmrg"]["rrdtool_version"])) { $GLOBALS["netmrg"]["rrdtool_version"] = "1.0"; } } // end GetXMLConfig(); /** * PrereqsMet() * * checks if the prerequisits for running NetMRG are met * * @returns array of errors */ function PrereqsMet() { /** PHP >= v4.1.0 PHP Safe Mode == off RRDtool is executable netmrg-gatherer is executable */ $errors = array(); // PHP >= 4.1.0 $phpver = explode(".", phpversion()); if ($phpver[0] < 4 && $phpver[1] < 1 && $phpver[2] < 0) { array_push($errors, "PHP Version 4.1.0 or higher required"); } // end if version less than 4.1.0 // PHP Safe Mode == off if (ini_get("safe_mode")) { array_push($errors, "PHP Safe Mode not supported"); } // end if safe mode enabled // RRDtool is executable if (!is_executable($GLOBALS["netmrg"]["rrdtool"])) { array_push($errors, "RRD Tool not found or is not executable"); } // end if rrdtool not executable // netmrg-gatherer is executable if (!is_executable($GLOBALS["netmrg"]["binary"])) { array_push($errors, "NetMRG Gatherer not found or not executable"); } // end if gatherer not executable return $errors; } // end PrereqsMet(); ?> netmrg-0.20/www/lib/graphing.php0000664000076400007640000003451510627026413017030 0ustar silfreedsilfreed 0) { $query = db_query("SELECT test_id, test_type, test_params FROM monitors WHERE id=$mon_id"); $row = db_fetch_array($query); $row['test_params'] = db_escape_string($row['test_params']); $query2 = db_query("SELECT id FROM monitors WHERE sub_dev_id='$subdev_id' AND test_id='{$row['test_id']}' AND test_type='{$row['test_type']}' AND test_params='{$row['test_params']}'"); if ($row2 = db_fetch_array($query2)) { return $row2["id"]; } else { return false; } } else { return $mon_id; } } // end dereference_templated_monitor(); function esc_colon() { // if escaping a colon, return the escape sequence, otherwise an empty string if (!strstr($GLOBALS['netmrg']['rrdtool_version'], "1.0")) return "\\"; else return ""; } function rrd_slope() { // use slope smoothing if rrdtool > 1.0 if (!strstr($GLOBALS['netmrg']['rrdtool_version'], "1.0")) return "-E"; else return ""; } function rrd_watermark() { // add a watermark if rrdtool > 1.0 if (!strstr($GLOBALS['netmrg']['rrdtool_version'], "1.0")) return " -W 'NetMRG - www.netmrg.net' "; else return ""; } function get_graph_command($type, $id, $hist) { // Determine the time domain of the graph switch ($type) { case "mon": return monitor_graph_command($id, $GLOBALS['TIMEFRAMES'][$hist]); case "tinymon": return tiny_monitor_graph_command($id, $GLOBALS['TIMEFRAMES'][$hist]); case "custom": return custom_graph_command($id, $GLOBALS['TIMEFRAMES'][$hist], false, false); case "custom_item": return custom_graph_command($id, $GLOBALS['TIMEFRAMES'][$hist], false, true); case "template": return custom_graph_command($id, $GLOBALS['TIMEFRAMES'][$hist], true, false); case "template_item": return custom_graph_command($id, $GLOBALS['TIMEFRAMES'][$hist], true, true); } } function monitor_graph_command($id, $timeframe) { if (isset($_REQUEST['start'])) { $timeframe['start_time'] = $_REQUEST['start']; } if (isset($_REQUEST['end'])) { $timeframe['end_time'] = $_REQUEST['end']; } if (strpos($timeframe['start_time'], " ") !== false) { $timeframe['start_time'] = strtotime(substr($timeframe['start_time'],1)); } if (strpos($timeframe['end_time'], " ") !== false) { $timeframe['end_time'] = strtotime(substr($timeframe['end_time'],1)); } if (isset($_REQUEST['min']) && isset($_REQUEST['max']) && ($_REQUEST['max'] > $_REQUEST['min'])) { $boundary = " -r -l {$_REQUEST['min']} -u {$_REQUEST['max']}"; } else { $boundary = ""; } return($GLOBALS['netmrg']['rrdtool'] . " graph - " . rrd_slope() . " -s " . $timeframe['start_time'] . " -e " . $timeframe['end_time'] . " " . $boundary . " --title=" . escapeshellarg(get_monitor_name($id) . " (#" . $id . ")") . " --imgformat PNG -g -w 575 -h 100 " . "DEF:data1=" . $GLOBALS['netmrg']['rrdroot'] . "/mon_" . $id . ".rrd:mon_" . $id . ":AVERAGE " . "AREA:data1#151590"); } function tiny_monitor_graph_command($id, $timeframe) { return($GLOBALS['netmrg']['rrdtool'] . " graph - " . rrd_slope() . " -s {$timeframe['start_time']} " . "-e {$timeframe['end_time']} -a PNG -g -w 275 -h 25 " . "DEF:data1=" . $GLOBALS['netmrg']['rrdroot'] . "/mon_$id.rrd:mon_$id:AVERAGE " . "AREA:data1#151590"); } function custom_graph_command($id, $timeframe, $templated, $single_ds) { $options = ""; if ($single_ds) { $ds_q = db_query("SELECT graph_id FROM graph_ds WHERE id=$id"); $ds_r = db_fetch_array($ds_q); $ds_id = $id; $id = $ds_r["graph_id"]; } $graph_results = db_query("SELECT * FROM graphs WHERE id=$id"); $graph_row = db_fetch_array($graph_results); if ($templated) { $fields = array($graph_row['title'], $graph_row['vert_label'], $graph_row['comment']); $fields = expand_parameters($fields, $_REQUEST['subdev_id']); $graph_row['title'] = escapeshellarg($fields[0]); $graph_row['vert_label'] = escapeshellarg($fields[1]); $graph_row['comment'] = escapeshellarg($fields[2]); } else { # escape the arguments in either case $graph_row['title'] = escapeshellarg($graph_row['title']); $graph_row['vert_label'] = escapeshellarg($graph_row['vert_label']); $graph_row['comment'] = escapeshellarg($graph_row['comment']); } # escapeshellarg() won't enclose an empty string in quotes, so # fix that up if necessary if ($graph_row['title'] == '') $graph_row['title'] = "''"; if ($graph_row['vert_label'] == '') $graph_row['vert_label'] = "''"; if ($graph_row['comment'] == '') $graph_row['comment'] = "''"; if (isset($_REQUEST['start'])) { $timeframe['start_time'] = $_REQUEST['start']; $timeframe['overridden'] = true; } if (isset($_REQUEST['end'])) { $timeframe['end_time'] = $_REQUEST['end']; $timeframe['overridden'] = true; } if (strpos($timeframe['start_time'], " ") !== false) { $timeframe['start_time'] = strtotime(substr($timeframe['start_time'],1)); } if (strpos($timeframe['end_time'], " ") !== false) { $timeframe['end_time'] = strtotime(substr($timeframe['end_time'],1)); } if (isset($timeframe['overridden']) && ($timeframe['overridden'])) { $timeframe['sum_label'] = "Interval"; $timeframe['sum_time'] = $timeframe['end_time'] - $timeframe['start_time']; } if (isset($_REQUEST['min']) && isset($_REQUEST['max']) && ($_REQUEST['max'] > $_REQUEST['min'])) { $boundary = " -r -l {$_REQUEST['min']} -u {$_REQUEST['max']}"; } elseif (isset($graph_row['min']) || isset($graph_row['max'])) { $boundary = " -r"; if (isset($graph_row['min'])) { $boundary .= " -l " . $graph_row['min']; } if (isset($graph_row['max'])) { $boundary .= " -u " . $graph_row['max']; } } else { $boundary = ""; } // options $options = " "; if (isin($graph_row["options"], "nolegend")) { $options .= "-g "; } if (isin($graph_row["options"], "logarithmic")) { $options .= "-o "; } // initial definition $command = $GLOBALS['netmrg']['rrdtool'] . " graph - " . rrd_slope() . rrd_watermark() . " -s " . $timeframe['start_time'] . " -e " . $timeframe['end_time'] . $boundary . " --title " . $graph_row["title"] . " -w " . $graph_row["width"] . " -h " . $graph_row["height"] . $options . "-b " . $graph_row["base"] . " -v " . $graph_row["vert_label"] . " --imgformat PNG $options"; // setup condition to only display non-AVERAGE items on graphs $ew = ""; if ($timeframe['show_max'] == false) { $ew = "AND cf=1"; } // *** Padded Length Calculation $padded_length = 5; $ds_results = db_query("SELECT max(length(graph_ds.label)) as maxlen FROM graph_ds WHERE graph_ds.graph_id=$id $ew"); $ds_row = mysql_fetch_array($ds_results); if (!empty($ds_row['maxlen']) && $padded_length < $ds_row['maxlen']) { $padded_length = $ds_row['maxlen']; } // *** if ($single_ds) { $ds_where = "id=$ds_id"; } else { $ds_where = "graph_id=$id $ew ORDER BY position, id"; } $ds_results = db_query("SELECT * FROM graph_ds WHERE $ds_where"); $ds_total = db_num_rows($ds_results); $CDEF_A = "zero,UN,0,0,IF"; $CDEF_L = "zero,UN,0,0,IF"; $CDEF_M = "zero,UN,0,0,IF"; $total_sum = 0; $command .= " DEF:zero=" . $GLOBALS['netmrg']['rrdroot'] . "/zero.rrd:mon_25:AVERAGE "; for ($ds_count = 1; $ds_count <= $ds_total; $ds_count++) { $ds_row = db_fetch_array($ds_results); // work around those using STACKs at the bottom of a graph if (($ds_row['type'] == 5) && ($ds_count == 1)) { $ds_row['type'] = 4; } $ds_row["type"] = $GLOBALS["RRDTOOL_ITEM_TYPES"][$ds_row["type"]]; if ($single_ds && ($ds_row["type"] == "STACK")) { $ds_row["type"] = "AREA"; } // time periods if (($ds_row['start_time'] != "") && ($ds_row['end_time'] != "")) { $relative_times = false; if (strpos($ds_row['start_time'], "+") !== false) { $ds_row['start_time'] = strtotime(substr($ds_row['start_time'],1)); $relative_times = true; } if (strpos($ds_row['end_time'], "+") !== false) { $ds_row['end_time'] = strtotime(substr($ds_row['end_time'],1)); $relative_times = true; } if (($timeframe['sum_time'] != 86400) && $relative_times) { $ds_row['start_time'] = 0; $ds_row['end_time'] = 0; } if (!$relative_times) { $time_pre = "TIME,{$ds_row['start_time']},{$ds_row['end_time']},LIMIT,UN,UNKN,"; } else { $time_pre = "TIME,{$ds_row['start_time']},{$ds_row['end_time']},LIMIT,UN," . "TIME," . ($ds_row['start_time'] - 86400) . "," . ($ds_row['end_time'] - 86400) . "," . "LIMIT,UN,MIN,UNKN,"; } $time_post = ",IF"; $time_shaping = true; } else { $time_shaping = false; $time_pre = ""; $time_post = ""; } // Data is from a monitor if ($ds_row['mon_id'] >= 0) { if ($templated) { $ds_row["mon_id"] = dereference_templated_monitor($ds_row["mon_id"], $_REQUEST['subdev_id']); } $rawness = (($ds_row["multiplier"] == "1") && !$time_shaping) ? "" : "raw_"; $command .= " DEF:" . $rawness . "data" . $ds_count . "=" . $GLOBALS['netmrg']['rrdroot'] . "/mon_" . $ds_row["mon_id"] . ".rrd:mon_" . $ds_row["mon_id"] . ":AVERAGE " . " DEF:" . $rawness . "data" . $ds_count . "l=" . $GLOBALS['netmrg']['rrdroot'] . "/mon_" . $ds_row["mon_id"] . ".rrd:mon_" . $ds_row["mon_id"] . ":LAST " . " DEF:" . $rawness . "data" . $ds_count . "m=" . $GLOBALS['netmrg']['rrdroot'] . "/mon_" . $ds_row["mon_id"] . ".rrd:mon_" . $ds_row["mon_id"] . ":MAX "; if (($ds_row["multiplier"] != "1") || $time_shaping) { if ($templated) { $fields = expand_parameters(array($ds_row["multiplier"]), $_REQUEST['subdev_id']); $ds_row["multiplier"] = $fields[0]; } $ds_row["multiplier"] = simple_math_parse($ds_row["multiplier"]); $command .= "CDEF:data" . $ds_count . "=" . $time_pre . "raw_data" . $ds_count . "," . $ds_row["multiplier"] . ",*" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "l=" . $time_pre . "raw_data" . $ds_count . "l," . $ds_row["multiplier"] . ",*" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "m=" . $time_pre . "raw_data" . $ds_count . "m," . $ds_row["multiplier"] . ",*" . $time_post . " "; } } // Data is from a fixed value elseif ($ds_row['mon_id'] == -1) { if ($templated) { $fields = expand_parameters(array($ds_row["multiplier"]), $_REQUEST['subdev_id']); $ds_row["multiplier"] = $fields[0]; } if ($ds_row["multiplier"] != "INF") { $ds_row["multiplier"] = simple_math_parse($ds_row["multiplier"]); $command .= "CDEF:data" . $ds_count . "=" . $time_pre . "zero,UN,1,1,IF," . $ds_row["multiplier"] . ",*" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "l=" . $time_pre . "zero,UN,1,1,IF," . $ds_row["multiplier"] . ",*" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "m=" . $time_pre . "zero,UN,1,1,IF," . $ds_row["multiplier"] . ",*" . $time_post . " "; } else { $command .= "CDEF:data" . $ds_count . "=" . $time_pre . "zero,UN,INF,INF,IF" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "l=" . $time_pre . "zero,UN,INF,INF,IF" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "m=" . $time_pre . "zero,UN,INF,INF,IF" . $time_post. " "; } } // Data is the sum of all prior items elseif ($ds_row['mon_id'] == -2) { $command .= "CDEF:data" . $ds_count . "=" . $time_pre . $CDEF_A . "," . $ds_row["multiplier"] . ",*" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "l=" . $time_pre . $CDEF_L . "," . $ds_row["multiplier"] . ",*" . $time_post . " "; $command .= "CDEF:data" . $ds_count . "m=" . $time_pre . $CDEF_M . "," . $ds_row["multiplier"] . ",*" . $time_post . " "; // Reset totals $CDEF_A = "zero,UN,0,0,IF"; $CDEF_L = "zero,UN,0,0,IF"; $CDEF_M = "zero,UN,0,0,IF"; } $suffix = ""; if ($ds_row['cf'] == 2) { $suffix = "m"; } $command .= $ds_row["type"] . ":data" . $ds_count . $suffix . $ds_row["color"] . rrd_legend_escape(do_align($ds_row["label"], $padded_length, $ds_row["alignment"])) . " "; // define the formatting string if (isin($ds_row["stats"], "INTEGER")) { $format = "%5.0lf"; } else { $format = "%8.2lf %s"; } // Display each field requested if (isin($ds_row["stats"], "CURRENT")) { $command .= 'GPRINT:data' . $ds_count . 'l:LAST:"Current\\:' . $format . '" '; } if (isin($ds_row["stats"], "AVERAGE")) { $command .= 'GPRINT:data' . $ds_count . ':AVERAGE:"Average\\:' . $format . '" '; } if (isin($ds_row["stats"], "MAXIMUM")) { $command .= 'GPRINT:data' . $ds_count . 'm:MAX:"Maximum\\:' . $format . '" '; } if (isin($ds_row["stats"], "SUMS")) { if ($ds_row['mon_id'] > 0) { $sum_val = rrd_sum($ds_row['mon_id'], -1 * $timeframe['sum_time'], "now", $timeframe['sum_time']); if (isin($ds_row["stats"], "MULTSUM")) { $sum_val = $sum_val * $ds_row['multiplier']; } $total_sum += $sum_val; } elseif ($ds_row['mon_id'] == -2) { $sum_val = $total_sum; $total_sum = 0; } if (isin($ds_row["stats"], "INTEGER")) { $sum_text = sprintf("%.0f", $sum_val); } else { $sum_text = sanitize_number($sum_val); } $command .= " COMMENT:'". $timeframe['sum_label'] . " Sum" . esc_colon() . ": $sum_text" . "' "; } if ($ds_row['label'] != "") $command .= 'COMMENT:"\\n" '; // add to the running total CDEF if (($ds_row["multiplier"] != "INF") && ($ds_row["mon_id"] != -2)) { $CDEF_A .= ",data" . $ds_count . ",UN,0,data" . $ds_count . ",IF,+"; $CDEF_L .= ",data" . $ds_count . "l,UN,0,data" . $ds_count . ",IF,+"; $CDEF_M .= ",data" . $ds_count . "m,UN,0,data" . $ds_count . ",IF,+"; } } // make MRTG-like VRULE $command .= " VRULE:" . $timeframe['break_time'] . "#F00000"; // print out the graph comment, if any if ($graph_row["comment"] != "''") { $temp_comment = str_replace(":", esc_colon() . ":", $graph_row["comment"]); $temp_comment = str_replace("%n", '\' COMMENT:\\\n COMMENT:\'', $temp_comment); $command .= ' COMMENT:\\\n'; $command .= ' COMMENT:' . $temp_comment; $command .= ' COMMENT:\\\n'; } return($command); } ?> netmrg-0.20/www/lib/database.php0000664000076400007640000001214210561765441016775 0ustar silfreedsilfreed 0) { $dbhost = $GLOBALS["netmrg"]["dbhost"] . ":" . $GLOBALS["netmrg"]["dbport"]; } else { $dbhost = $GLOBALS["netmrg"]["dbhost"]; } $conn = mysql_connect($dbhost, $GLOBALS["netmrg"]["dbuser"], $GLOBALS["netmrg"]["dbpass"]) or die("DB_ERROR:: Cannot connect to the database server."); mysql_select_db($GLOBALS["netmrg"]["dbname"], $conn) or die("DB_ERROR: Cannot connect to the database."); return $conn; } // end db_connect(); // Obtain data from a table function db_query($query_string, $unsafe = false) { $GLOBALS['querycount']++; $query_result = mysql_query($query_string, $GLOBALS["netmrg"]["dbconn"]); // if there was an error, handle it if (mysql_errno($GLOBALS["netmrg"]["dbconn"]) && !$unsafe) { if ($GLOBALS["netmrg"]["dbdebug"]) { die("DB_ERROR: Couldn't execute query:
\n
$query_string

\n
".mysql_error()."

\n\n"); } // end if we're debuging things else { die("DB_ERROR: Sorry, a database error occured. We cannot continue. Please contact the administrator and let them know what you were doing when the problem occured

\n\n"); } // end else present a nice error code } // end if there was an error return $query_result; } // end db_query // Update/Insert data in table function db_update($query_string) { db_query($query_string); } // end db_update // fetch data from a query function db_fetch_array($q_handle) { return mysql_fetch_array($q_handle); } // end db_fetch_array() // number of rows returned in a query function db_num_rows($q_handle) { return mysql_num_rows($q_handle); } // end db_num_rows() // escape data in query function db_escape_string($string) { return mysql_escape_string($string); } // end db_escape() // last insert id function db_insert_id() { return mysql_insert_id($GLOBALS["netmrg"]["dbconn"]); } // end db_insert_id() /** * Quotes a string for use in a query * * @param string|array $value * @return string */ function db_quote($value) { $return_val = ''; // strip slashes if magic quotes is on if (get_magic_quotes_gpc()) { $value = stripslashes($value); } // end if magic quotes // quote if not a number or a numeric string if (!is_array($value)) { $return_val = '\'' . mysql_real_escape_string($value) . '\''; } // end if value not an array else { foreach ($value as $key => $local_value) { $value[$key] = '\'' . mysql_real_escape_string($local_value) . '\''; } // end foreach array value $return_val = implode(',', $value); } // end if value is an array return $return_val; } // end function db_quote() /** * db_fetch_cell($sql) * * run a 'select' sql query and return the first column of the first row found * * @arg $sql - the sql query to execute * @returns - (bool) the output of the sql query as a single variable */ function db_fetch_cell($sql) { $row = array(); $res = db_query($sql); if ($res) { $rows = mysql_numrows($res); if ($rows > 0) { return(mysql_result($res,0,0)); } // end if rows } // end if result return false; } // end db_fetch_cell(); /** * db_fetch_row($sql) * * run a 'select' sql query and return the first row found * * @arg $sql - the sql query to execute * @returns - the first row of the result as a hash */ function db_fetch_row($sql) { $row = array(); $res = db_query($sql); if ($query) { $rows = mysql_numrows($res); if ($rows > 0) { return(mysql_fetch_assoc($res)); } // end if rows } // end if result return false; } // end db_fetch_row(); /** * db_fetch_assoc($sql) * * run a 'select' sql query and return all rows found * * @arg $sql - the sql query to execute * @returns - the entire result set as a multi-dimensional hash */ function db_fetch_assoc($sql) { $data = array(); $res = db_query($sql); if ($res) { $rows = mysql_numrows($res); if ($rows > 0) { while($row = mysql_fetch_assoc($res)) { array_push($data, $row); } return($data); } } // end if result return false; } // end db_fetch_assoc(); /** * db_data_seek($q_handle, $rownum); * * seeks to specified row number */ function db_data_seek($q_handle, $rownum) { if (!mysql_data_seek($q_handle, $rownum)) { if ($GLOBALS["netmrg"]["dbdebug"]) { die("DB_ERROR: Attempt to seek past end of data set to row $rownum
\n\n"); } // end if we're debuging things else { die("DB_ERROR: Sorry, a database error occured. We cannot continue. Please contact the administrator and let them know what you were doing when the problem occured

\n\n"); } // end else present a nice error code } // end if the seek failed } // end db_data_seek(); ?> netmrg-0.20/www/lib/phptimer.php0000664000076400007640000000711310025436576017062 0ustar silfreedsilfreedaddmarker("Start"); } // end function start() // call this function at the end of the script function stop() { // see the addmarker() function later on $this->addmarker("Stop"); } // end function stop() // this function is called to add a marker during the scripts execution // it requires a descriptive name function addmarker($name) { // call the jointime() function and pass it the output of the microtime() function // as an argument $markertime = $this->jointime(microtime()); // $ae (stands for Array Elements) will contain the number of elements // currently in the $points array $ae = count($this->points); // store the timestamp and the descriptive name in the array $this->points[$ae][0] = $markertime; $this->points[$ae][1] = $name; } // end function addmarker() // this function manipulates the string that we get back from the microtime() function function jointime($mtime) { // split up the output string from microtime() that has been passed // to the function $timeparts = explode(" ",$mtime); // concatenate the two bits together, dropping the leading 0 from the // fractional part $finaltime = $timeparts[1].substr($timeparts[0],1); // return the concatenated string return $finaltime; } // end function jointime() // this function simply give the difference in seconds betwen the start of the script and // the end of the script function showtime() { return round( (($this->points[count($this->points)-1][0]) - ($this->points[0][0])), 6); } // end function showtime() // this function displays all of the information that was collected during the // course of the script function debug() { echo "Script execution debug information:"; echo "\n"; // the format of our table will be 3 columns: // Marker name, Timestamp, difference echo "\n"; // the first row will have no difference since it is the first timestamp echo "\n"; echo ""; echo ""; echo "\n"; echo "\n"; // our loop through the $points array must start at 1 rather than 0 because we have // already written out the first row for ($i = 1; $i < count($this->points);$i++) { echo "\n"; echo ""; echo ""; echo ""; echo "\n"; } echo ''."\n"; echo '\n"; echo "\n"; echo "
MarkerTimeDiff
".$this->points[0][1]."".$this->points[0][0]."-
".$this->points[$i][1]."".$this->points[$i][0].""; // write out the difference between this row and the previous row echo round( ($this->points[$i][0] - $this->points[$i-1][0]), 6); echo "
Start to Stop'.round( ($this->points[count($this->points)-1][0] - $this->points[0][0]), 6)."
"; } // end function debug() } // end class PHP_timer ?> netmrg-0.20/www/lib/xml_to_array.php0000664000076400007640000000655607710340462017737 0ustar silfreedsilfreed netmrg-0.20/www/lib/ajax.php0000664000076400007640000000147610447321376016162 0ustar silfreedsilfreedregisterFunction("redraw_subdevice"); $xajax->registerFunction("redraw_monitor"); class netmrgXajaxResponse extends xajaxResponse { function addCreateOption($sSelectId, $sOptionText, $sOptionValue) { $this->addScript("addOption('".$sSelectId."','".$sOptionText."','".$sOptionValue."');"); } function addCreateOptions($sSelectId, $aOptions) { foreach($aOptions as $sOptionText => $sOptionValue) { $this->addCreateOption($sSelectId, $sOptionText, $sOptionValue); } } function addClearSelect($sSelectId) { $this->addScript("clearSelect('".$sSelectId."');"); } } ?> netmrg-0.20/www/lib/xajax/0000775000076400007640000000000011000016355015611 5ustar silfreedsilfreednetmrg-0.20/www/lib/xajax/xajax_js/0000775000076400007640000000000011000016355017420 5ustar silfreedsilfreednetmrg-0.20/www/lib/xajax/xajax_js/xajaxCompress.php0000664000076400007640000000671610447321376023012 0ustar silfreedsilfreednetmrg-0.20/www/lib/xajax/xajax_js/xajax_uncompressed.js0000664000076400007640000003353110447321376023705 0ustar silfreedsilfreedfunction Xajax() { if (xajaxDebug) this.DebugMessage = function(text) { alert("Xajax Debug:\n " + text) }; this.workId = 'xajaxWork'+ new Date().getTime(); this.depth = 0; //Get the XMLHttpRequest Object this.getRequestObject = function() { if (xajaxDebug) this.DebugMessage("Initializing Request Object.."); var req; try { req=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { req=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { req=null; } } if(!req && typeof XMLHttpRequest != "undefined") req = new XMLHttpRequest(); if (xajaxDebug) { if (!req) this.DebugMessage("Request Object Instantiation failed."); } return req; } // xajax.$() is shorthand for document.getElementById() this.$ = function(sId) { if (!sId) { return null; } var returnObj = document.getElementById(sId); if (xajaxDebug && !returnObj && sId != this.workId) { this.DebugMessage("Element with the id \"" + sId + "\" not found."); } return returnObj; } // xajax.include(sFileName) dynamically includes an external javascript file this.include = function(sFileName) { var objHead = document.getElementsByTagName('head'); var objScript = document.createElement('script'); objScript.type = 'text/javascript'; objScript.src = sFileName; objHead[0].appendChild(objScript); } // xajax.addHandler adds an event handler to an element this.addHandler = function(sElementId, sEvent, sFunctionName) { if (window.addEventListener) { eval("this.$('"+sElementId+"').addEventListener('"+sEvent+"',"+sFunctionName+",false);"); } else { eval("this.$('"+sElementId+"').attachEvent('on"+sEvent+"',"+sFunctionName+",false);"); } } // xajax.removeHandler removes an event handler from an element this.removeHandler = function(sElementId, sEvent, sFunctionName) { if (window.addEventListener) { eval("this.$('"+sElementId+"').removeEventListener('"+sEvent+"',"+sFunctionName+",false);"); } else { eval("this.$('"+sElementId+"').detachEvent('on"+sEvent+"',"+sFunctionName+",false);"); } } // xajax.create creates a new child node under a parent this.create = function(sParentId, sTag, sId) { var objParent = this.$(sParentId); objElement = document.createElement(sTag); objElement.setAttribute('id',sId); objParent.appendChild(objElement); } // xajax.insert inserts a new node before another node this.insert = function(sBeforeId, sTag, sId) { var objSibling = this.$(sBeforeId); objElement = document.createElement(sTag); objElement.setAttribute('id',sId); objSibling.parentNode.insertBefore(objElement, objSibling); } this.getInput = function(sType, sName, sId) { var Obj; if (sType == "radio" && !window.addEventListener) { Obj = document.createElement(''); } else { Obj = document.createElement('input'); Obj.setAttribute('type',sType); Obj.setAttribute('name',sName); Obj.setAttribute('id',sId); } return Obj; } // xajax.createInput creates a new input node under a parent this.createInput = function(sParentId, sType, sName, sId) { var objParent = this.$(sParentId); var objElement = this.getInput(sType, sName, sId); objParent.appendChild(objElement); } // xajax.insertInput creates a new input node before another node this.insertInput = function(sBeforeId, sType, sName, sId) { var objSibling = this.$(sBeforeId); var objElement = this.getInput(sType, sName, sId); objSibling.parentNode.insertBefore(objElement, objSibling); } // xajax.remove deletes an element this.remove = function(sId) { objElement = this.$(sId); if (objElement.parentNode && objElement.parentNode.removeChild) { objElement.parentNode.removeChild(objElement); } } //xajax.replace searches for text in an attribute of an element and replaces it //with a different text this.replace = function(sId,sAttribute,sSearch,sReplace) { var bFunction = false; if (sAttribute == "innerHTML") sSearch = this.getBrowserHTML(sSearch); eval("var txt=document.getElementById('"+sId+"')."+sAttribute); if (typeof txt == "function") { txt = txt.toString(); bFunction = true; } if (txt.indexOf(sSearch)>-1) { var newTxt = ''; while (txt.indexOf(sSearch) > -1) { x = txt.indexOf(sSearch)+sSearch.length+1; newTxt += txt.substr(0,x).replace(sSearch,sReplace); txt = txt.substr(x,txt.length-x); } newTxt += txt; if (bFunction) { eval("newTxt =" + newTxt); eval('this.$("'+sId+'").'+sAttribute+'=newTxt;'); } else if (this.willChange(sId,sAttribute,newTxt)) { eval('this.$("'+sId+'").'+sAttribute+'=newTxt;'); } } } // xajax.getFormValues() builds a query string XML message from the elements of a form object this.getFormValues = function(frm) { var objForm; var submitDisabledElements = false; if (arguments.length > 1 && arguments[1] == true) submitDisabledElements = true; if (typeof(frm) == "string") objForm = this.$(frm); else objForm = frm; var sXml = ""; if (objForm && objForm.tagName == 'FORM') { var formElements = objForm.elements; for( var i=0; i < formElements.length; i++) { if (formElements[i].type && (formElements[i].type == 'radio' || formElements[i].type == 'checkbox') && formElements[i].checked == false) continue; if (formElements[i].disabled && formElements[i].disabled == true && submitDisabledElements == false) continue; var name = formElements[i].name; if (name) { if (sXml != '') sXml += '&'; if(formElements[i].type=='select-multiple') { for (var j = 0; j < formElements[i].length; j++) { if (formElements[i].options[j].selected == true) sXml += name+"="+encodeURIComponent(formElements[i].options[j].value)+"&"; } } else { sXml += name+"="+encodeURIComponent(formElements[i].value); } } } } sXml +=""; return sXml; } // Generates an XML message that xajax can understand from a javascript object this.objectToXML = function(obj) { var sXml = ""; for (i in obj) { try { if (i == 'constructor') continue; if (obj[i] && typeof(obj[i]) == 'function') continue; var key = i; var value = obj[i]; if (value && typeof(value)=="object" && (value.constructor == Array ) && this.depth <= 50) { this.depth++; value = this.objectToXML(value); this.depth--; } sXml += ""+key+""+value+""; } catch(e) { if (xajaxDebug) this.DebugMessage(e); } } sXml += ""; return sXml; } // Sends a XMLHttpRequest to call the specified PHP function on the server // * sRequestType is optional -- defaults to POST this.call = function(sFunction, aArgs, sRequestType) { var i,r,postData; if (document.body && xajaxWaitCursor) document.body.style.cursor = 'wait'; if (xajaxStatusMessages == true) window.status = 'Sending Request...'; if (xajaxDebug) this.DebugMessage("Starting xajax..."); if (sRequestType == null) { var xajaxRequestType = xajaxDefinedPost; } else { var xajaxRequestType = sRequestType; } var uri = xajaxRequestUri; var value; switch(xajaxRequestType) { case xajaxDefinedGet:{ var uriGet = uri.indexOf("?")==-1?"?xajax="+encodeURIComponent(sFunction):"&xajax="+encodeURIComponent(sFunction); if (aArgs) { for (i = 0; i"); if (r.responseXML) xajax.processResponse(r.responseXML); else { alert("Error: the XML response that was returned from the server is invalid."); document.body.style.cursor = 'default'; if (xajaxStatusMessages == true) window.status = 'Invalid XML response error'; } } delete r; } if (xajaxDebug) this.DebugMessage("Calling "+sFunction +" uri="+uri+" (post:"+ postData +")"); r.send(postData); if (xajaxStatusMessages == true) window.status = 'Waiting for data...'; delete r; return true; } //Gets the text as it would be if it were being retrieved from //the innerHTML property in the current browser this.getBrowserHTML = function(html) { tmpXajax = this.$(this.workId); if (tmpXajax == null) { tmpXajax = document.createElement("div"); tmpXajax.setAttribute('id',this.workId); tmpXajax.style.display = "none"; tmpXajax.style.visibility = "hidden"; document.body.appendChild(tmpXajax); } tmpXajax.innerHTML = html; var browserHTML = tmpXajax.innerHTML; tmpXajax.innerHTML = ''; return browserHTML; } // Tests if the new Data is the same as the extant data this.willChange = function(element, attribute, newData) { if (!document.body) { return true; } var oldData; if (attribute == "innerHTML") { newData = this.getBrowserHTML(newData); } eval("oldData=document.getElementById('"+element+"')."+attribute); if (newData != oldData) return true; return false; } //Process XML xajaxResponses returned from the request this.processResponse = function(xml) { if (xajaxStatusMessages == true) window.status = 'Processing...'; var tmpXajax = null; xml = xml.documentElement; if (xml == null) { alert("Error: the XML response that was returned from the server cannot be processed."); document.body.style.cursor = 'default'; if (xajaxStatusMessages == true) window.status = 'XML response processing error'; return; } for (i=0; i 1) { for (j=0; j');} else{Obj=document.createElement('input');Obj.setAttribute('type',sType);Obj.setAttribute('name',sName);Obj.setAttribute('id',sId);} return Obj;} this.createInput=function(sParentId,sType,sName,sId){var objParent=this.$(sParentId);var objElement=this.getInput(sType,sName,sId);objParent.appendChild(objElement);} this.insertInput=function(sBeforeId,sType,sName,sId){var objSibling=this.$(sBeforeId);var objElement=this.getInput(sType,sName,sId);objSibling.parentNode.insertBefore(objElement,objSibling);} this.remove=function(sId){objElement=this.$(sId);if(objElement.parentNode&&objElement.parentNode.removeChild){objElement.parentNode.removeChild(objElement);} } this.replace=function(sId,sAttribute,sSearch,sReplace){var bFunction=false;if(sAttribute=="innerHTML") sSearch=this.getBrowserHTML(sSearch);eval("var txt=document.getElementById('"+sId+"')."+sAttribute);if(typeof txt=="function"){txt=txt.toString();bFunction=true;} if(txt.indexOf(sSearch)>-1){var newTxt='';while(txt.indexOf(sSearch)>-1){x=txt.indexOf(sSearch)+sSearch.length+1;newTxt+=txt.substr(0,x).replace(sSearch,sReplace);txt=txt.substr(x,txt.length-x);} newTxt+=txt;if(bFunction){eval("newTxt ="+newTxt);eval('this.$("'+sId+'").'+sAttribute+'=newTxt;');} else if(this.willChange(sId,sAttribute,newTxt)){eval('this.$("'+sId+'").'+sAttribute+'=newTxt;');} } } this.getFormValues=function(frm){var objForm;var submitDisabledElements=false;if(arguments.length > 1&&arguments[1]==true) submitDisabledElements=true;if(typeof(frm)=="string") objForm=this.$(frm);else objForm=frm;var sXml="";if(objForm&&objForm.tagName=='FORM'){var formElements=objForm.elements;for(var i=0;i < formElements.length;i++){if(formElements[i].type&&(formElements[i].type=='radio'||formElements[i].type=='checkbox')&&formElements[i].checked==false) continue;if(formElements[i].disabled&&formElements[i].disabled==true&&submitDisabledElements==false)continue;var name=formElements[i].name;if(name){if(sXml!='') sXml+='&';if(formElements[i].type=='select-multiple'){for(var j=0;j < formElements[i].length;j++){if(formElements[i].options[j].selected==true)sXml+=name+"="+encodeURIComponent(formElements[i].options[j].value)+"&";} } else{sXml+=name+"="+encodeURIComponent(formElements[i].value);} } } } sXml+="";return sXml;} this.objectToXML=function(obj){var sXml="";for(i in obj){try{if(i=='constructor') continue;if(obj[i]&&typeof(obj[i])=='function') continue;var key=i;var value=obj[i];if(value&&typeof(value)=="object"&& (value.constructor==Array )&&this.depth <=50){this.depth++;value=this.objectToXML(value);this.depth--;} sXml+=""+key+""+value+"";} catch(e){if(xajaxDebug)this.DebugMessage(e);} } sXml+="";return sXml;} this.call=function(sFunction,aArgs,sRequestType){var i,r,postData;if(document.body&&xajaxWaitCursor) document.body.style.cursor='wait';if(xajaxStatusMessages==true)window.status='Sending Request...';if(xajaxDebug)this.DebugMessage("Starting xajax...");if(sRequestType==null){var xajaxRequestType=xajaxDefinedPost;} else{var xajaxRequestType=sRequestType;} var uri=xajaxRequestUri;var value;switch(xajaxRequestType){case xajaxDefinedGet:{var uriGet=uri.indexOf("?")==-1?"?xajax="+encodeURIComponent(sFunction):"&xajax="+encodeURIComponent(sFunction);if(aArgs){for(i=0;i");if(r.responseXML) xajax.processResponse(r.responseXML);else{alert("Error: the XML response that was returned from the server is invalid.");document.body.style.cursor='default';if(xajaxStatusMessages==true)window.status='Invalid XML response error';} } delete r;} if(xajaxDebug)this.DebugMessage("Calling "+sFunction+" uri="+uri+" (post:"+postData+")");r.send(postData);if(xajaxStatusMessages==true)window.status='Waiting for data...';delete r;return true;} this.getBrowserHTML=function(html){tmpXajax=this.$(this.workId);if(tmpXajax==null){tmpXajax=document.createElement("div");tmpXajax.setAttribute('id',this.workId);tmpXajax.style.display="none";tmpXajax.style.visibility="hidden";document.body.appendChild(tmpXajax);} tmpXajax.innerHTML=html;var browserHTML=tmpXajax.innerHTML;tmpXajax.innerHTML='';return browserHTML;} this.willChange=function(element,attribute,newData){if(!document.body){return true;} var oldData;if(attribute=="innerHTML"){newData=this.getBrowserHTML(newData);} eval("oldData=document.getElementById('"+element+"')."+attribute);if(newData!=oldData) return true;return false;} this.processResponse=function(xml){if(xajaxStatusMessages==true)window.status='Processing...';var tmpXajax=null;xml=xml.documentElement;if(xml==null){alert("Error: the XML response that was returned from the server cannot be processed.");document.body.style.cursor='default';if(xajaxStatusMessages==true)window.status='XML response processing error';return;} for(i=0;i 1){for(j=0;jsetCharEncoding($sEncoding); } // setCharEncoding() sets the character encoding for the response based on // $sEncoding, which is a string containing the character encoding to use. You // don't need to use this method normally, since the character encoding for the // response gets set automatically based on the XAJAX_DEFAULT_CHAR_ENCODING // constant. function setCharEncoding($sEncoding) { $this->sEncoding = $sEncoding; } // addAssign() adds an assign command message to the XML response // $sTarget is a string containing the id of an HTML element // $sAttribute is the part of the element you wish to modify ("innerHTML", "value", etc.) // $sData is the data you want to set the attribute to // usage: $objResponse->addAssign("contentDiv", "innerHTML", "Some Text"); function addAssign($sTarget,$sAttribute,$sData) { $this->xml .= $this->_cmdXML(array("n"=>"as","t"=>$sTarget,"p"=>$sAttribute),$sData); } // addAppend() adds an append command message to the XML response // $sTarget is a string containing the id of an HTML element // $sAttribute is the part of the element you wish to modify ("innerHTML", "value", etc.) // $sData is the data you want to append to the end of the attribute // usage: $objResponse->addAppend("contentDiv", "innerHTML", "Some New Text"); function addAppend($sTarget,$sAttribute,$sData) { $this->xml .= $this->_cmdXML(array("n"=>"ap","t"=>$sTarget,"p"=>$sAttribute),$sData); } // addPrepend() adds an prepend command message to the XML response // $sTarget is a string containing the id of an HTML element // $sAttribute is the part of the element you wish to modify ("innerHTML", "value", etc.) // $sData is the data you want to prepend to the beginning of the attribute // usage: $objResponse->addPrepend("contentDiv", "innerHTML", "Some Starting Text"); function addPrepend($sTarget,$sAttribute,$sData) { $this->xml .= $this->_cmdXML(array("n"=>"pp","t"=>$sTarget,"p"=>$sAttribute),$sData); } // addReplace() adds an replace command message to the XML response // $sTarget is a string containing the id of an HTML element // $sAttribute is the part of the element you wish to modify ("innerHTML", "value", etc.) // $sSearch is a string to search for // $sData is a string to replace the search string when found in the attribute // usage: $objResponse->addReplace("contentDiv", "innerHTML", "text", "text"); function addReplace($sTarget,$sAttribute,$sSearch,$sData) { $sDta = ""; $this->xml .= $this->_cmdXML(array("n"=>"rp","t"=>$sTarget,"p"=>$sAttribute),$sDta); } // addClear() adds an clear command message to the XML response // $sTarget is a string containing the id of an HTML element // $sAttribute is the part of the element you wish to clear ("innerHTML", "value", etc.) // usage: $objResponse->addClear("contentDiv", "innerHTML"); function addClear($sTarget,$sAttribute) { $this->addAssign($sTarget,$sAttribute,''); } // addAlert() adds an alert command message to the XML response // $sMsg is the text to be displayed in the Javascript alert box // usage: $objResponse->addAlert("This is important information"); function addAlert($sMsg) { $this->xml .= $this->_cmdXML(array("n"=>"al"),$sMsg); } // addRedirect() uses the addScript() method to add a Javascript redirect to // another URL // $sURL is the URL to redirect the client browser to // usage: $objResponse->addRedirect("http://www.xajaxproject.org"); function addRedirect($sURL) { $this->addScript('window.location = "'.rawurlencode($sURL).'";'); } // addScript() adds a Javascript command message to the XML response // $sJS is a string containing Javascript code to be executed // usage: $objResponse->addScript("var x = prompt('get some text');"); function addScript($sJS) { $this->xml .= $this->_cmdXML(array("n"=>"js"),$sJS); } // addRemove() adds a remove element command message to the XML response // $sTarget is a string containing the id of an HTML element to be removed // from your page // usage: $objResponse->addRemove("Div2"); function addRemove($sTarget) { $this->xml .= $this->_cmdXML(array("n"=>"rm","t"=>$sTarget),''); } // addCreate() adds a create element command message to the XML response // $sParent is a string containing the id of an HTML element to which the new // element will be appended. // $sTag is the tag to be added // $sId is the id to be assigned to the new element // $sType has been deprecated, use the addCreateInput() method instead // usage: $objResponse->addCreate("parentDiv", "h3", "myid"); function addCreate($sParent, $sTag, $sId, $sType="") { if ($sType) { trigger_error("The \$sType parameter of addCreate has been deprecated. Use the addCreateInput() method instead.", E_USER_WARNING); return; } $this->xml .= $this->_cmdXML(array("n"=>"ce","t"=>$sParent,"p"=>$sId),$sTag); } // addInsert() adds an insert element command message to the XML response // $sBefore is a string containing the id of the child before which the new element // will be inserted // $sTag is the tag to be added // $sId is the id to be assigned to the new element // usage: $objResponse->addInsert("childDiv", "h3", "myid"); function addInsert($sBefore, $sTag, $sId) { $this->xml .= $this->_cmdXML(array("n"=>"ie","t"=>$sBefore,"p"=>$sId),$sTag); } // addCreateInput() adds a create input command message to the XML response // $sParent is a string containing the id of an HTML element to which the new // input will be appended // $sType is the type of input to be created (text, radio, checkbox, etc.) // $sName is the name to be assigned to the new input and the variable name when it is submitted // $sId is the id to be assigned to the new input // usage: $objResponse->addCreateInput("form1", "text", "username", "input1"); function addCreateInput($sParent, $sType, $sName, $sId) { $this->xml .= $this->_cmdXML(array("n"=>"ci","t"=>$sParent,"p"=>$sId,"c"=>$sType),$sName); } // addInsertInput() adds an insert input command message to the XML response // $sBefore is a string containing the id of the child before which the new element // will be inserted // $sType is the type of input to be created (text, radio, checkbox, etc.) // $sName is the name to be assigned to the new input and the variable name when it is submitted // $sId is the id to be assigned to the new input // usage: $objResponse->addInsertInput("input5", "text", "username", "input1"); function addInsertInput($sBefore, $sType, $sName, $sId) { $this->xml .= $this->_cmdXML(array("n"=>"ii","t"=>$sBefore,"p"=>$sId,"c"=>$sType),$sName); } // addEvent() adds an event command message to the XML response // $sTarget is a string containing the id of an HTML element // $sEvent is the event you wish to set ("click", "mouseover", etc.) // $sScript is the Javascript string you want to the event to invoke // usage: $objResponse->addEvent("contentDiv", "click", "alert(\'Hello World\');"); function addEvent($sTarget,$sEvent,$sScript) { $this->xml .= $this->_cmdXML(array("n"=>"ev","t"=>$sTarget,"p"=>$sEvent),$sScript); } // addHandler() adds a handler command message to the XML response // $sTarget is a string containing the id of an HTML element // $sEvent is the event you wish to set ("click", "mouseover", etc.) // $sHandler is a string containing the name of a Javascript function // that will handle the event. Multiple handlers can be added for the same event // usage: $objResponse->addHandler("contentDiv", "click", "content_click"); function addHandler($sTarget,$sEvent,$sHandler) { $this->xml .= $this->_cmdXML(array("n"=>"ah","t"=>$sTarget,"p"=>$sEvent),$sHandler); } // addRemoveHandler() adds a remove handler command message to the XML response // $sTarget is a string containing the id of an HTML element // $sEvent is the event you wish to remove ("click", "mouseover", etc.) // $sHandler is a string containing the name of a Javascript handler function // that you want to remove // usage: $objResponse->addRemoveHandler("contentDiv", "click", "content_click"); function addRemoveHandler($sTarget,$sEvent,$sHandler) { $this->xml .= $this->_cmdXML(array("n"=>"rh","t"=>$sTarget,"p"=>$sEvent),$sHandler); } // addIncludeScript() adds an include script command message to the XML response // $sFileName is a URL of the Javascript file to include // usage: $objResponse->addIncludeScript("functions.js"); function addIncludeScript($sFileName) { $this->xml .= $this->_cmdXML(array("n"=>"in"),$sFileName); } // getXML() returns the XML to be returned from your function to the xajax // processor on your page. Since xajax 0.2, you can also return an xajaxResponse // object from your function directly, and xajax will automatically request the // XML using this method call. // usage: return $objResponse->getXML(); function getXML() { $sXML = "sEncoding && strlen(trim($this->sEncoding)) > 0) $sXML .= " encoding=\"".$this->sEncoding."\""; $sXML .= " ?".">" . $this->xml . ""; return $sXML; } // loadXML() adds the commands of the provided response XML output to this // response object // $sXML is the response XML (returned from a getXML() method) to add to the // end of this response object // usage: $r1 = $objResponse1->getXML(); // $objResponse2->loadXML($r1); // return $objResponse2->getXML(); function loadXML($sXML) { $sNewXML = ""; $iStartPos = strpos($sXML, "") + 5; $sNewXML = substr($sXML, $iStartPos); $iEndPos = strpos($sNewXML, ""); $sNewXML = substr($sNewXML, 0, $iEndPos); $this->xml .= $sNewXML; } // private method, used internally function _cmdXML($aAttributes, $sData) { $xml = " $sValue) $xml .= " $sAttribute=\"$sValue\""; if ($sData && !stristr($sData,'"; else if ($sData) $xml .= ">$sData"; else $xml .= ">"; return $xml; } }// end class xajaxResponse ?>netmrg-0.20/www/lib/xajax/xajax.inc.php0000664000076400007640000007051110447321376020231 0ustar silfreedsilfreedaFunctions = array(); $this->aObjects = array(); $this->aFunctionIncludeFiles = array(); $this->sRequestURI = $sRequestURI; if ($this->sRequestURI == "") $this->sRequestURI = $this->_detectURI(); $this->sWrapperPrefix = $sWrapperPrefix; $this->setCharEncoding($sEncoding); $this->bDebug = $bDebug; $this->bWaitCursor = true; $this->bExitAllowed = true; $this->bErrorHandler = false; $this->sLogFile = ""; $this->bCleanBuffer = true; } // setRequestURI() sets the URI to which requests will be made // usage: $xajax->setRequestURI("http://xajax.sourceforge.net"); function setRequestURI($sRequestURI) { $this->sRequestURI = $sRequestURI; } // debugOn() enables debug messages for xajax function debugOn() { $this->bDebug = true; } // debugOff() disables debug messages for xajax (default behavior) function debugOff() { $this->bDebug = false; } // statusMessagesOn() enables messages in the statusbar for xajax function statusMessagesOn() { $this->bStatusMessages = true; } // statusMessagesOff() disables messages in the statusbar for xajax (default behavior) function statusMessagesOff() { $this->bStatusMessages = false; } // waitCursor() enables the wait cursor to be displayed in the browser (default behavior) function waitCursorOn() { $this->bWaitCursor = true; } // waitCursorOff() disables the wait cursor to be displayed in the browser function waitCursorOff() { $this->bWaitCursor = false; } // exitAllowedOn() enables xajax to exit immediately after processing a request // and sending the response back to the browser (default behavior) function exitAllowedOn() { $this->bExitAllowed = true; } // exitAllowedOff() disables xajax's default behavior of exiting immediately // after processing a request and sending the response back to the browser function exitAllowedOff() { $this->bExitAllowed = false; } // errorHandlerOn() turns on xajax's error handling system so that PHP errors // that occur during a request are trapped and pushed to the browser in the // form of a Javascript alert function errorHandlerOn() { $this->bErrorHandler = true; } // errorHandlerOff() turns off xajax's error handling system (default behavior) function errorHandlerOff() { $this->bErrorHandler = false; } // setLogFile() specifies a log file that will be written to by xajax during // a request (used only by the error handling system at present). If you don't // invoke this method, or you pass in "", then no log file will be written to. // usage: $xajax->setLogFile("/xajax_logs/errors.log"); function setLogFile($sFilename) { $this->sLogFile = $sFilename; } // cleanBufferOn() causes xajax to clean out all output buffers before outputting // a response (default behavior) function cleanBufferOn() { $this->bCleanBuffer = true; } // cleanBufferOff() turns off xajax's output buffer cleaning function cleanBufferOff() { $this->bCleanBuffer = false; } // setWrapperPrefix() sets the prefix that will be appended to the Javascript // wrapper functions (default is "xajax_"). function setWrapperPrefix($sPrefix) { $this->sWrapperPrefix = $sPrefix; } // setCharEncoding() sets the character encoding to be used by xajax // usage: $xajax->setCharEncoding("utf-8"); // *Note: to change the default character encoding for all xajax responses, set // the XAJAX_DEFAULT_CHAR_ENCODING constant near the beginning of the xajax.inc.php file function setCharEncoding($sEncoding) { $this->sEncoding = $sEncoding; } // registerFunction() registers a PHP function or method to be callable through // xajax in your Javascript. If you want to register a function, pass in the name // of that function. If you want to register a static class method, pass in an array // like so: // array("myFunctionName", "myClass", "myMethod") // For an object instance method, use an object variable for the second array element // (and in PHP 4 make sure you put an & before the variable to pass the object by // reference). Note: the function name is what you call via Javascript, so it can be // anything as long as it doesn't conflict with any other registered function name. // // $mFunction is a string containing the function name or an object callback array // $sRequestType is the RequestType (XAJAX_GET/XAJAX_POST) that should be used // for this function. Defaults to XAJAX_POST. // usage: $xajax->registerFunction("myFunction"); // or: $xajax->registerFunction(array("myFunctionName", &$myObject, "myMethod")); function registerFunction($mFunction,$sRequestType=XAJAX_POST) { if (is_array($mFunction)) { $this->aFunctions[$mFunction[0]] = 1; $this->aFunctionRequestTypes[$mFunction[0]] = $sRequestType; $this->aObjects[$mFunction[0]] = array_slice($mFunction, 1); } else { $this->aFunctions[$mFunction] = 1; $this->aFunctionRequestTypes[$mFunction] = $sRequestType; } } // registerExternalFunction() registers a PHP function to be callable through xajax // which is located in some other file. If the function is requested the external // file will be included to define the function before the function is called // $mFunction is a string containing the function name or an object callback array // see registerFunction() for more info on object callback arrays // $sIncludeFile is a string containing the path and filename of the include file // $sRequestType is the RequestType (XAJAX_GET/XAJAX_POST) that should be used // for this function. Defaults to XAJAX_POST. // usage: $xajax->registerExternalFunction("myFunction","myFunction.inc.php",XAJAX_POST); function registerExternalFunction($mFunction,$sIncludeFile,$sRequestType=XAJAX_POST) { $this->registerFunction($mFunction, $sRequestType); if (is_array($mFunction)) { $this->aFunctionIncludeFiles[$mFunction[0]] = $sIncludeFile; } else { $this->aFunctionIncludeFiles[$mFunction] = $sIncludeFile; } } // registerCatchAllFunction() registers a PHP function to be called when xajax cannot // find the function being called via Javascript. Because this is technically // impossible when using "wrapped" functions, the catch-all feature is only useful // when you're directly using the xajax.call() Javascript method. Use the catch-all // feature when you want more dynamic ability to intercept unknown calls and handle // them in a custom way. // $mFunction is a string containing the function name or an object callback array // see registerFunction() for more info on object callback arrays // usage: $xajax->registerCatchAllFunction("myCatchAllFunction"); function registerCatchAllFunction($mFunction) { if (is_array($mFunction)) { $this->sCatchAllFunction = $mFunction[0]; $this->aObjects[$mFunction[0]] = array_slice($mFunction, 1); } else { $this->sCatchAllFunction = $mFunction; } } // registerPreFunction() registers a PHP function to be called before xajax calls // the requested function. xajax will automatically add the request function's response // to the pre-function's response to create a single response. Another feature is // the ability to return not just a response, but an array with the first element // being false (a boolean) and the second being the response. In this case, the // pre-function's response will be returned to the browser without xajax calling // the requested function. // $mFunction is a string containing the function name or an object callback array // see registerFunction() for more info on object callback arrays // usage $xajax->registerPreFunction("myPreFunction"); function registerPreFunction($mFunction) { if (is_array($mFunction)) { $this->sPreFunction = $mFunction[0]; $this->aObjects[$mFunction[0]] = array_slice($mFunction, 1); } else { $this->sPreFunction = $mFunction; } } // returns true if xajax can process the request, false if otherwise // you can use this to determine if xajax needs to process the request or not function canProcessRequests() { if ($this->getRequestMode() != -1) return true; return false; } // returns the current request mode, or -1 if there is none function getRequestMode() { if (!empty($_GET["xajax"])) return XAJAX_GET; if (!empty($_POST["xajax"])) return XAJAX_POST; return -1; } // processRequests() is the main communications engine of xajax // The engine handles all incoming xajax requests, calls the apporiate PHP functions // and passes the xml responses back to the javascript response handler // if your RequestURI is the same as your web page then this function should // be called before any headers or html has been sent. // usage: $xajax->processRequests() function processRequests() { $requestMode = -1; $sFunctionName = ""; $bFoundFunction = true; $bFunctionIsCatchAll = false; $sFunctionNameForSpecial = ""; $aArgs = array(); $sPreResponse = ""; $bEndRequest = false; $sResponse = ""; $requestMode = $this->getRequestMode(); if ($requestMode == -1) return; if ($requestMode == XAJAX_POST) { $sFunctionName = $_POST["xajax"]; if (!empty($_POST["xajaxargs"])) $aArgs = $_POST["xajaxargs"]; } else { header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); header("Content-type: text/xml"); $sFunctionName = $_GET["xajax"]; if (!empty($_GET["xajaxargs"])) $aArgs = $_GET["xajaxargs"]; } // Use xajax error handler if necessary if ($this->bErrorHandler) { $GLOBALS['xajaxErrorHandlerText'] = ""; set_error_handler("xajaxErrorHandler"); } if ($this->sPreFunction) { if (!$this->_isFunctionCallable($this->sPreFunction)) { $bFoundFunction = false; $objResponse = new xajaxResponse(); $objResponse->addAlert("Unknown Pre-Function ". $this->sPreFunction); $sResponse = $objResponse->getXML(); } } //include any external dependencies associated with this function name if (array_key_exists($sFunctionName,$this->aFunctionIncludeFiles)) { ob_start(); include_once($this->aFunctionIncludeFiles[$sFunctionName]); ob_end_clean(); } if ($bFoundFunction) { $sFunctionNameForSpecial = $sFunctionName; if (!array_key_exists($sFunctionName, $this->aFunctions)) { if ($this->sCatchAllFunction) { $sFunctionName = $this->sCatchAllFunction; $bFunctionIsCatchAll = true; } else { $bFoundFunction = false; $objResponse = new xajaxResponse(); $objResponse->addAlert("Unknown Function $sFunctionName."); $sResponse = $objResponse->getXML(); } } else if ($this->aFunctionRequestTypes[$sFunctionName] != $requestMode) { $bFoundFunction = false; $objResponse = new xajaxResponse(); $objResponse->addAlert("Incorrect Request Type."); $sResponse = $objResponse->getXML(); } } if ($bFoundFunction) { for ($i = 0; $i < sizeof($aArgs); $i++) { // If magic quotes is on, then we need to strip the slashes from the args if (get_magic_quotes_gpc() == 1 && is_string($aArgs[$i])) { $aArgs[$i] = stripslashes($aArgs[$i]); } if (stristr($aArgs[$i],"") != false) { $aArgs[$i] = $this->_xmlToArray("xjxobj",$aArgs[$i]); } else if (stristr($aArgs[$i],"") != false) { $aArgs[$i] = $this->_xmlToArray("xjxquery",$aArgs[$i]); } } if ($this->sPreFunction) { $mPreResponse = $this->_callFunction($this->sPreFunction, array($sFunctionNameForSpecial, $aArgs)); if (is_array($mPreResponse) && $mPreResponse[0] === false) { $bEndRequest = true; $sPreResponse = $mPreResponse[1]; } else { $sPreResponse = $mPreResponse; } if (is_a($sPreResponse, "xajaxResponse")) { $sPreResponse = $sPreResponse->getXML(); } if ($bEndRequest) $sResponse = $sPreResponse; } if (!$bEndRequest) { if (!$this->_isFunctionCallable($sFunctionName)) { $objResponse = new xajaxResponse(); $objResponse->addAlert("The Registered Function $sFunctionName Could Not Be Found."); $sResponse = $objResponse->getXML(); } else { if ($bFunctionIsCatchAll) { $aArgs = array($sFunctionNameForSpecial, $aArgs); } $sResponse = $this->_callFunction($sFunctionName, $aArgs); } if (is_a($sResponse, "xajaxResponse")) { $sResponse = $sResponse->getXML(); } if (!is_string($sResponse) || strpos($sResponse, "") === FALSE) { $objResponse = new xajaxResponse(); $objResponse->addAlert("No XML Response Was Returned By Function $sFunctionName."); $sResponse = $objResponse->getXML(); } else if ($sPreResponse != "") { $sNewResponse = new xajaxResponse(); $sNewResponse->loadXML($sPreResponse); $sNewResponse->loadXML($sResponse); $sResponse = $sNewResponse->getXML(); } } } $sContentHeader = "Content-type: text/xml;"; if ($this->sEncoding && strlen(trim($this->sEncoding)) > 0) $sContentHeader .= " charset=".$this->sEncoding; header($sContentHeader); if ($this->bErrorHandler && !empty( $GLOBALS['xajaxErrorHandlerText'] )) { $sErrorResponse = new xajaxResponse(); $sErrorResponse->addAlert("** PHP Error Messages: **" . $GLOBALS['xajaxErrorHandlerText']); if ($this->sLogFile) { $fH = @fopen($this->sLogFile, "a"); if (!$fH) { $sErrorResponse->addAlert("** Logging Error **\n\nxajax was unable to write to the error log file:\n" . $this->sLogFile); } else { fwrite($fH, "** xajax Error Log - " . strftime("%b %e %Y %I:%M:%S %p") . " **" . $GLOBALS['xajaxErrorHandlerText'] . "\n\n\n"); fclose($fH); } } $sErrorResponse->loadXML($sResponse); $sResponse = $sErrorResponse->getXML(); } if ($this->bCleanBuffer) while (@ob_end_clean()); print $sResponse; if ($this->bErrorHandler) restore_error_handler(); if ($this->bExitAllowed) exit(); } // printJavascript() prints the xajax javascript code into your page by printing // the output of the getJavascript() method. It should only be called between the // tags in your HTML page. Remember, if you only want to obtain the // result of this function, use getJavascript() instead. // $sJsURI is the relative address of the folder where xajax has been installed. // For instance, if your PHP file is "http://www.myserver.com/myfolder/mypage.php" // and xajax was installed in "http://www.myserver.com/anotherfolder", then // $sJsURI should be set to "../anotherfolder". Defaults to assuming xajax is in // the same folder as your PHP file. // $sJsFile is the relative folder/file pair of the xajax Javascript engine located // within the xajax installation folder. Defaults to xajax_js/xajax.js. // usage: // // ... // < ?php $xajax->printJavascript(); ? > function printJavascript($sJsURI="", $sJsFile=NULL, $sJsFullFilename=NULL) { print $this->getJavascript($sJsURI, $sJsFile, $sJsFullFilename); } // getJavascript() returns the xajax javascript code that should be added to // your HTML page between the tags. See printJavascript() // for information about the function arguments. // usage: // < ?php $xajaxJSHead = $xajax->getJavascript(); ? > // // ... // < ?php echo $xajaxJSHead; ? > function getJavascript($sJsURI="", $sJsFile=NULL, $sJsFullFilename=NULL) { if ($sJsFile == NULL) $sJsFile = "xajax_js/xajax.js"; if ($sJsURI != "" && substr($sJsURI, -1) != "/") $sJsURI .= "/"; $html = "\t\n"; // Create a compressed file if necessary if ($sJsFullFilename) { $realJsFile = $sJsFullFilename; } else { $realPath = realpath(dirname(__FILE__)); $realJsFile = $realPath . "/". $sJsFile; } $srcFile = str_replace(".js", "_uncompressed.js", $realJsFile); if (!file_exists($srcFile)) { trigger_error("The xajax uncompressed Javascript file could not be found in the " . dirname($realJsFile) . " folder. Error ", E_USER_ERROR); } if ($this->bDebug) { if (!@copy($srcFile, $realJsFile)) { trigger_error("The xajax uncompressed javascript file could not be copied to the " . dirname($realJsFile) . " folder. Error ", E_USER_ERROR); } } else if (!file_exists($realJsFile)) { require(dirname($realJsFile) . "/xajaxCompress.php"); $javaScript = implode('', file($srcFile)); $compressedScript = xajaxCompressJavascript($javaScript); $fH = @fopen($realJsFile, "w"); if (!$fH) { trigger_error("The xajax compressed javascript file could not be written in the " . dirname($realJsFile) . " folder. Error ", E_USER_ERROR); } else { fwrite($fH, $compressedScript); fclose($fH); } } //$html .= "\t\n"; return $html; } // _detectURL() returns the current URL based upon the SERVER vars // used internally function _detectURI() { $aURL = array(); // Try to get the request URL if (!empty($_SERVER['REQUEST_URI'])) { $aURL = parse_url($_SERVER['REQUEST_URI']); } // Fill in the empty values if (empty($aURL['scheme'])) { if (!empty($_SERVER['HTTP_SCHEME'])) { $aURL['scheme'] = $_SERVER['HTTP_SCHEME']; } else { $aURL['scheme'] = (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') ? 'https' : 'http'; } } if (empty($aURL['host'])) { if (!empty($_SERVER['HTTP_HOST'])) { if (strpos($_SERVER['HTTP_HOST'], ':') > 0) { list($aURL['host'], $aURL['port']) = explode(':', $_SERVER['HTTP_HOST']); } else { $aURL['host'] = $_SERVER['HTTP_HOST']; } } else if (!empty($_SERVER['SERVER_NAME'])) { $aURL['host'] = $_SERVER['SERVER_NAME']; } else { print "xajax Error: xajax failed to automatically identify your Request URI."; print "Please set the Request URI explicitly when you instantiate the xajax object."; exit(); } } if (empty($aURL['port']) && !empty($_SERVER['SERVER_PORT'])) { $aURL['port'] = $_SERVER['SERVER_PORT']; } if (empty($aURL['path'])) { if (!empty($_SERVER['PATH_INFO'])) { $sPath = parse_url($_SERVER['PATH_INFO']); } else { $sPath = parse_url($_SERVER['PHP_SELF']); } $aURL['path'] = $sPath['path']; unset($sPath); } if (!empty($aURL['query'])) { $aURL['query'] = '?'.$aURL['query']; } // Build the URL: Start with scheme, user and pass $sURL = $aURL['scheme'].'://'; if (!empty($aURL['user'])) { $sURL.= $aURL['user']; if (!empty($aURL['pass'])) { $sURL.= ':'.$aURL['pass']; } $sURL.= '@'; } // Add the host $sURL.= $aURL['host']; // Add the port if needed if (!empty($aURL['port']) && (($aURL['scheme'] == 'http' && $aURL['port'] != 80) || ($aURL['scheme'] == 'https' && $aURL['port'] != 443))) { $sURL.= ':'.$aURL['port']; } // Add the path and the query string $sURL.= $aURL['path'].@$aURL['query']; // Clean up unset($aURL); return $sURL; } // returns true if the function name is associated with an object callback, // false if not. // user internally function _isObjectCallback($sFunction) { if (array_key_exists($sFunction, $this->aObjects)) return true; return false; } // return true if the function or object callback can be called, false if not // user internally function _isFunctionCallable($sFunction) { if ($this->_isObjectCallback($sFunction)) { if (is_object($this->aObjects[$sFunction][0])) { return method_exists($this->aObjects[$sFunction][0], $this->aObjects[$sFunction][1]); } else { return is_callable($this->aObjects[$sFunction]); } } else { return function_exists($sFunction); } } // calls the function, class method, or object method with the supplied arguments // user internally function _callFunction($sFunction, $aArgs) { if ($this->_isObjectCallback($sFunction)) { $mReturn = call_user_func_array($this->aObjects[$sFunction], $aArgs); } else { $mReturn = call_user_func_array($sFunction, $aArgs); } return $mReturn; } // generates the javascript wrapper for the specified PHP function // used internally function _wrap($sFunction,$sRequestType=XAJAX_POST) { $js = "function ".$this->sWrapperPrefix."$sFunction(){return xajax.call(\"$sFunction\", arguments, ".$sRequestType.");}\n"; return $js; } // _xmlToArray() takes a string containing xajax xjxobj xml or xjxquery xml // and builds an array representation of it to pass as an argument to // the php function being called. Returns an array. // used internally function _xmlToArray($rootTag, $sXml) { $aArray = array(); $sXml = str_replace("<$rootTag>","<$rootTag>|~|",$sXml); $sXml = str_replace("","|~|",$sXml); $sXml = str_replace("","|~|",$sXml); $sXml = str_replace("","|~|",$sXml); $sXml = str_replace("","|~|",$sXml); $sXml = str_replace("","|~||~|",$sXml); $sXml = str_replace("","|~|",$sXml); $sXml = str_replace("","|~||~|",$sXml); $sXml = str_replace("","|~|",$sXml); $sXml = str_replace("","|~||~|",$sXml); $this->aObjArray = explode("|~|",$sXml); $this->iPos = 0; $aArray = $this->_parseObjXml($rootTag); return $aArray; } // _parseObjXml() is a recursive function that generates an array from the // contents of $this->aObjArray. Returns an array. // used internally function _parseObjXml($rootTag) { $aArray = array(); if ($rootTag == "xjxobj") { while(!stristr($this->aObjArray[$this->iPos],"")) { $this->iPos++; if(stristr($this->aObjArray[$this->iPos],"")) { $key = ""; $value = null; $this->iPos++; while(!stristr($this->aObjArray[$this->iPos],"")) { if(stristr($this->aObjArray[$this->iPos],"")) { $this->iPos++; while(!stristr($this->aObjArray[$this->iPos],"")) { $key .= $this->aObjArray[$this->iPos]; $this->iPos++; } } if(stristr($this->aObjArray[$this->iPos],"")) { $this->iPos++; while(!stristr($this->aObjArray[$this->iPos],"")) { if(stristr($this->aObjArray[$this->iPos],"")) { $value = $this->_parseObjXml("xjxobj"); $this->iPos++; } else { $value .= $this->aObjArray[$this->iPos]; } $this->iPos++; } } $this->iPos++; } $aArray[$key]=$value; } } } if ($rootTag == "xjxquery") { $sQuery = ""; $this->iPos++; while(!stristr($this->aObjArray[$this->iPos],"")) { if (stristr($this->aObjArray[$this->iPos],"") || stristr($this->aObjArray[$this->iPos],"")) { $this->iPos++; continue; } $sQuery .= $this->aObjArray[$this->iPos]; $this->iPos++; } parse_str($sQuery, $aArray); // If magic quotes is on, then we need to strip the slashes from the // array values because of the parse_str pass which adds slashes if (get_magic_quotes_gpc() == 1) { $newArray = array(); foreach ($aArray as $sKey => $sValue) { if (is_string($sValue)) $newArray[$sKey] = stripslashes($sValue); else $newArray[$sKey] = $sValue; } $aArray = $newArray; } } return $aArray; } }// end class xajax // xajaxErrorHandler() is registered with PHP's set_error_handler() function if // the xajax error handling system is turned on // used by the xajax class function xajaxErrorHandler($errno, $errstr, $errfile, $errline) { $errorReporting = error_reporting(); if ($errorReporting == 0) return; if ($errno == E_NOTICE) { $errTypeStr = "NOTICE"; } else if ($errno == E_WARNING) { $errTypeStr = "WARNING"; } else if ($errno == E_USER_NOTICE) { $errTypeStr = "USER NOTICE"; } else if ($errno == E_USER_WARNING) { $errTypeStr = "USER WARNING"; } else if ($errno == E_USER_ERROR) { $errTypeStr = "USER FATAL ERROR"; } else if ($errno == E_STRICT) { return; } else { $errTypeStr = "UNKNOWN: $errno"; } $GLOBALS['xajaxErrorHandlerText'] .= "\n----\n[$errTypeStr] $errstr\nerror in line $errline of file $errfile"; } ?> netmrg-0.20/www/lib/xajax/LICENSE.txt0000775000076400007640000006447010447321376017472 0ustar silfreedsilfreed GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! netmrg-0.20/bootstrap0000775000076400007640000000036110772570211015062 0ustar silfreedsilfreed#!/bin/sh set -x aclocal -I m4 --install autoheader automake --foreign --add-missing --copy \ Makefile \ etc/Makefile \ m4/Makefile \ src/Makefile \ var/Makefile \ var/lib/Makefile \ var/lib/rrd/Makefile \ www/Makefile autoconf