mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
Fix TuneFS task
This commit is contained in:
parent
3dab414561
commit
54791268e1
2 changed files with 15 additions and 10 deletions
|
@ -55,8 +55,16 @@ locale_set = [locale.GenerateLocale,
|
|||
locale.SetTimezone,
|
||||
]
|
||||
|
||||
fs_specific_set = {'ext2': [filesystem.TuneVolumeFS],
|
||||
'ext3': [filesystem.TuneVolumeFS],
|
||||
'ext4': [filesystem.TuneVolumeFS],
|
||||
'xfs': [filesystem.AddXFSProgs],
|
||||
}
|
||||
|
||||
def get_fs_specific_set(partitions):
|
||||
task_set = {'ext2': [filesystem.TuneVolumeFS],
|
||||
'ext3': [filesystem.TuneVolumeFS],
|
||||
'ext4': [filesystem.TuneVolumeFS],
|
||||
'xfs': [filesystem.AddXFSProgs],
|
||||
}
|
||||
tasks = set()
|
||||
if 'boot' in partitions:
|
||||
tasks.update(task_set.get(partitions['boot']['filesystem'], []))
|
||||
if 'root' in partitions:
|
||||
tasks.update(task_set.get(partitions['root']['filesystem'], []))
|
||||
return tasks
|
||||
|
|
|
@ -59,11 +59,8 @@ def tasks(tasklist, manifest):
|
|||
if manifest.bootstrapper.get('tarball', False):
|
||||
tasklist.add(bootstrap.MakeTarball)
|
||||
|
||||
from common.task_sets import fs_specific_set
|
||||
for partition in manifest.volume['partitions']:
|
||||
if 'filesystem' in partition:
|
||||
fs_tasks = fs_specific_set.get(partition['filesystem'], [])
|
||||
tasklist.add(fs_tasks)
|
||||
from common.task_sets import get_fs_specific_set
|
||||
tasklist.add(*get_fs_specific_set(manifest.volume['partitions']))
|
||||
|
||||
if 'boot' in manifest.volume['partitions']:
|
||||
from common.task_sets import boot_partition_set
|
||||
|
|
Loading…
Add table
Reference in a new issue