source: trunk/packages/xen-common/xen-common/install.sh @ 95

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

Add xen and xen-common

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/sh
2
3src='./install'
4if [ -d ./dist ]; then
5  src='./dist/install'
6fi
7
8if ! [ -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
12fi
13
14dst='/'
15if [ $# -ne 0 ]; then
16  dst=$1
17fi
18
19if ! [ -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
23fi
24
25tmp="`mktemp -d`"
26
27echo "Installing Xen from '$src' to '$dst'..."
28(cd $src; tar -cf - * ) | tar -C "$tmp" -xf -
29
30[ -x "$(which udevinfo)" ] && \
31  UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
32
33if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
34  echo " - installing for udev-based system"
35  rm -rf "$tmp/etc/hotplug"
36else
37  echo " - installing for hotplug-based system"
38  rm -rf "$tmp/etc/udev"
39fi
40
41echo " - modifying permissions"
42chmod -R a+rX "$tmp"
43
44(cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf -
45rm -rf "$tmp"
46
47echo "All done."
48
49echo "Checking to see whether prerequisite tools are installed..."
50cd $src/../check
51./chk install
52echo "All done."
53
54exit 0
Note: See TracBrowser for help on using the repository browser.