ia64/xen-unstable

view install.sh @ 7264:409cea2432fc

Add installation of the udev rules if appropriate. With a normal 'make
install', the udev rules will be installed if udev version is >= 059;
otherwise, the hotplug rules get installed.

When 'make dist' is done, we set a variable so that both hotplug and
udev rules are installed into the dist tarball. install.sh then takes
care of picking the proper rules.

Also changes the hotplug check to look for a proper udev version

Signed-off-by: Jeremy Katz <katzj@redhat.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Oct 07 14:47:45 2005 +0100 (2005-10-07)
parents cff6a5c4f4b6
children 5aad7e145e50
line source
1 #!/bin/sh
3 src='./install'
4 if [ -d ./dist ]; then
5 src='./dist/install'
6 fi
8 if ! [ -d $src ]; then
9 echo "ERROR: Could not find a valid distribution directory."
10 echo " If this is a source-only release, try 'make dist'."
11 exit 1
12 fi
14 dst='/'
15 if [ $# -ne 0 ]; then
16 dst=$1
17 fi
19 if ! [ -d $dst ]; then
20 echo "ERROR: You must specify a valid install directory."
21 echo " The specified directory '$dst' is not valid."
22 exit 1
23 fi
25 echo "Installing Xen from '$src' to '$dst'..."
26 (cd $src; tar -cf - --exclude etc/init.d --exclude etc/hotplug --exclude etc/udev * ) | tar -C $dst -xf -
27 cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
28 echo "All done."
30 if [ -x /sbin/udev ] && [ ! -z `udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
31 cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
32 else
33 cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
34 fi
36 echo "Checking to see whether prerequisite tools are installed..."
37 cd $src/../check
38 ./chk install
39 echo "All done."
41 exit 0