ia64/xen-unstable

view freebsd-5.3-xen-sparse/fbsdxensetup @ 7238:971e7c7411b3

Raise an exception if an error appears on the pipes to our children, and make
sure that the child's pipes are closed even under that exception. Move the
handling of POLLHUP to the end of the loop, so that we guarantee to read any
remaining data from the child if POLLHUP and POLLIN appear at the same time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Thu Oct 06 10:13:11 2005 +0100 (2005-10-06)
parents 1bfa723fe264
children
line source
1 #!/bin/csh -f
3 setenv XENROOT `pwd`
4 cd $XENROOT
5 if ( ! -d freebsd-5.3-xen-sparse ) then
6 echo "Please run this script from the root of the Xen source tree"
7 exit 1
8 endif
9 rm -rf $XENROOT/fbsdtmp $XENROOT/freebsd-5.3-xenU
10 mkdir -p $XENROOT/fbsdtmp
11 cd $XENROOT/fbsdtmp
12 echo "step 1"
13 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.aa
14 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ab
15 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ac
16 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ad
17 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ae
18 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.af
19 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ag
20 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ah
21 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ai
22 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.aj
23 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.ak
24 wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/5.3-RELEASE/src/ssys.al
25 mkdir -p foo
26 cat ssys.?? | tar --unlink -xpzf - -C foo/
27 mkdir -p $XENROOT/freebsd-5.3-xenU
28 mv foo/sys/* $XENROOT/freebsd-5.3-xenU
29 cd $XENROOT
30 rm -rf $XENROOT/fbsdtmp
31 echo "step 2"
32 mkdir -p $XENROOT/freebsd-5.3-xenU/i386-xen/include
33 cd $XENROOT/freebsd-5.3-xenU/i386-xen/include/
34 foreach file (../../i386/include/*)
35 ln -s $file
36 end
37 echo "step 3"
38 cd $XENROOT/freebsd-5.3-xen-sparse
39 echo "step 4"
40 ./mkbuildtree ../freebsd-5.3-xenU
41 echo "step 5"
42 cd $XENROOT/freebsd-5.3-xenU/i386-xen/include
43 ln -s $XENROOT/xen/include/public xen-public
44 echo "done"