aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkvmx-create12
1 files changed, 8 insertions, 4 deletions
diff --git a/kvmx-create b/kvmx-create
index 95d4d53..1ebfe0b 100755
--- a/kvmx-create
+++ b/kvmx-create
@@ -211,7 +211,7 @@ function kvmx_create_custom {
kvmx_sudo_run mount ${device}${partition_prefix}2 $WORK/
# Trap $WORK umount
- trap 'if [ -e "$WORK" ]; then umount $WORK/{sys,proc,dev} &> /dev/null; umount $WORK &> /dev/null; rmdir $WORK; fi' INT TERM EXIT
+ trap 'if [ -e "$WORK" ]; then umount $WORK/{proc,sys,run,dev/pts,dev} &> /dev/null; umount $WORK &> /dev/null; rmdir $WORK; fi' INT TERM EXIT
# Non-interactive installation
#APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive kvmx_sudo_run chroot $WORK/ apt-get install -y"
@@ -261,9 +261,11 @@ function kvmx_create_custom {
fi
# Mount auxiliary filesystems needed by the bootloader
- kvmx_sudo_run mount none -t proc $WORK/proc
- kvmx_sudo_run mount none -t sysfs $WORK/sys
- kvmx_sudo_run mount -o bind /dev/ $WORK/dev
+ kvmx_sudo_run mount none -t proc $WORK/proc
+ kvmx_sudo_run mount none -t sysfs $WORK/sys
+ kvmx_sudo_run mount -o bind /run/ $WORK/run
+ kvmx_sudo_run mount -o bind /dev/ $WORK/dev
+ kvmx_sudo_run mount -o bind /dev/pts $WORK/dev/pts
# Initial upgrade
echo "Updating list of packages..."
@@ -311,6 +313,8 @@ EOF
# Umount auxiliary filesystems
kvmx_sudo_run umount $WORK/proc
kvmx_sudo_run umount $WORK/sys
+ kvmx_sudo_run umount $WORK/run
+ kvmx_sudo_run umount $WORK/dev/pts
kvmx_sudo_run umount $WORK/dev
# Run basic provision