From: Neil Williams Date: Tue, 26 Aug 2014 20:46:57 +0000 (-0700) Subject: Let configure-apt be optional to prevent duplicate apt sources on native. X-Git-Url: https://git.siccegge.de//index.cgi?p=forks%2Fvmdebootstrap.git;a=commitdiff_plain;h=a0db57468c797f7a7efb086af68e886bb0e46bd4 Let configure-apt be optional to prevent duplicate apt sources on native. --- diff --git a/vmdebootstrap b/vmdebootstrap index 67187f4..d7edde2 100755 --- a/vmdebootstrap +++ b/vmdebootstrap @@ -156,7 +156,8 @@ class VmDebootstrap(cliapp.Application): self.create_users(rootdir) self.remove_udev_persistent_rules(rootdir) self.setup_networking(rootdir) - self.configure_apt(rootdir) + if self.settings['configure-apt']: + self.configure_apt(rootdir) self.customize(rootdir) if self.settings['image']: if self.settings['extlinux']: @@ -560,9 +561,9 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro %(kserial)s logging.debug('configure apt %s' % conf) f = open(conf, 'w') f.write(''' - deb %(mirror)s %(distribution)s main - #deb-src %(mirror)s %(distribution)s main - ''' % { +deb %(mirror)s %(distribution)s main +#deb-src %(mirror)s %(distribution)s main +''' % { 'mirror': self.settings['mirror'], 'distribution': self.settings['distribution'] }) diff --git a/vmdebootstrap.8.in b/vmdebootstrap.8.in index 4aebc4f..14c6427 100644 --- a/vmdebootstrap.8.in +++ b/vmdebootstrap.8.in @@ -124,7 +124,7 @@ in high load. Run mksquashfs separately if you need to control the number of processors used per run. .IP \-\-configure\-apt Use the specified mirror and distribution to create a suitable apt source inside -the VM. +the VM. Can be useful if debootstrap fails to create it automatically. .SH Configuration files and settings: .IP \-\-dump-config write out the entire current configuration