Support mmdebstrap via DEBOOTSTRAP=mmdebstrap
authorMichael Prokop <mika@grml.org>
Thu, 24 Jan 2019 08:08:07 +0000 (09:08 +0100)
committerMichael Prokop <mika@grml.org>
Thu, 24 Jan 2019 08:11:11 +0000 (09:11 +0100)
The only known incompatibility so far is the --iso ... option.
Therefore abort grml-debootstrap if DEBOOTSTRAP=mmdebstrap
and --iso ... option are used at the same time.

Closes: https://github.com/grml/grml-debootstrap/issues/120

config
grml-debootstrap
grml-debootstrap.8.txt

diff --git a/config b/config
index 413e31f..719265c 100644 (file)
--- a/config
+++ b/config
@@ -99,7 +99,7 @@
 # ROOTPASSWORD=''
 
 # Name of debootstrap executable.
-# Supported values: 'debootstrap', 'cdebootstrap'
+# Supported values: 'debootstrap', 'cdebootstrap', 'mmdebstrap'
 # Default: 'debootstrap'
 # DEBOOTSTRAP='debootstrap'
 
index 945b859..2d0bbfd 100755 (executable)
@@ -335,7 +335,7 @@ stage() {
 # }}}
 
 # make sure we have what we need {{{
-check4progs debootstrap || bailout 1
+check4progs "${DEBOOTSTRAP}" || bailout 1
 # }}}
 
 # source main configuration file {{{
@@ -588,6 +588,12 @@ if [ "$_opt_grub" ] && [ "$_opt_vmfile" ] ; then
   bailout 1
 fi
 
+if [ -n "$ISO" ] && [[ "$DEBOOTSTRAP" =~ mmdebstrap$ ]] ; then
+  eerror "The ISO option is incompatible with usage of mmdebstrap for bootstrapping."
+  eerror "Either drop the --iso ... option or use plain debootstrap instead."
+  eend 1
+  bailout 1
+fi
 
 if [ "$DEBUG" = "true" ] ; then
   set -x
@@ -1685,7 +1691,7 @@ preparechroot() {
 
   cp $VERBOSE -a -L "${CONFFILES}"/extrapackages/ "${MNTPOINT}"/etc/debootstrap/
 
-  # make sure we can access network [relevant for cdebootstrap]
+  # make sure we can access network [relevant for cdebootstrap/mmdebstrap]
   [ -f "${MNTPOINT}"/etc/resolv.conf ] || cp $VERBOSE /etc/resolv.conf "${MNTPOINT}"/etc/resolv.conf
 
   # setup default locales
index 4882d2b..b78a249 100644 (file)
@@ -14,7 +14,7 @@ image:images/screenshot.png[Screenshot]
 Introduction
 ------------
 
-grml-debootstrap is a wrapper suite around debootstrap (and cdebootstrap if you
+grml-debootstrap is a wrapper suite around debootstrap (and cdebootstrap and mmdebstrap if you
 want) for installing a plain Debian system very fast and easy.
 
 All you have to do is adjust a few variables in the configuration file
@@ -467,7 +467,7 @@ Probably. Please send bugreports to Michael Prokop <mika@grml.org>.
 See also
 --------
 
-debootstrap (8), cdebootstrap (1).
+debootstrap (8), cdebootstrap (1), mmdebstrap(1).
 
 Author
 ------