Merge remote-tracking branch 'origin/pr/239'
[grml-debootstrap.git] / grml-debootstrap
index ae592b4..0489c52 100755 (executable)
@@ -5,6 +5,7 @@
 # Bug-Reports:   see https://grml.org/bugs/
 # License:       This file is licensed under the GPL v2+
 ################################################################################
+# shellcheck disable=SC2001,SC2181
 
 # error_handler {{{
 [ -n "$REPORT_TRAP_ERR" ] || REPORT_TRAP_ERR='no'
@@ -1028,14 +1029,16 @@ efi_support() {
 checkconfiguration()
 {
 
-if efi_support ; then
-  if [ -z "$_opt_efi" ] ; then
-    ewarn "EFI support detected but no --efi option given, please consider enabling it."
-  fi
-else
-  if [ -n "$_opt_efi" ] ; then
-     eerror "EFI option used but no EFI support detected."
-     bailout 1
+if [ -z "$VIRTUAL" ] ; then
+  if efi_support ; then
+    if [ -z "$_opt_efi" ] ; then
+      ewarn "EFI support detected but no --efi option given, please consider enabling it."
+    fi
+  else
+    if [ -n "$_opt_efi" ] ; then
+      eerror "EFI option used but no EFI support detected."
+      bailout 1
+    fi
   fi
 fi
 
@@ -1892,9 +1895,6 @@ preparechroot() {
   # setup default locales
   [ -n "$LOCALES" ] && cp $VERBOSE "${CONFFILES}"/locale.gen "${MNTPOINT}"/etc/locale.gen
 
-  # MAKEDEV is just a forking bomb crap, let's do it on our own instead :)
-  ( cd "${MNTPOINT}"/dev && tar zxf /etc/debootstrap/devices.tar.gz )
-
   # copy any existing files to chroot
   [ -d "${CONFFILES}"/bin   ] && cp $VERBOSE -a -L "${CONFFILES}"/bin/*   "${MNTPOINT}"/bin/
   [ -d "${CONFFILES}"/boot  ] && cp $VERBOSE -a -L "${CONFFILES}"/boot/*  "${MNTPOINT}"/boot/