Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262861 - sys-apps/baselyout-1: /etc/init.d/functions.sh:is_xenU_sys() fails to detect paravirt_ops domU
Summary: sys-apps/baselyout-1: /etc/init.d/functions.sh:is_xenU_sys() fails to detect ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-18 00:42 UTC by Luca Lesinigo
Modified: 2009-10-11 09:14 UTC (History)
1 user (show)

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


Attachments
proposed fix (functions-paravirt.patch.txt,435 bytes, patch)
2009-03-18 00:51 UTC, Luca Lesinigo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Lesinigo 2009-03-18 00:42:15 UTC
The is_xenU_sys() function in /etc/init.d/functions.sh will fail to detect that it's running in a domU when using a recent kernel with paravirt_ops support, since the entire /proc/xen directory doesn't exist.

AFAIK the only 'xen things' around are /sys/bus/xen, also present on a dom0 (don't know details about the contents) and the more specific line "Booting paravirtualized kernel on Xen" in dmesg. I'd look for that line, if grep or something similar is ok in functions.sh.
Comment 1 Luca Lesinigo 2009-03-18 00:51:47 UTC
Created attachment 185365 [details, diff]
proposed fix

seems like many other functions do the same kind of grepping so I assume it's ok to call grep :)
here is a working fix.
Comment 2 Jan Oravec 2009-04-10 22:20:30 UTC
Calling dmesg is not OK. You could have used dmesg -c or dmesg buffer may have been filled with something other since machine booted.
Comment 3 Luca Lesinigo 2009-04-14 15:51:22 UTC
what about grepping /var/log/dmesg?