From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: [PATCH 2/2] Load gntdev and evtchn if they're modular. Date: Fri, 19 Aug 2011 17:49:07 -0700 Message-ID: <4E4F0483.8070007@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Signed-off-by: Jeremy Fitzhardinge diff -r cfb49fe940fd -r 81f75ed45ec2 tools/hotplug/Linux/init.d/xencommons --- a/tools/hotplug/Linux/init.d/xencommons Tue Aug 16 16:56:16 2011 -0700 +++ b/tools/hotplug/Linux/init.d/xencommons Tue Aug 16 17:05:18 2011 -0700 @@ -29,12 +29,18 @@ XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid shopt -s extglob -if [ "x$1" = xstart -a -d /proc/xen -a \ - ! -f /proc/xen/capabilities ] && \ - ! grep -qw '^xenfs' /proc/mounts; then - mount -t xenfs xenfs /proc/xen +[ -d /proc/xen ] || exit 0 # Xen not present; exit quietly + +if [ "x$1" = xstart ]; then + # Mount /proc/xen if needed + [ -f /proc/xen/capabilities ] || mount -t xenfs xenfs /proc/xen + + # Make sure evtchn and gntdev are loaded if present + grep -q "xen/evtchn" /proc/misc || modprobe xen-evtchn + grep -q "xen/gntdev" /proc/misc || modprobe xen-gntdev fi +# Done here if this isn't a control domain if ! grep -q "control_d" /proc/xen/capabilities ; then exit 0 fi