]> git.siccegge.de Git - forks/vmdebootstrap.git/blobdiff - vmdebootstrap
Merge branch 'no-kernel-option' into tar-no-kernel
[forks/vmdebootstrap.git] / vmdebootstrap
index 5b4c62bf4b5360f557a08f54b1dfbb3b2bbdea34..eb7d1b1297e61d05300f66e403bb106d472f91bd 100755 (executable)
@@ -106,9 +106,9 @@ class VmDebootstrap(cliapp.Application):
             self.create_users(rootdir)
             self.remove_udev_persistent_rules(rootdir)
             self.setup_networking(rootdir)
+            self.customize(rootdir)
             if self.settings['image']:
                 self.install_extlinux(rootdev, rootdir)
-            self.customize(rootdir)
             if self.settings['tarball']:
                 self.create_tarball(rootdir)
         except BaseException, e:
@@ -198,12 +198,11 @@ class VmDebootstrap(cliapp.Application):
         if self.settings['sudo'] and 'sudo' not in include:
             include.append('sudo')
 
-        self.runcmd(['debootstrap', 
-                     '--arch=%s' % self.settings['arch'],
-                     '--include=%s' % ','.join(include),
-                     self.settings['distribution'],
-                     rootdir, 
-                     self.settings['mirror']])
+        args = ['debootstrap', '--arch=%s' % self.settings['arch']]
+        if include: args.append('--include=%s' % ','.join(include))
+        args += [self.settings['distribution'],
+                 rootdir, self.settings['mirror']]
+        self.runcmd(args)
 
     def set_hostname(self, rootdir):
         hostname = self.settings['hostname']