[Libguestfs] [PATCH ubuntu] ubuntu: Use direct udevd method to start udev on Ubuntu.

Richard W.M. Jones rjones at redhat.com
Thu May 20 17:57:47 UTC 2010


-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
-------------- next part --------------
>From 879508c96941daf5dc01dca5fc0d0880107adb70 Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at redhat.com>
Date: Thu, 20 May 2010 18:53:10 +0100
Subject: [PATCH] ubuntu: Use direct udevd method to start udev on Ubuntu.

On Ubuntu, /etc/init.d/udev is a symlink to an upstart file,
but running that causes the appliance to hang.

Therefore detect if this is a symlink and fall through to the
direct start of udevd.  This shouldn't affect Debian because the
file is not a symlink on standard Debian.
---
 appliance/init |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/appliance/init b/appliance/init
index 9ecf007..c622788 100755
--- a/appliance/init
+++ b/appliance/init
@@ -10,7 +10,7 @@ mkdir -p /sysroot
 mount -t proc /proc /proc
 mount -t sysfs /sys /sys
 
-if [ -x /etc/init.d/udev ]; then
+if [ ! -L /etc/init.d/udev -a -x /etc/init.d/udev ]; then
   if type service >/dev/null 2>&1; then
      service udev start
   else
-- 
1.6.3.3



More information about the Libguestfs mailing list