mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Generally deny installing grub on squeeze
This commit is contained in:
parent
b843cbe089
commit
b582bac853
1 changed files with 9 additions and 1 deletions
|
@ -16,7 +16,15 @@ def validate_manifest(data, validator, error):
|
||||||
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
||||||
validator(data, schema_path)
|
validator(data, schema_path)
|
||||||
|
|
||||||
|
from bootstrapvz.common.tools import get_codename
|
||||||
|
codename = get_codename(data['system']['release'])
|
||||||
|
|
||||||
# Check the bootloader/partitioning configuration.
|
# Check the bootloader/partitioning configuration.
|
||||||
# Doing this via the schema is a pain and does not output a useful error message.
|
# Doing this via the schema is a pain and does not output a useful error message.
|
||||||
if data['system']['bootloader'] == 'grub' and data['volume']['partitions']['type'] == 'none':
|
if data['system']['bootloader'] == 'grub':
|
||||||
|
|
||||||
|
if data['volume']['partitions']['type'] == 'none':
|
||||||
error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader'])
|
error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader'])
|
||||||
|
|
||||||
|
if codename == 'squeeze':
|
||||||
|
error('Grub installation on squeeze is not supported', ['system', 'bootloader'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue