ia64/xen-unstable

view install.sh @ 4079:7dcf99744644

bitkeeper revision 1.1159.258.40 (423085c6l2rF-ZZuQiNGB3ZR9Vzj7A)

Tiny hack to fix install.sh for the case where /etc/init.d is a symlink.
Signed-off-by: ian@xensource.com
author iap10@freefall.cl.cam.ac.uk
date Thu Mar 10 17:37:10 2005 +0000 (2005-03-10)
parents 21ec7bbd352d
children ac47854d261f f7b65f70ccc8
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/boot
27 (echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read m v
28 do
29 l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -n 1)
30 [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0
31 l=$(eval ls -t vmlinuz-$m-xenU 2>/dev/null | head -n 1)
32 [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xenU
33 done
34 cd -
35 cp -fdR $src/* $dst
36 # hack to fixup the case that init.d is a symlink
37 cp -fdR $src/etc/init.d/* $dst/etc/init.d/
38 echo "All done."
40 echo "Checking to see whether prerequisite tools are installed..."
41 cd $src/../check
42 ./chk install
43 echo "All done."
45 exit 0