diff .bashrc @ 18:ebc3f864376c

Removed the LD_LIBRARY_PATH lines entirely since I've not seen any ill effects (haven't tested much either, but they can always be replaced). Added logic to setup MIBDIRS and MIBS for easier commandline snmpeeing.
author huston@80426f53-59d1-405d-934b-f07cd76f4a1a
date Wed, 25 Nov 2009 18:05:41 +0000
parents 90ad040b032c
children f65964738bab
line wrap: on
line diff
--- a/.bashrc	Wed Oct 21 20:56:57 2009 +0000
+++ b/.bashrc	Wed Nov 25 18:05:41 2009 +0000
@@ -84,11 +84,6 @@
       [[ "$MANPATH" =~ "(^|:)$D/man($|:)" ]] || \
       export MANPATH=$D/man:${MANPATH:+$MANPATH}
    fi
-   
-#   if [ -d $D/lib ]; then 
-#      [[ "$LD_LIBRARY_PATH" =~ "(^|:)$D/lib($|:)" ]] || \
-#      export LD_LIBRARY_PATH=$D/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-#   fi
 done
 
 # Add-ons for Intel compilers at work, and Condor
@@ -111,3 +106,15 @@
 # (some versions of man take care of this, but it doesn't hurt to have it
 # anyway)
 [[ "$MANPATH" =~ ":$" ]] || export MANPATH=$MANPATH:
+
+# Store MIBs in ~/mibs and they'll be added here.  Can nest directories
+# (they'll be searched).
+if [ -d $HOME/mibs ]; then
+   for D in `find $HOME/mibs -type d` ; do
+      [[ "$MIBDIRS" =~ "(^\+|:)$D($|:)" ]] || \
+	   export MIBDIRS=${MIBDIRS:+$MIBDIRS:}$D
+	done
+
+   [[ "$MIBDIRS" =~ "^\+" ]] || export MIBDIRS=+$MIBDIRS
+   export MIBS=ALL
+fi