diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 21:16:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 21:16:26 -0300 |
commit | 7991f82317685dca908f7a5e6c0a6482bf0b493f (patch) | |
tree | da918edca8ec2fc91476c0b811d7d95fe3814b28 /kvmx-create | |
parent | b131906cb5b03a5c230f6d12d7823ca95fe9891a (diff) | |
download | kvmx-7991f82317685dca908f7a5e6c0a6482bf0b493f.tar.gz kvmx-7991f82317685dca908f7a5e6c0a6482bf0b493f.tar.bz2 |
Better trap at kvmx-create
Diffstat (limited to 'kvmx-create')
-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" |