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 /scripts | |
| 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.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/live-helpers | 11 |
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 () |
