What makes sense to me is simply to allow the default rpm behavior of
creating the .rpmnew file if an old one exists and let the sysadmin
handle things from there.

What I'd do within the rpm is script out in the %pre scripting section,
before anything is changed, generating a warning message something
like...

gmond_version = `rpm -q gmond`
if ($gmond_version <= 2.5.x)
{
        echo "Big Nasty Warning: Blah blah blah. Upgrade your gmond.conf
you fool!"
} 


--Brett Lentz.
Systems Administrator, RHCE


Computer Science is merely the post-Turing Decline of Formal Systems
Theory


 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Matt Massie
> Sent: Monday, January 31, 2005 9:13 AM
> To: Ganglia Developers
> Subject: [Ganglia-developers] complete snapshot?
> 
> guys-
> 
> i've just built what i think it a complete snapshot (meaning 
> all features are working as they should).
> 
> this latest snapshot adds
> - support for "ttl" on multicast udp_send_channel definitions
> - fixed a minor bug in cygwin metric collection
> - has brooks fix for preventing a memory leak on freebsd in 
> low memory conditions
> 
> i've built all the file formats for a release at 
> http://matt-massie.com/ganglia/2.6.0/
> 
> if you want an old snapshot for some reason, they are 
> available at http://matt-massie.com/ganglia/2.6.0.archive/
> 
> the rpms seem to work (i installed gmond/gmetad/web and it worked).
> 
> i have a question about the rpms.
> 
> i don't know exactly how to handle the configuration file conversion.
> currently, the rpm installs and default gmond.conf in /etc/ 
> unless a file by that name exists and then it creates the 
> file as /etc/gmond.conf.rpmnew.
> 
> to convert the file requires something like
> 
>    % mv /etc/gmond.conf /etc/gmond.conf.bak
>    % gmond --convert /etc/gmond.conf.bak > /etc/gmond.conf
> 
> i don't know if i really want that in the rpm (other than 
> echoing the need to run the commands to the terminal).
> 
> to do this Right i'll need to build code to determine if a 
> configuration file is version 2.5.x or 2.6.x (which i don't 
> have yet).  the logic would be something like.
> 
> if(/etc/gmond.conf doesn't exist)
>    install the rpm default /etc/gmond.conf if(/etc/gmond.conf 
> DOES exist)
>    {
>      if(/etc/gmond.conf is old format)
>         convert to new format
>      else
>         install new rpm gmond.conf as /etc/gmond.conf.rpmnew
>    }
> 
> i always get nervous making too many things automatic (it 
> seems it always bites you) especially given the trusted_hosts 
> option might get mangled or something (it shouldn't but 
> things happen).
> 
> how would you guys like the rpm to behave?  what makes sense?
> 
> i'd like to announce 2.6.0 to the users soon.
> 
> -matt
> p.s. i'm working on building the windows installer.  it'll be 
> in the http://matt-massie.com/ganglia/2.6.0/ directory shortly.
> 
> --
> PGP fingerprint 'A7C2 3C2F 8445 AD3C 135E F40B 242A 5984 ACBC 91D3'
> 
>     They that can give up essential liberty to obtain a little
>        temporary safety deserve neither liberty nor safety.
>    --Benjamin Franklin, Historical Review of Pennsylvania, 1759
> 

Reply via email to