diff options
author | Neil Williams <codehelp@debian.org> | 2015-09-08 22:59:41 +0100 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2015-09-08 22:59:41 +0100 |
commit | 1001c3b9f14f139a1e46d442dd39acde348c9264 (patch) | |
tree | 62ce898b570c0a3db918c592e9b12674a1255944 /bin/vmdebootstrap | |
parent | 9f427b60af348bb7e9f5789275fd03529eb8a0e0 (diff) | |
download | vmdebootstrap-1001c3b9f14f139a1e46d442dd39acde348c9264.tar.gz |
move the uefi settings checks into the helper
Diffstat (limited to 'bin/vmdebootstrap')
-rwxr-xr-x | bin/vmdebootstrap | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index 1c77373..352ea0a 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -211,33 +211,8 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth raise cliapp.AppException( '%s is not a valid Debian or Ubuntu suite or codename.' % self.settings['distribution']) - if not self.settings['use-uefi'] and self.settings['esp-size'] != 5242880: - raise cliapp.AppException( - 'You must specify use-uefi for esp-size to have effect') - if self.settings['arch'] in arch_table and\ - arch_table[self.settings['arch']]['exclusive'] and\ - not self.settings['use-uefi']: - raise cliapp.AppException( - 'Only UEFI is supported on %s' % self.settings['arch']) - elif self.settings['use-uefi'] and self.settings['arch'] not in arch_table: - raise cliapp.AppException( - '%s is not a supported UEFI architecture' % self.settings['arch']) - if self.settings['use-uefi'] and ( - self.settings['bootsize'] or - self.settings['bootoffset']): - raise cliapp.AppException( - 'A separate boot partition is not supported with UEFI') - - if self.settings['use-uefi'] and not self.settings['grub']: - raise cliapp.AppException( - 'UEFI without Grub is not supported.') - - # wheezy (which became oldstable on 04/25/2015) only had amd64 uefi - if distro.was_oldstable(datetime.date(2015, 4, 26)): - if self.settings['arch'] != 'amd64': - raise cliapp.AppException( - 'Only amd64 supports UEFI in Wheezy') - + uefi = self.handlers[Uefi.name] + uefi.check_settings() if os.geteuid() != 0: sys.exit("You need to have root privileges to run this script.") self.start_ops() |