diff --git a/bin/xen-create-image b/bin/xen-create-image index dac602e..76a1dc8 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -779,6 +779,7 @@ The LICENSE file contains the full text of the license. =cut +$SIG{INT} = \&clean_up; use strict; use English; @@ -4088,6 +4089,13 @@ sub unMountImage =cut +sub clean_up () { + if ( defined($MOUNT_POINT) ) + { + unMountImage($MOUNT_POINT, 1); + } +} + sub END { exit 0 if $VERSION || $HELP || $MANUAL || $DUMPCONFIG;