ia64/xen-unstable

annotate 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
rev   line source
kaf24@2828 1 #!/bin/sh
kaf24@2828 2
kaf24@2830 3 src='./install'
kaf24@2830 4 if [ -d ./dist ]; then
kaf24@2830 5 src='./dist/install'
kaf24@2830 6 fi
kaf24@2830 7
kaf24@2830 8 if ! [ -d $src ]; then
kaf24@2830 9 echo "ERROR: Could not find a valid distribution directory."
kaf24@2830 10 echo " If this is a source-only release, try 'make dist'."
kaf24@2828 11 exit 1
kaf24@2828 12 fi
kaf24@2828 13
kaf24@2830 14 dst='/'
kaf24@2828 15 if [ $# -ne 0 ]; then
kaf24@2830 16 dst=$1
kaf24@2828 17 fi
kaf24@2828 18
kaf24@2830 19 if ! [ -d $dst ]; then
kaf24@2828 20 echo "ERROR: You must specify a valid install directory."
kaf24@2830 21 echo " The specified directory '$dst' is not valid."
kaf24@2828 22 exit 1
kaf24@2828 23 fi
kaf24@2828 24
kaf24@2830 25 echo "Installing Xen from '$src' to '$dst'..."
kaf24@7264 26 (cd $src; tar -cf - --exclude etc/init.d --exclude etc/hotplug --exclude etc/udev * ) | tar -C $dst -xf -
iap10@5080 27 cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
kaf24@2828 28 echo "All done."
kaf24@2828 29
kaf24@7264 30 if [ -x /sbin/udev ] && [ ! -z `udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
kaf24@7264 31 cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
kaf24@7264 32 else
kaf24@7264 33 cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
kaf24@7264 34 fi
kaf24@7264 35
iap10@2895 36 echo "Checking to see whether prerequisite tools are installed..."
iap10@2895 37 cd $src/../check
iap10@2895 38 ./chk install
iap10@2895 39 echo "All done."
iap10@2895 40
kaf24@2828 41 exit 0