[augeas-devel] Extra spaces in lens output

Joe Nall joe at nall.com
Fri Mar 9 03:28:19 UTC 2012


I've written a short lens for /etc/selinux/config:

module SelinuxConfig =
  autoload xfm

let equals = del /[ \t]*=[ \t]*/ "="

let state = Build.key_value_line "SELINUX" equals (store /(enforcing|permissive|disabled)/)
let type  = Build.key_value_line "SELINUXTYPE" equals (store Rx.word)

let lns = (Util.empty|Util.comment|state|type)*
let filter = incl "/etc/selinux/config"
let xfm = transform lns filter

When I set SELINUX to enforcing in augtool
augtool> set /files/etc/selinux/config/SELINUX enforcing

I get this
SELINUX = enforcing 
       ^ ^         ^ extra spaces
when I would prefer
SELINUX=enforcing

Is there a way to control when spaces are emitted?

thanks,
joe





More information about the augeas-devel mailing list