Fix detection of Xen dom0 vs domU can use the right variable in init scripts.
This commit is contained in:
parent
d7961bef66
commit
c13471f91f
@ -36,7 +36,7 @@ start() {
|
|||||||
rm -rf "${RC_LIBDIR}"/console
|
rm -rf "${RC_LIBDIR}"/console
|
||||||
|
|
||||||
case "${RC_SYS}" in
|
case "${RC_SYS}" in
|
||||||
UML|VPS|XEN) return 0;;
|
UML|VPS|XENU) return 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
|
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
|
||||||
|
@ -39,7 +39,7 @@ depend() {
|
|||||||
|
|
||||||
start() {
|
start() {
|
||||||
case "${RC_SYS}" in
|
case "${RC_SYS}" in
|
||||||
UML|VPS|XEN)
|
UML|VPS|XENU)
|
||||||
ebegin "Loading key mappings"
|
ebegin "Loading key mappings"
|
||||||
eend 0
|
eend 0
|
||||||
return 0
|
return 0
|
||||||
|
@ -295,10 +295,10 @@ char **env_config (void)
|
|||||||
if ((fp = fopen ("/proc/xen/capabilities", "r"))) {
|
if ((fp = fopen ("/proc/xen/capabilities", "r"))) {
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
if (file_regex ("/proc/xen/capabilities", "control_d"))
|
if (file_regex ("/proc/xen/capabilities", "control_d"))
|
||||||
snprintf (sys, sizeof (sys), "XENU");
|
snprintf (sys, sizeof (sys), "XEN0");
|
||||||
}
|
}
|
||||||
if (! sys[0])
|
if (! sys[0])
|
||||||
snprintf (sys, sizeof (sys), "XEN0");
|
snprintf (sys, sizeof (sys), "XENU");
|
||||||
} else if (file_regex ("/proc/cpuinfo", "UML")) {
|
} else if (file_regex ("/proc/cpuinfo", "UML")) {
|
||||||
snprintf (sys, sizeof (sys), "UML");
|
snprintf (sys, sizeof (sys), "UML");
|
||||||
} else if (file_regex ("/proc/self/status",
|
} else if (file_regex ("/proc/self/status",
|
||||||
|
Loading…
Reference in New Issue
Block a user