X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=userapps%2Fopensource%2Fnet-snmp%2Fnet-snmp-config;fp=userapps%2Fopensource%2Fnet-snmp%2Fnet-snmp-config;h=0000000000000000000000000000000000000000;hb=6adeba4d92a546ebbadde2562283ee6b984b22c1;hp=0b0b889870715a7ae4d22465b24be3852b562e25;hpb=dacd86d83a9fb430cca42cb78a67f9d46e289f5c;p=bcm963xx.git diff --git a/userapps/opensource/net-snmp/net-snmp-config b/userapps/opensource/net-snmp/net-snmp-config deleted file mode 100644 index 0b0b8898..00000000 --- a/userapps/opensource/net-snmp/net-snmp-config +++ /dev/null @@ -1,337 +0,0 @@ -#!/bin/sh - -# this shell script is designed to merely dump the configuration -# information about how the net-snmp package was compiled. The -# information is particularily useful for applications that need to -# link against the net-snmp libraries and hence must know about any -# other libraries that must be linked in as well. - -NSC_BASE_AGENT_LIBS="-lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp" - -if test "x$1" = "x"; then - usage="yes" -else - exec_prefix=/usr/local - prefix=/usr/local - case $1 in - --debug-tokens) - echo "find NET-SNMP-SOURCE-DIR -name \"*.c\" -print | xargs grep DEBUGMSGT | grep \\\" | cut -f 2 -d\\\" | sort -u" - ;; - --indent-options) - echo "indent -orig -nbc -bap -nut -nfca `(cd NET-SNMP-INCLUDE-DIR; perl -n -e 'print "-T $1 " if (/}\s*(netsnmp_\w+)\s*;/);' */*.h)`" - ;; - --configure-options) - echo " --with-default-snmp-version=2 --with-out-transports=TCP --with-mib-modules=mibII '--with-out-mib-modules=snmpv3mibs ucd_snmp agent_mibs agentx target'" - ;; - --snmpd-module-list) - echo mibII/system_mib mibII/sysORTable mibII/at mibII/interfaces mibII/snmp_mib mibII/tcp mibII/icmp mibII/ip mibII/udp mibII/vacm_vars mibII/setSerialNo notification/snmpNotifyTable notification/snmpNotifyFilterTable notification/snmpNotifyFilterProfileTable utilities/override util_funcs mibII/kernel_linux mibII/tcpTable mibII/ipAddr mibII/var_route mibII/route_write mibII/udpTable mibII/vacm_context header_complex - ;; - --base-cflags) - echo -g -O2 -Dlinux -I${prefix}/include - ;; - --cflags) - echo -g -O2 -Dlinux -I. -I${prefix}/include - ;; - --agent-libs) - # use this one == --netsnmp-agent-libs + --external-libs - echo -L${exec_prefix}/lib $NSC_BASE_AGENT_LIBS -ldl -lcrypto -lelf -lm - ;; - --libs) - # use this one == --netsnmp-libs + --external-libs - echo -L${exec_prefix}/lib -lnetsnmp -lcrypto -lelf -lm - ;; - --external-libs) - echo -lcrypto -lelf -lm - ;; - --external-agent-libs) - echo -ldl -lcrypto -lelf -lm - ;; - --netsnmp-libs) - echo -L${exec_prefix}/lib -lnetsnmp - ;; - --netsnmp-agent-libs) - echo -L${exec_prefix}/lib $NSC_BASE_AGENT_LIBS - ;; - --version) - echo 5.0.8 - ;; - --help) - usage="yes" - ;; - --prefix) - echo /usr/local - ;; - --exec-prefix) - echo /usr/local - ;; - --create-snmpv3-user) - if /bin/ps -e | egrep ' snmpd *$' > /dev/null 2>&1 ; then - echo "Apparently at least one snmpd demon is already running." - echo "You must stop them in order to use this command." - exit 1 - fi - - Aalgorithm="MD5" - Xalgorithm="DES" - token=rwuser - shift - arg=$1 - shift - while test "x$done" = "x" -a "x$arg" != "x" ; do - case $arg in - -A) - Aalgorithm=$1 - shift - ;; - -X) - Xalgorithm=$1 - shift - ;; - -a) - apassphrase=$1 - shift - ;; - -x) - xpassphrase=$1 - shift - ;; - -ro) - token="rouser" - ;; - -*) - echo "unknown suboption to --create-snmpv3-user: $arg" - exit 1 - ;; - *) - done=1 - ;; - esac - if test "x$done" = "x" ; then - arg=$1 - shift - fi - done - - user=$arg - if test "x$user" = "x" ; then - prompt=yes - echo "Enter a SNMPv3 user name to create: " - read user - fi - if test "x$user" = "x" ; then - echo "You must specify a user name" - exit 1 - fi - - if test "x$apassphrase" = "x" ; then - prompt=yes - echo "Enter authentication pass-phrase: " - read apassphrase - else - shift - fi - if test "x$apassphrase" = "x" ; then - echo "You must specify an authentication pass-phrase" - exit 1 - fi - - if test "x$prompt" = "xyes" -a "x$xpassphrase" = "x" ; then - echo "Enter encryption pass-phrase: " - echo " [press return to reuse the authentication pass-phrase]" - read xpassphrase - fi - - outfile="/var/net-snmp/snmpd.conf" - line="createUser $user $Aalgorithm \"$apassphrase\" $Xalgorithm $xpassphrase" - echo "adding the following line to $outfile:" - echo " " $line - echo $line >> $outfile - - outfile="${prefix}/share/snmp/snmpd.conf" - line="$token $user" - echo "adding the following line to $outfile:" - echo " " $line - echo $line >> $outfile - ;; - - --compile-subagent) - shift - outname=$1 - shift - if test $1 = "--norm" ; then - norm=1 - shift - fi - if test $1 = "--cflags" ; then - shift - cflags=$1 - echo "setting extra cflags: $cflags" - shift - fi - if test $1 = "--ldflags" ; then - shift - ldflags=$1 - echo "setting extra ldflags: $ldflags" - shift - fi - tmpfile=netsnmptmp.$$.c - if test -f $tmpfile; then - echo "Ack. Can't create $tmpfile: already exists" - exit 1 - fi - echo "generating the tmporary code file: $tmpfile" - rm -f $tmp - cat > $tmpfile < -#ifdef HAVE_SIGNAL_H -#include -#endif /* HAVE_SIGNAL_H */ -#include -#include -EOF - - # add include files - while test "$1" != ""; do - cfiles="$cfiles $1" - name=`basename $1 | sed 's/\.[co]$/.h/'` - if test -f $name.h; then - if grep "init_$name" $name; then - echo " #include\"$name\"" >> $tmpfile - fi - fi - shift - done - - cat >> $tmpfile <> $tmpfile - fi - shift - done - - # finish file - cat >> $tmpfile <