]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Mount /run and /dev/pts on kvmx-create
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Sep 2018 18:50:05 +0000 (15:50 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Sep 2018 18:50:05 +0000 (15:50 -0300)
kvmx-create

index 95d4d5352d73073f4a24b9cc79fa3f6a684c3a9a..1ebfe0bea813d7e562aacfdde3beabfa179c5924 100755 (executable)
@@ -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