Trap SIGINT to unmount to temporary mount point
This makes END being called again after Ctrl-C.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user