[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-patches
Subject:    [Net-snmp-patches] [ net-snmp-Patches-918410 ] SNMPCONF dynamic paths
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2004-04-20 6:22:38
Message-ID: E1BFoeU-0004O7-00 () sc8-sf-web4 ! sourceforge ! net
[Download RAW message or body]

Patches item #918410, was opened at 2004-03-17 18:58
Message generated for change (Settings changed) made by slif
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=918410&group_id=12694

Category: None
Group: None
Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Alex Burger (alex_b)
Assigned to: Michael J. Slifcak (slif)
Summary: SNMPCONF dynamic paths

Initial Comment:
The snmpconf Perl script has hard coded paths such as:

/usr/local/share/snmp
/usr/local/etc/snmp
/usr/local/share/snmp/snmpconf-data

The default location for installing configuration files
is set to /usr/local/share/snmp.

The attached patch makes the following changes:

-determines the 'prefix' of the installed Net-SNMP
using three methods:
 1) SNMPPREFIX environment variable
 2) Result of 'net-snmp-config --prefix'
 3) Default specified by $default_prefix in the script

-the default install dir has been changed from 
 /usr/local/share/snmp to
 $prefix/etc/snmp (/usr/local/etc/snmp)

-the script will attempt to create the 'install'
directory if it doesn't exist (uses mkdir, will not
create entire tree, only last dir)

-the 'searchpath' used when searching for existing
config files now includes the value for -I (user
specified install path)


Other changes not visible to users:

-the default prefix is set to: /usr/local

-the home variable is stored in the $home Perl variable
so we don't get 'undefined variable' errors when
running on systems with $HOME defined.

-help screen uses $prefix and $home for -i and -p

-conf_dir has been changed from
 /usr/local/share/snmp/snmpconf-data to
 $prefix/share/snmp/snmpconf-data

For Windows users, setting SNMPPREFIX will allow the
user to run "snmpconf -i" instead of having to pass the
-I and -c switches.  Example:

set SNMPPREFX=c:/Program Files/Net-SNMP
perl snmpconf -i

Also appears to work fine on Linux.


----------------------------------------------------------------------

Comment By: Michael J. Slifcak (slif)
Date: 2004-04-20 02:06

Message:
Logged In: YES 
user_id=88697

Thanks for the patch!  It has been applied to the 5.1.x
code base and the main development tree, and will
appear in future releases of the net-snmp package.

----------------------------------------------------------------------

Comment By: Michael J. Slifcak (slif)
Date: 2004-04-20 02:06

Message:
Logged In: YES 
user_id=88697

patch-snmpconf-paths6 was applied 

----------------------------------------------------------------------

Comment By: Alex Burger (alex_b)
Date: 2004-04-03 10:42

Message:
Logged In: YES 
user_id=85836

patch-snmpconf-paths6:

Minor change to allow spaces in paths (quotes inside a qw//).


----------------------------------------------------------------------

Comment By: Alex Burger (alex_b)
Date: 2004-03-31 18:00

Message:
Logged In: YES 
user_id=85836

patch-snmpconf-paths5:

I did not realize that make modified the
/usr/local/share/snmp path in snmpconf script while building
so here is a new patch.  Patch patch-snmpconf-paths5 makes
the following changes from the standard snmpconf:

-uses env SNMPSHAREPATH if set, otherwise
/usr/local/share/snmp/snmpconf-data

-uses env SNMPCONFPATH if set, otherwise /usr/local/share/snmp

-the home variable is stored in the $home Perl variable so
we don't get 'undefined variable' errors when running on
systems without env $HOME defined.

-the script will attempt to create the 'install' directory
if it doesn't exist (uses mkdir, will not create entire
tree, only last dir)

Windows users compiling with MSVC will need to have
SNMPCONFPATH and SNMPSHAREPATH set.  Another patch should
follow that modifies the win32 build.pl system to modify
snmpconf in the same way as it does under Unix.


----------------------------------------------------------------------

Comment By: Alex Burger (alex_b)
Date: 2004-03-29 11:35

Message:
Logged In: YES 
user_id=85836

patch-snmpconf-paths4 fixes the 'nul' problem.  If Windows
is detected, it skips the net-snmp-config check, and also
uses /dev/null instead of nul.


----------------------------------------------------------------------

Comment By: Michael J. Slifcak (slif)
Date: 2004-03-22 17:54

Message:
Logged In: YES 
user_id=88697

when run on Linux, is there a local file "nul" created ?

 See line 25 ...

----------------------------------------------------------------------

Comment By: Alex Burger (alex_b)
Date: 2004-03-18 07:06

Message:
Logged In: YES 
user_id=85836

Patch patch-snmpconf-paths3 adds a check for the
SNMPCONFPATH environment variable, and a different default
prefix for Windows (c:/usr).

Also, the 'searchpath' already included the -I value, so
ignore that statement in the summary of this patch.



----------------------------------------------------------------------

Comment By: Alex Burger (alex_b)
Date: 2004-03-17 19:07

Message:
Logged In: YES 
user_id=85836

Patch patch-snmpconf-paths2 changes:

-the default install dir has been changed from
/usr/local/share/snmp to
value of SNMPCONFPATH if defined, otherwise $prefix/etc/snmp
(/usr/local/etc/snmp)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=918410&group_id=12694


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Net-snmp-patches mailing list
Net-snmp-patches@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-patches
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic