Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134571 - sys-apps/baselayout-1.12.0-r1 : functions.sh -> is_xenU_sys not working
Summary: sys-apps/baselayout-1.12.0-r1 : functions.sh -> is_xenU_sys not working
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
: 136622 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-27 15:45 UTC by Stefan Hellermann
Modified: 2006-06-13 04:18 UTC (History)
3 users (show)

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


Attachments
patch against baselayout-1.12.0-r1 to correct the issue (functions.sh.patch,382 bytes, patch)
2006-05-27 15:50 UTC, Stefan Hellermann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Hellermann 2006-05-27 15:45:51 UTC
while trying out the new baselayout 1.12, I think the function is_xenU_sys from /etc/init.d/functions.sh is not working as expected, I'm using such a system and the function newer retuns 0 (neither on xen0 nor on xenU)

After a short look I think a solution like this would work better:

is_xenU_sys() {
	#check for folder, if it doesn't exist we're not on a xen-system
	[[ ! -d /proc/xen ]] && return 1
	#if the string "control_d" is in /proc/xen/capabilities, this is a xen0 not a xenU
	grep -q "control_d" /proc/xen/capabilities && return 1
	#finally, if it's a xen system but not a xen0, then it's a xenU
	return 0
}

I will append a patch against baselayout-1.12.0-r1
Comment 1 Stefan Hellermann 2006-05-27 15:50:21 UTC
Created attachment 87694 [details, diff]
patch against baselayout-1.12.0-r1 to correct the issue
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-05-30 02:59:53 UTC
OK I've comitted this in our svn repo - will be in baselayout-1.12.1
Comment 3 Roy Marples (RETIRED) gentoo-dev 2006-06-05 07:34:06 UTC
Fixed in baselayout-1.12.1
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-06-13 04:18:03 UTC
*** Bug 136622 has been marked as a duplicate of this bug. ***