mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
With changes in the core API since 1.5, virt-cat was little more than a Perl wrapper which did some command line argument processing. Thus it could easily be rewritten in C. This version also shares core command line argument processing with guestfish and guestmount, so the options have changed slightly (old-style command line *is* supported). virt-cat -a disk.img file [file ...] virt-cat -d domname file [file ...] Several other guestfish options are supported including encryption, and with the new style multiple files can be downloaded. See the man page for details.
15 lines
353 B
Bash
Executable File
15 lines
353 B
Bash
Executable File
#!/bin/bash -
|
|
|
|
export LANG=C
|
|
set -e
|
|
|
|
# Read out the test files from the image using virt-cat.
|
|
if [ "$(./virt-cat ../images/fedora.img /etc/test1)" != "abcdefg" ]; then
|
|
echo "$0: error: mismatch in file test1"
|
|
exit 1
|
|
fi
|
|
if [ "$(./virt-cat ../images/fedora.img /etc/test2)" != "" ]; then
|
|
echo "$0: error: mismatch in file test2"
|
|
exit 1
|
|
fi
|