Files
xen/tools/check/check_hotplug
T
emellor@leeni.uk.xensource.com f3ac9a462d check_hotplug fails on one of my machines running ubunto 4.10 "Warty
Warhog", due to misparsing the udevinfo version string. The problem is
caused by an old version of sed that does not appreciate the
regexp. This patch fixes it, and also works on debian unstable and
SLES9SP2. Please apply...

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
Signed-Off-By: Orna Agmon <ladypine@ladypine.org>
2005-11-25 15:26:19 +00:00

17 lines
360 B
Bash

#!/bin/bash
# CHECK-INSTALL
function error {
echo
echo ' *** Check for the hotplug scripts (hotplug) FAILED'
exit 1
}
[ -x "$(which udevinfo)" ] && \
UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
exit 0
fi
which hotplug 1>/dev/null 2>&1 || error