[augeas-devel] inittab with a # comments after process values

David Lutterkort lutter at redhat.com
Thu Oct 22 08:15:58 UTC 2009


Hi Anthony,

On Wed, 2009-10-21 at 23:59 +0200, Anthony Caetano wrote:
> We install various IBM software and DB2 and Tivoli Directory Server add
> entries to the inittab like this:
> 
> fmc:2345:respawn:/opt/ibm/db2/V9.5/bin/db2fmcd #DB2 Fault Monitor
> Coordinator
> ids0:2345:once:/opt/ibm/ldap/V6.2/sbin/ibmdiradm -I ldapdb > /dev/null
> 2>&1 #Autostart IBM LDAP Admin Daemon Instance
> 
> This doesn't parse in the current inittab.aug (0.5.3) because
>    let value = /[^#:\n]*/
> Doesn't allow a # comment character in the value, so the process field
> can't have it and then it doesn't swallow up everything to the eol as
> expected...
> My fix which I have deployed to /usr/share/augeas/lenses/ just sets
>    let value = /[^:\n]*/
> i.e. I allow #s in values which seems reasonable as only really ids need
> that protection...

Shouldn't this be added as a comment on that inittab entry, i.e. so that
you get a tree like

        /files/etc/inittab/fmc/
                               runlevels = "2345"
                               action = "respawn"
                               process = "/opt/ibm/db2/V9.5/bin/db2fmcd"
                               #comment = "DB2 Fault Monitor Coordinator"

> This makes the inittab with the above lines parse with the lense.
> Please consider adding this change to the official distribution.

Let me know what you think of doing it like above, and I'll either
commit your change or one that pulls out the comment separately.

David




More information about the augeas-devel mailing list