Bug 580016
Summary: | aug-ls in guestfish does not take augeas variable as argument | ||
---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Jinxin Zheng <jzheng> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED UPSTREAM | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | jzheng, mbooth, qwan, virt-maint |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-04-09 08:44:14 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jinxin Zheng
2010-04-07 10:03:30 UTC
Sorry, I forgot about the shell expansion, the reproducing step 2 should be $ guestfish -a test.img <<\EOF run mount /dev/vda1 / aug-init / 0 aug-defvar var /files/etc/passwd/root aug-ls $var EOF (adding backslash before EOF prevents the $var from being expanded by the shell). and here's comparison among output of aug-get, aug-match and aug-ls, ... ><fs> aug-defvar var /files/etc/passwd/root ><fs> aug-get $var/home /root ><fs> aug-match $var/* /files/etc/passwd/root/password /files/etc/passwd/root/uid /files/etc/passwd/root/gid /files/etc/passwd/root/name /files/etc/passwd/root/home /files/etc/passwd/root/shell ><fs> aug-ls $var libguestfs: error: aug_ls: do_aug_ls: path must start with a / character Upstream: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=d1dd00606d0b5b1430598e5092b017aa15d9ee11 ><fs> aug-defvar var /files/etc/passwd 1 ><fs> aug-ls $var /files/etc/passwd/adm /files/etc/passwd/apache /files/etc/passwd/avahi /files/etc/passwd/avahi-autoipd The downside to this change is that aug-ls has no way to tell if the path is not correct, eg: ><fs> aug-ls foobar ><fs> libguestfs-1.2.2-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/libguestfs-1.2.2-1.fc13 libguestfs-1.2.2-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. |