diff options
| author | Daniel Baumann <daniel@debian.org> | 2009-04-07 20:39:20 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:04 +0100 |
| commit | 3cd34c818ca9695d0b5a8bab80c0ef08544acfbf (patch) | |
| tree | 11b17910f055e12a030411c4bb85eab8e7598bad | |
| parent | 5259e901201bd6c98467841fb697c86932c4e493 (diff) | |
| download | live-boot-3cd34c818ca9695d0b5a8bab80c0ef08544acfbf.tar.gz live-boot-3cd34c818ca9695d0b5a8bab80c0ef08544acfbf.zip | |
Applying patch from Michael Prokop <mika@grml.org> to support udev >= 0.140.
| -rwxr-xr-x | hooks/live | 5 | ||||
| -rw-r--r-- | scripts/live-helpers | 11 |
2 files changed, 14 insertions, 2 deletions
@@ -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 () |
