git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fish: docs: note how to clean up the remote process properly.
[libguestfs.git]
/
clone
/
virt-sysprep.in
diff --git
a/clone/virt-sysprep.in
b/clone/virt-sysprep.in
index
b6c8a40
..
792282c
100644
(file)
--- a/
clone/virt-sysprep.in
+++ b/
clone/virt-sysprep.in
@@
-175,16
+175,16
@@
if [ -z "$GUESTFISH_PID" ]; then
exit 1
fi
exit 1
fi
+# Helper.
+gf="guestfish --remote --"
+
cleanup ()
{
cleanup ()
{
-
kill $GUESTFISH_PID
>/dev/null 2>&1 ||:
+
$gf exit
>/dev/null 2>&1 ||:
rm -rf "$tmpdir" ||:
}
trap cleanup EXIT ERR
rm -rf "$tmpdir" ||:
}
trap cleanup EXIT ERR
-# Helper.
-gf="guestfish --remote --"
-
# Launch back-end, inspect for operating systems, and get the guest
# root disk.
root=$($gf inspect-get-roots)
# Launch back-end, inspect for operating systems, and get the guest
# root disk.
root=$($gf inspect-get-roots)