diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 20:41:02 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 20:41:02 -0300 |
commit | a7af79ef6aa999481425a6ec58f8e75b55216760 (patch) | |
tree | 7c49b30778e93cb41779be2bb1f3392c70f59df9 | |
parent | a2f7f37d3e8eabc7fa55485762840e9745d66b60 (diff) | |
download | kvmx-a7af79ef6aa999481425a6ec58f8e75b55216760.tar.gz kvmx-a7af79ef6aa999481425a6ec58f8e75b55216760.tar.bz2 |
Trap for work dir umounting
-rwxr-xr-x | kvmx-create | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kvmx-create b/kvmx-create index ae42c39..0375cf6 100755 --- a/kvmx-create +++ b/kvmx-create @@ -259,6 +259,9 @@ function kvmx_create_custom { kvmx_sudo_run mkfs.ext4 ${device}${partition_prefix}2 kvmx_sudo_run mount ${device}${partition_prefix}2 $WORK/ + # Trap $WORK umount + trap 'umount $WORK && rmdir $WORK' INT TERM + # Non-interactive installation APT_INSTALL="kvmx_sudo_run chroot $WORK/ apt-get install -y" |