[augeas-devel] [Augeas] #335: Order of entries relevant for inittab lense

Augeas trac at fedorahosted.org
Sat Mar 30 14:09:39 UTC 2013


#335: Order of entries relevant for inittab lense
----------------------+---------------------
 Reporter:  bschmidt  |       Owner:  lutter
     Type:  defect    |      Status:  new
 Priority:  major     |   Milestone:  next
Component:  Augeas    |     Version:  1.0.0
 Keywords:            |  Blocked By:
 Blocking:            |
----------------------+---------------------
 Adding something to (i.e.?) /etc/inittab requires the parameters to be
 given in a certain order. For example action -> runlevels -> process fails

 {{{

 root at moni-kw5:~# augtool
 augtool> set /files/etc/inittab/T1/action respawn
 augtool> set /files/etc/inittab/T1/runlevels 23
 augtool> set /files/etc/inittab/T1/process "/sbin/getty -L ttyS0 9600
 vt100"
 augtool> save
 error: Failed to execute command
 saving failed (run 'print /augeas//error' for details)
 augtool> print /augeas//error
 [...]
 /augeas/files/etc/inittab/error = "put_failed"
 /augeas/files/etc/inittab/error/path = "/files/etc/inittab/T1"
 /augeas/files/etc/inittab/error/lens = "/usr/share/augeas/lenses
 /augeas/files/etc/inittab/error/message = "Failed to match \n    {
 /runlevels/ = /[^\\001-\\004\\n#:]*/ }{ /action/ = /[^\\001-\\004\\n#:]*/
 }{ /process/ = /[^\\001-\\004\\n#]*/ }{ /#comment/ = /[^\\001-\\004\\t\\n
 ][^\\001-\\004\\n]*[^\\001-\\004\\t\\n ]|[^\\001-\\004\\t\\n ]?/ }?\n
 with tree\n    { \"action\" = \"respawn\" } { \"runlevels\" = \"23\" } {
 \"process\" = \"/sbin/getty -L ttyS0 9600 vt100\" }"
 [...]
 }}}

 but runlevels -> action -> process works fine (that's the order the
 attributes are listed on existing entries as well)

 {{{
 augtool> set  /files/etc/inittab/T1/runlevels 23
 augtool> set /files/etc/inittab/T1/action respawn
 augtool> set /files/etc/inittab/T1/process "/sbin/getty -L ttyS0 9600
 vt100"
 augtool> save
 Saved 1 file(s)
 }}}

 Verified for both augeas 1.0.0 and 0.10.0

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/335>
Augeas <http://augeas.net/>
a configuration API




More information about the augeas-devel mailing list