Skip to content

Instantly share code, notes, and snippets.

@vStone
Created May 30, 2013 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vStone/5679521 to your computer and use it in GitHub Desktop.
Save vStone/5679521 to your computer and use it in GitHub Desktop.
Weird augeas automounter lens issue
augtool> print /files/etc/auto.test/*[label() != '#comment'][. = 'test']
/files/etc/auto.test/2 = "test"
/files/etc/auto.test/2/location
/files/etc/auto.test/2/location/1
/files/etc/auto.test/2/location/1/host = "localhost"
/files/etc/auto.test/2/location/1/path = "/my/path"
augtool> set /files/etc/auto.test/*[label() != '#comment'][. = 'test']/opt[last() + 1] nocto
augtool> print /files/etc/auto.test/*[label() != '#comment'][. = 'test']
/files/etc/auto.test/2 = "test"
/files/etc/auto.test/2/location
/files/etc/auto.test/2/location/1
/files/etc/auto.test/2/location/1/host = "localhost"
/files/etc/auto.test/2/location/1/path = "/my/path"
/files/etc/auto.test/2/opt = "nocto"
augtool> save
error: Failed to execute command
error: saving failed (run 'print /augeas//error' for details)
augtool> print /augeas//error
/augeas/files/etc/auto.test/error = "put_failed"
/augeas/files/etc/auto.test/error/path = "/files/etc/auto.test/2"
/augeas/files/etc/auto.test/error/lens = "/var/lib/puppet/lib/augeas/lenses/automounter.aug:110.14-111.66:"
/augeas/files/etc/auto.test/error/message = "Failed to match \n ({ /opt/ = /[^\\001-\\004\\t\\n #,:=\\\\]+/ }({ /opt/ = /[^\\001-\\004\\t\\n #,:=\\\\]+/ })*)?({ /location/ } | { /mount/ })\n with tree\n { \"location\" } { \"opt\" = \"nocto\" }"
bogus -ro,soft,intr,proto=tcp ftp.kernel.org:/pub/linux
test localhost:/my/path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment