[Libguestfs] [PATCH 3/6] v2v:test:win: actually check the eventual layout

Richard W.M. Jones rjones at redhat.com
Mon Oct 5 14:19:00 UTC 2015


It's consistent with how we do it everywhere else (see for example:
fish/test-copy.sh), but if having a long list of 'true' words is a
problem you could also do:

output=$(
  guestfish --ro -a $d/windows-sda -i <<EOF
  !echo "dir Firstboot"
  is-dir "/Program Files/Red Hat/Firstboot"
  ...
)
if [ "$output" != "dir Firstboot
true
...
" ]; then
...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list