diff -ur ../orig/etc/init.d/clock ./etc/init.d/clock --- ../orig/etc/init.d/clock 2005-06-11 21:17:18.000000000 -0500 +++ ./etc/init.d/clock 2005-06-11 21:26:32.000000000 -0500 @@ -18,6 +18,10 @@ TBLURB="VServer" fakeit=1 return 0 + elif is_xenU_sys ; then + TBLURB="xenU" + fakeit=1 + return 0 elif grep -q ' cobd$' /proc/devices ; then TBLURB="coLinux" fakeit=1 @@ -103,9 +107,15 @@ setupopts ebegin "Syncing system clock to hardware clock [${TBLURB}]" - if [[ ${CLOCK} == "UML" ]] ; then + + # Shouldn't this be a test against fakeit? If not, shouldn't this be + # checking TBLURB and not CLOCK? -cgs + if [[ "${CLOCK}" == "UML" ]] ; then ret=0 - + + elif [[ "${TBLURB}" == "xenU" ]] ; then + ret=0 + elif [[ -x /sbin/hwclock ]] ; then errstr=$(/sbin/hwclock --systohc ${myopts} 2>&1 >/dev/null) diff -ur ../orig/sbin/functions.sh ./sbin/functions.sh --- ../orig/sbin/functions.sh 2005-06-11 21:17:06.000000000 -0500 +++ ./sbin/functions.sh 2005-06-11 21:26:19.000000000 -0500 @@ -639,6 +639,26 @@ return $? } +# bool is_xen0_sys() +# +# return 0 if the currently running system is in Xen domain 0 +# +# EXAMPLE: if is_xen0_sys ; then ... +# +is_xen0_sys() { + return [ -d "/proc/xen" ] && [ -f "/proc/xen/privcmd" ] +} + +# bool is_xenU_sys() +# +# return 0 if the currently running system is in an unprivileged Xen domain +# +# EXAMPLE: if is_xenU_sys ; then ... +# +is_xenU_sys() { + return [ -d "/proc/xen" ] && [ ! -f "/proc/xen/privcmd" ] +} + # bool get_mount_fstab(path) # # return the parameters to pass to the mount command generated from fstab