[34] | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run |
---|
| 2 | ## kernel-path-relative.dpatch by Bastian Blank <waldi@debian.org> |
---|
| 3 | ## |
---|
| 4 | ## All lines beginning with `## DP:' are a description of the patch. |
---|
| 5 | ## DP: No description. |
---|
| 6 | |
---|
| 7 | @DPATCH@ |
---|
| 8 | diff -urNad xen-3.0~/tools/python/xen/xm/create.py xen-3.0/tools/python/xen/xm/create.py |
---|
| 9 | --- xen-3.0~/tools/python/xen/xm/create.py 2007-01-01 13:31:46.000000000 +0000 |
---|
| 10 | +++ xen-3.0/tools/python/xen/xm/create.py 2007-01-01 13:52:32.342169960 +0000 |
---|
| 11 | @@ -504,6 +504,14 @@ |
---|
| 12 | else: |
---|
| 13 | return s |
---|
| 14 | |
---|
| 15 | +def abspath(file, dir): |
---|
| 16 | + if file[0] == '/': |
---|
| 17 | + return file |
---|
| 18 | + |
---|
| 19 | + import xen.util.auxbin |
---|
| 20 | + path = xen.util.auxbin.root() |
---|
| 21 | + return os.path.join(path, dir, file) |
---|
| 22 | + |
---|
| 23 | def configure_image(vals): |
---|
| 24 | """Create the image config. |
---|
| 25 | """ |
---|
| 26 | @@ -511,9 +519,9 @@ |
---|
| 27 | return None |
---|
| 28 | config_image = [ vals.builder ] |
---|
| 29 | if vals.kernel: |
---|
| 30 | - config_image.append([ 'kernel', os.path.abspath(vals.kernel) ]) |
---|
| 31 | + config_image.append([ 'kernel', abspath(vals.kernel, 'boot') ]) |
---|
| 32 | if vals.ramdisk: |
---|
| 33 | - config_image.append([ 'ramdisk', os.path.abspath(vals.ramdisk) ]) |
---|
| 34 | + config_image.append([ 'ramdisk', abspath(vals.ramdisk, 'boot') ]) |
---|
| 35 | if vals.cmdline_ip: |
---|
| 36 | cmdline_ip = strip('ip=', vals.cmdline_ip) |
---|
| 37 | config_image.append(['ip', cmdline_ip]) |
---|
| 38 | @@ -693,7 +701,7 @@ |
---|
| 39 | def configure_hvm(config_image, vals): |
---|
| 40 | """Create the config for HVM devices. |
---|
| 41 | """ |
---|
| 42 | - args = [ 'device_model', 'pae', 'vcpus', 'boot', 'fda', 'fdb', |
---|
| 43 | + args = [ 'pae', 'vcpus', 'boot', 'fda', 'fdb', |
---|
| 44 | 'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw', |
---|
| 45 | 'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten', |
---|
| 46 | 'sdl', 'display', 'xauthority', |
---|
| 47 | @@ -701,6 +709,8 @@ |
---|
| 48 | for a in args: |
---|
| 49 | if a in vals.__dict__ and vals.__dict__[a] is not None: |
---|
| 50 | config_image.append([a, vals.__dict__[a]]) |
---|
| 51 | + if vals.device_model: |
---|
| 52 | + config_image.append([ 'device_model', abspath(vals.device_model, 'bin') ]) |
---|
| 53 | config_image.append(['vncpasswd', vals.vncpasswd]) |
---|
| 54 | |
---|
| 55 | def run_bootloader(vals, config_image): |
---|