diff options
-rwxr-xr-x | kvmx-create | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kvmx-create b/kvmx-create index 59e4117..eafd489 100755 --- a/kvmx-create +++ b/kvmx-create @@ -260,7 +260,7 @@ function kvmx_create_custom { kvmx_sudo_run mount ${device}${partition_prefix}2 $WORK/ # Trap $WORK umount - trap 'umount $WORK && rmdir $WORK' INT TERM + trap 'if [ -e "$WORK" ]; then umount $WORK && rmdir $WORK; fi' INT TERM # Non-interactive installation APT_INSTALL="kvmx_sudo_run chroot $WORK/ apt-get install -y" |