source: trunk/packages/xen-3.1/xen-3.1/tools/check/check_udev @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

  • Property svn:executable set to *
File size: 556 bytes
Line 
1#!/bin/sh
2# CHECK-INSTALL
3
4RC=0
5
6case ${OS} in
7OpenBSD|NetBSD|FreeBSD)
8        TOOL="vnconfig"
9        which ${TOOL} 1>/dev/null 2>&1 || RC=1
10        ;;
11Linux)
12        TOOL="udevinfo"
13        UDEV_VERSION="0"
14        test -x "$(which ${TOOL} 2>/dev/null)" && \
15                UDEV_VERSION=$(${TOOL} -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
16        if test "${UDEV_VERSION}" -ge 059; then
17                RC=0
18        else
19                TOOL="hotplug"
20                which ${TOOL} 1>/dev/null 2>&1 || RC=1
21        fi
22        ;;
23*)
24        TOOL=""
25        echo "Unknown OS" && RC=1
26        ;;
27esac
28
29if test ${RC} -ne 0; then
30        echo
31        echo " *** Check for ${TOOL} FAILED"
32fi
33
34exit ${RC}
Note: See TracBrowser for help on using the repository browser.