summaryrefslogtreecommitdiffstats
path: root/clone/virt-sysprep.in
diff options
context:
space:
mode:
Diffstat (limited to 'clone/virt-sysprep.in')
-rw-r--r--clone/virt-sysprep.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in
index b6c8a404..792282c7 100644
--- a/clone/virt-sysprep.in
+++ b/clone/virt-sysprep.in
@@ -175,16 +175,16 @@ if [ -z "$GUESTFISH_PID" ]; then
exit 1
fi
+# Helper.
+gf="guestfish --remote --"
+
cleanup ()
{
- kill $GUESTFISH_PID >/dev/null 2>&1 ||:
+ $gf exit >/dev/null 2>&1 ||:
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)