3 # Builds VServer reference image
5 # Mark Huang <mlhuang@cs.princeton.edu>
6 # Copyright (C) 2004-2006 The Trustees of Princeton University
8 # $Id: build.sh,v 1.5 2006/03/29 17:08:45 mlhuang Exp $
11 PATH=/sbin:/bin:/usr/sbin:/usr/bin
13 # In both a normal CVS environment and a PlanetLab RPM
14 # build environment, all of our dependencies are checked out into
15 # directories at the same level as us.
16 if [ -d ../build ] ; then
20 echo "Error: Could not find sources in either . or .."
26 # Release and architecture to install
61 echo "Usage: build.sh [OPTION]..."
62 echo " -r release Fedora release number (default: $releasever)"
63 echo " -a arch Fedora architecture (default: $basearch)"
64 echo " -h This message"
69 while getopts "r:a:h" opt ; do
84 vroot=$PWD/vservers/vserver-reference
85 install -d -m 755 $vroot
87 # Install vserver-reference system
88 for package in "${packagelist[@]}" ; do
89 packages="$packages -p $package"
91 mkfedora -v -r $releasever -a $basearch $packages $vroot
93 # This tells the Boot Manager that it is okay to update
94 # /etc/resolv.conf and /etc/hosts whenever the network configuration
95 # changes. Users are free to delete this file.
96 touch $vroot/etc/AUTO_UPDATE_NET_FILES