Do not copy `packages` file if --nopackages option is present
authorMichael Prokop <mika@grml.org>
Thu, 4 Jun 2015 09:00:35 +0000 (11:00 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 4 Jun 2015 09:00:35 +0000 (11:00 +0200)
Fixes #46 @ github

grml-debootstrap

index d15849d..5604849 100755 (executable)
@@ -1308,8 +1308,10 @@ preparechroot() {
   fi
 
   # package selection:
-  cp $VERBOSE "${_opt_packages:-$CONFFILES/packages}" \
-    "${MNTPOINT}"/etc/debootstrap/packages
+  if [ "$PACKAGES" = 'yes' ] ; then
+    cp $VERBOSE "${_opt_packages:-$CONFFILES/packages}" \
+      "${MNTPOINT}"/etc/debootstrap/packages
+  fi
 
   # debconf preseeding:
   _opt_debconf=${_opt_debconf:-$CONFFILES/debconf-selections}