mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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>
45 lines
1.1 KiB
Bash
Executable File
45 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
src='./install'
|
|
if [ -d ./dist ]; then
|
|
src='./dist/install'
|
|
fi
|
|
|
|
if ! [ -d $src ]; then
|
|
echo "ERROR: Could not find a valid distribution directory."
|
|
echo " If this is a source-only release, try 'make dist'."
|
|
exit 1
|
|
fi
|
|
|
|
dst='/'
|
|
if [ $# -ne 0 ]; then
|
|
dst=$1
|
|
fi
|
|
|
|
if ! [ -d $dst ]; then
|
|
echo "ERROR: You must specify a valid install directory."
|
|
echo " The specified directory '$dst' is not valid."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Installing Xen from '$src' to '$dst'..."
|
|
(cd $src; tar -cf - --exclude etc/init.d --exclude etc/hotplug --exclude etc/udev * ) | tar -C $dst -xf -
|
|
cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
|
|
echo "All done."
|
|
|
|
[ -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
|
|
cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
|
|
else
|
|
cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
|
|
fi
|
|
|
|
echo "Checking to see whether prerequisite tools are installed..."
|
|
cd $src/../check
|
|
./chk install
|
|
echo "All done."
|
|
|
|
exit 0
|