mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
vbox: Make guest additions path relative to manifest
This commit is contained in:
parent
ff48243c6e
commit
bf7525426b
2 changed files with 4 additions and 7 deletions
|
@ -7,7 +7,8 @@ properties:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
guest_additions:
|
guest_additions:
|
||||||
$ref: '#/definitions/absolute_path'
|
type: string
|
||||||
|
pattern: ^[^\0]+$
|
||||||
system:
|
system:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -35,7 +36,3 @@ properties:
|
||||||
- msdos
|
- msdos
|
||||||
- gpt
|
- gpt
|
||||||
required: [backing]
|
required: [backing]
|
||||||
definitions:
|
|
||||||
absolute_path:
|
|
||||||
type: string
|
|
||||||
pattern: ^/[^\0]+$
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CheckGuestAdditionsPath(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
guest_additions_path = info.manifest.provider['guest_additions']
|
guest_additions_path = rel_path(info.manifest.path, info.manifest.provider['guest_additions'])
|
||||||
if not os.path.exists(guest_additions_path):
|
if not os.path.exists(guest_additions_path):
|
||||||
msg = 'The file {file} does not exist.'.format(file=guest_additions_path)
|
msg = 'The file {file} does not exist.'.format(file=guest_additions_path)
|
||||||
raise TaskError(msg)
|
raise TaskError(msg)
|
||||||
|
@ -58,7 +58,7 @@ class InstallGuestAdditions(Task):
|
||||||
kernel_version = value.strip().split('linux-headers-')[-1]
|
kernel_version = value.strip().split('linux-headers-')[-1]
|
||||||
break
|
break
|
||||||
|
|
||||||
guest_additions_path = info.manifest.provider['guest_additions']
|
guest_additions_path = rel_path(info.manifest.path, info.manifest.provider['guest_additions'])
|
||||||
mount_dir = 'mnt/guest_additions'
|
mount_dir = 'mnt/guest_additions'
|
||||||
mount_path = os.path.join(info.root, mount_dir)
|
mount_path = os.path.join(info.root, mount_dir)
|
||||||
os.mkdir(mount_path)
|
os.mkdir(mount_path)
|
||||||
|
|
Loading…
Add table
Reference in a new issue