[SCM] Debian Live initramfs hook branch, master, updated. 1.157.1-1-5-g03f7e0e
Daniel Baumann
daniel at debian.org
Tue Apr 7 18:47:21 UTC 2009
The following commit has been merged in the master branch:
commit 03f7e0ea30d52158973ff47bcdebd9932501d143
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Apr 7 20:39:20 2009 +0200
Applying patch from Michael Prokop <mika at grml.org> to support udev >= 0.140.
diff --git a/hooks/live b/hooks/live
index 32adfb6..4e29226 100755
--- a/hooks/live
+++ b/hooks/live
@@ -148,7 +148,10 @@ else
copy_exec /sbin/udevtrigger /sbin
copy_exec /sbin/udevsettle /sbin
fi
-copy_exec /usr/bin/udevinfo /bin
+if [ -x /usr/bin/udevinfo ]
+then
+ copy_exec /usr/bin/udevinfo /bin
+fi
# Program: wget
if [ -x /usr/bin/wget ]
diff --git a/scripts/live-helpers b/scripts/live-helpers
index 70897d6..59bdb4f 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -6,10 +6,19 @@ then
export PATH="${PATH}:/usr/lib/klibc/bin"
fi
+# handle upgrade path from old udev (using udevinfo) to
+# recent versions of udev (using udevadm info)
+if [ -x /sbin/udevadm ]
+then
+ udevinfo='/sbin/udevadm info'
+else
+ udevinfo='udevinfo'
+fi
+
sys2dev ()
{
sysdev=${1#/sys}
- echo "/dev/$(udevinfo -q name -p ${sysdev} 2>/dev/null|| echo ${sysdev##*/})"
+ echo "/dev/$($udevinfo -q name -p ${sysdev} 2>/dev/null|| echo ${sysdev##*/})"
}
subdevices ()
--
Debian Live initramfs hook
More information about the debian-live-changes
mailing list