|
|
opts.info("Started domain %s" % (dom)) | opts.info("Started domain %s" % (dom)) |
return int(sxp.child_value(dominfo, 'domid')) | return int(sxp.child_value(dominfo, 'domid')) |
| |
|
def get_xauthority(): |
|
xauth = os.getenv("XAUTHORITY") |
|
if not xauth: |
|
home = os.getenv("HOME") |
|
if not home: |
|
import posix, pwd |
|
home = pwd.getpwuid(posix.getuid())[5] |
|
xauth = home + "/.Xauthority" |
|
return xauth |
|
|
def parseCommandLine(argv): | def parseCommandLine(argv): |
gopts.reset() | gopts.reset() |
args = gopts.parse(argv) | args = gopts.parse(argv) |
|
|
gopts.vals.display = os.getenv("DISPLAY") | gopts.vals.display = os.getenv("DISPLAY") |
| |
if not gopts.vals.xauthority: | if not gopts.vals.xauthority: |
xauth = os.getenv("XAUTHORITY") |
gopts.vals.xauthority = get_xauthority() |
if not xauth: |
|
home = os.getenv("HOME") |
|
if not home: |
|
import posix, pwd |
|
home = pwd.getpwuid(posix.getuid())[5] |
|
xauth = home + "/.Xauthority" |
|
gopts.vals.xauthority = xauth |
|
| |
# Process remaining args as config variables. | # Process remaining args as config variables. |
for arg in args: | for arg in args: |
|
|
'path' : '.:/etc/xen', | 'path' : '.:/etc/xen', |
'builder' : 'linux', | 'builder' : 'linux', |
'nics' : -1, | 'nics' : -1, |
|
'xauthority': xen.xm.create.get_xauthority(), |
}) | }) |
| |
| |
|
|
'interface' : 'eth0', | 'interface' : 'eth0', |
'path' : '.:/etc/xen', | 'path' : '.:/etc/xen', |
'builder' : 'linux', | 'builder' : 'linux', |
|
'xauthority': xen.xm.create.get_xauthority(), |
}) | }) |
| |
| |
|
|
'path' : '.:/etc/xen', | 'path' : '.:/etc/xen', |
'builder' : 'linux', | 'builder' : 'linux', |
'nics' : -1, | 'nics' : -1, |
|
'xauthority': xen.xm.create.get_xauthority(), |
}) | }) |
| |
| |
|
|
'dhcp' : 'off', | 'dhcp' : 'off', |
'interface' : 'eth0', | 'interface' : 'eth0', |
'path' : '.:/etc/xen', | 'path' : '.:/etc/xen', |
|
'xauthority': xen.xm.create.get_xauthority(), |
}) | }) |
| |
| |