virt-sysprep: Trap ERR as well as EXIT.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 13 Oct 2011 10:34:04 +0000 (11:34 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 13 Oct 2011 14:25:13 +0000 (15:25 +0100)
clone/virt-sysprep.in

index 4448860..b6c8a40 100644 (file)
@@ -180,7 +180,7 @@ cleanup ()
     kill $GUESTFISH_PID >/dev/null 2>&1 ||:
     rm -rf "$tmpdir" ||:
 }
-trap cleanup EXIT
+trap cleanup EXIT ERR
 
 # Helper.
 gf="guestfish --remote --"