]> git.siccegge.de Git - forks/vmdebootstrap.git/blobdiff - vmdebootstrap
Don't run debootstrap with empty --include=
[forks/vmdebootstrap.git] / vmdebootstrap
index 98211646f54968e8fa7335f375abdf185a728b91..37b1b78972117d4f90eafed3dc750c0ac9b20ed8 100755 (executable)
@@ -99,8 +99,8 @@ class VmDebootstrap(cliapp.Application):
             self.create_users(rootdir)
             self.remove_udev_persistent_rules(rootdir)
             self.setup_networking(rootdir)
-            self.install_extlinux(rootdev, rootdir)
             self.customize(rootdir)
+            self.install_extlinux(rootdev, rootdir)
         except BaseException, e:
             self.message('EEEK! Something bad happened...')
             self.cleanup_system()
@@ -188,12 +188,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']