16.4.5. Augeas and libguestfs Scripting
#!/bin/bash - set -e guestname="$1" guestfish -d "$1" -i --ro <<'EOF' aug-init / 0 aug-get /files/etc/sysconfig/keyboard/LAYOUT EOF
#!/bin/bash - set -e guestname="$1" guestfish -d "$1" -i <<'EOF' aug-init / 0 aug-set /files/etc/sysconfig/keyboard/LAYOUT '"gb"' aug-save EOF
--rooption has been removed in the second example, giving the ability to write to the guest virtual machine.
aug-getcommand has been changed to
aug-setto modify the value instead of fetching it. The new value will be
"gb"(including the quotes).
aug-savecommand is used here so Augeas will write the changes out to disk.
guestfish -N fs
><fs> copy-out /home /tmp/home