summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-04-07 20:39:20 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:04 +0100
commit3cd34c818ca9695d0b5a8bab80c0ef08544acfbf (patch)
tree11b17910f055e12a030411c4bb85eab8e7598bad /scripts
parent5259e901201bd6c98467841fb697c86932c4e493 (diff)
downloadlive-boot-3cd34c818ca9695d0b5a8bab80c0ef08544acfbf.tar.gz
live-boot-3cd34c818ca9695d0b5a8bab80c0ef08544acfbf.zip
Applying patch from Michael Prokop <mika@grml.org> to support udev >= 0.140.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/live-helpers11
1 files changed, 10 insertions, 1 deletions
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 ()