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.
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.
Calling dmesg is not OK. You could have used dmesg -c or dmesg buffer may have been filled with something other since machine booted.
what about grepping /var/log/dmesg?