]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Try a different approach for setting LC_ALL and DEBIAN_FRONTEND
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Jun 2018 00:54:32 +0000 (21:54 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Jun 2018 00:54:32 +0000 (21:54 -0300)
kvmx
kvmx-create

diff --git a/kvmx b/kvmx
index 68560208b1e98e7ee968e39da480cbda8495930b..3420ca82039239bbdb028a46260a79c2645e606d 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1857,6 +1857,10 @@ function kvmx_create {
   fi
 
   kvmx-create $KVMXFILE
+
+  if [ "$?" != "0" ]; then
+    exit $?
+  fi
 }
 
 # Dispatch
index 9d4b8c9862c7e0a6fa0890c2614c86fabf0608b9..43d0dac921454c5736de0fbef83754d9c25439d8 100755 (executable)
@@ -260,10 +260,12 @@ 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
+  trap 'if [ -e "$WORK" ]; then umount $WORK/{sys,proc,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"
+  #APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive kvmx_sudo_run chroot $WORK/ apt-get install -y"
+  #APT_INSTALL="kvmx_sudo_run LC_ALL=C DEBIAN_FRONTEND=noninteractive chroot $WORK/ apt-get install -y"
+  APT_INSTALL="kvmx_sudo_run chroot $WORK/ /usr/bin/env -- LC_ALL=C DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get install -y"
 
   # Initial system install.
   echo "Installing base system..."