On Fri, Apr 11, 2008 at 7:03 PM, Bernard Li <[EMAIL PROTECTED]> wrote: > Right now I am working on the upgrade path from 3.0.x to 3.1.x. Since > there are diffs between 3.0.x gmond and 3.1.x gmond, I am proposing > the following changes in the spec file during upgrade: > > %postun > gmond -t > /tmp/gmond.conf.old /* generate default conf from 3.0.x */ > > %post > gmond -t > /tmp/gmond.conf /* generate default conf from 3.1.x */ > diff -ru /tmp/gmond.conf.old /tmp/gmond.conf > /tmp/gmond.conf.patch > cd /etc/ganglia > cp gmond.conf gmond.conf.3.0.x > patch -p2 < /tmp/gmond.conf.patch > > This *should* correctly update the old conf to the new conf. > > I guess the real question is whether we should automate this, or let > the user manually fix this themselves... > > Thoughts?
How about doing it both ways? If there is an existing /etc/gmond.conf, then create a new "patched" file as something like /etc/gmond.conf.upgrade_from_3.0.x. This leaves the existing file alone, reducing the risk of breaking something. Also, a big message about moving this file into place should also be displayed, telling the admin that to finish the upgrade, they need to move the new file into place. For a new install (e.g. there's no /etc/gmond.conf file), just install the file, of course. -- Jesse Becker GPG Fingerprint -- BD00 7AA4 4483 AFCC 82D0 2720 0083 0931 9A2B 06A2 ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers