[augeas-devel] [Augeas] #21: Add a -f mode in augtool to read instructions for a separate file
Augeas
trac at fedorahosted.org
Fri Sep 5 07:01:06 UTC 2008
#21: Add a -f mode in augtool to read instructions for a separate file
-------------------------+--------------------------------------------------
Reporter: raphink | Owner: lutter
Type: enhancement | Status: new
Priority: minor | Milestone: wishlist
Component: Augeas | Version: 0.3.0
Keywords: |
-------------------------+--------------------------------------------------
It would be awesome to be able to write augtool standalone scripts, like
{{{
#!/usr/bin/augtool -f
# working on grub right now
context /files/boot/grub.conf
set default "1"
# No Gentoo titles anymore
rm title[ value() = "Gentoo .*" ]
save
# and now getting to work on dput
context /files/etc/dput.cf
set target[value()="mentors"]/fqdn "mentors.debian.net"
save
}}}
And then
{{{
chmod +x mychanges.augtool
./mychanges.augtool
}}}
Note: This example uses 3 functionalities that do not exist yet (and some
might require a ticket):
* Using comments in augtool commands (useful in this case, at least for
the shebang)
* Using the value() XPath syntax to search for values
* Using context to set the current context in the tree
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/21>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list