direct-io.hg

view tools/check/check_hotplug @ 7947:dd50b17dc60f

Changes check for "udev", so that it works on debian sid (that does not
have /sbin/udev anymore).

Signed-off-by: Murillo F. Bernardes <mfb@br.ibm.com>
author emellor@leeni.uk.xensource.com
date Mon Nov 21 17:03:21 2005 +0100 (2005-11-21)
parents 5aad7e145e50
children 5ae89ce67486 af3e4a594e4c
line source
1 #!/bin/bash
2 # CHECK-INSTALL
4 function error {
5 echo
6 echo ' *** Check for the hotplug scripts (hotplug) FAILED'
7 exit 1
8 }
9 [ -x "$(which udevinfo)" ] && \
10 UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
12 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
13 exit 0
14 fi
16 which hotplug 1>/dev/null 2>&1 || error