[augeas-devel] [PATCH] Add logrotate and associated test

Raphaël Pinson raphink at gmail.com
Wed Jul 23 21:28:38 UTC 2008


On Wed, Jul 23, 2008 at 8:10 PM, David Lutterkort <dlutter at redhat.com>
wrote:

> On Wed, 2008-07-23 at 16:18 +0200, Raphaël Pinson wrote:
> > I can't say I'm a big fan of the oneline (pre|post)rotate hooks (I
> > prefer to split them into 'line' nodes) but at least it works now.
>
> Is it more a taste thing or a usability concern ? If the latter, we
> should address that. Though I still think Augeas shouldn't pretend to
> understand something it clearly doesn't - the script is just an opaque
> blob to Augeas.


I personally see it as a usability matter. I'm just thinking of myself as
the user of the API and inserting (or reading) a blog like
prerotate = "                if [ -f /var/run/apache2.pid ]; then
                        /etc/init.d/apache2 restart > /dev/null
                fi
"

instead of

prerotate/line[1] = "if [ -f /var/run/apache2.pid ]; then"
prerotate/line[2] = "/etc/init.d/apache2 restart > /dev/null"
prerotate/line[3] = "fi"

To me, the latter is much easier to parse to to read. If I had to deal with
the first case, I would be afraid to completely mess up the look of the
conffile with spaces and tabs. Maybe that's just my opinion. What do others
on the list think?


Raphael


>
>
> David
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080723/44a25ac7/attachment.htm>


More information about the augeas-devel mailing list