ia64/xen-unstable

annotate install.sh @ 8056:5ae89ce67486

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>
author emellor@leeni.uk.xensource.com
date Fri Nov 25 15:26:19 2005 +0000 (2005-11-25)
parents dd50b17dc60f
children e639d53330ba
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
emellor@7963 30 [ -x "$(which udevinfo)" ] && \
emellor@8056 31 UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
emellor@7963 32
emellor@7963 33 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
kaf24@7264 34 cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
kaf24@7264 35 else
kaf24@7264 36 cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
kaf24@7264 37 fi
kaf24@7264 38
iap10@2895 39 echo "Checking to see whether prerequisite tools are installed..."
iap10@2895 40 cd $src/../check
iap10@2895 41 ./chk install
iap10@2895 42 echo "All done."
iap10@2895 43
kaf24@2828 44 exit 0