Fix detection of Xen dom0 vs domU can use the right variable in init scripts.

This commit is contained in:
Roy Marples 2008-01-04 12:39:06 +00:00
parent d7961bef66
commit c13471f91f
3 changed files with 4 additions and 4 deletions

View File

@ -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}}

View File

@ -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

View File

@ -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",