Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148628 - /etc/init.d/xendomains fails with domains containing numbers
Summary: /etc/init.d/xendomains fails with domains containing numbers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Andrew Ross (RETIRED)
URL:
Whiteboard: scheduled for app-emulation/xen-tools...
Keywords: Bug
Depends on:
Blocks:
 
Reported: 2006-09-22 04:28 UTC by Robert S
Modified: 2006-10-13 17:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert S 2006-09-22 04:28:47 UTC
My /etc/xen/auto dir. contains the following line:

name = "debian31"

When I start /etc/init.d/xendomains it gives the domain the title 'debian31"' - this should be 'debian31' without the ".
# /etc/init.d/xendomains start 
 * Starting Xen domains from /etc/xen/auto 
 * Creating screen session to hold domain consoles ... [ ok ] 
 * Starting domain debian31" ... [ ok ] 

When I shut this down, it doesn't recognise this domain:
# /etc/init.d/xendomains stop 
 * Shutting down Xen domains from /etc/xen/auto 
 * Not stopping domain debian31" - not running 
 * Closing screen session xen ... 

This seems to screw things up when I reboot - the domain won't start.

The solution is: don't use numbers in the xen domain name (maybe the init script should point this out if this is important) OR to replace ":alpha:" with ":alnum:" in line 14 in the /etc/init.d/xendomains script thus

local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alpha:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)

changes to 

local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_]+)\"?\W*;?/\1/p' "${1}" | tail -n 1)
Comment 1 Andrew Ross (RETIRED) gentoo-dev 2006-09-22 07:29:49 UTC
Thanks, your fix will be included in -r4
Comment 2 Robert S 2006-09-24 04:51:34 UTC
Maybe a few other character should be allowed.  The demo domains have "-" and "." in them.  I think that these should work run without errors.
Comment 3 Andrew Ross (RETIRED) gentoo-dev 2006-10-13 17:06:40 UTC
Fixed in app-emulation/xen-tools-3.0.2-r4, thanks.