X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=4f1ed8578e15ece207aaf6450cf91862c2640435;hb=dd4b256824506733ee1cfe7215b364311898199e;hp=80b3400381ddb01dd47897e24f40cec9c182f192;hpb=c9f6863aedfca503474371136e412dca8d06150f;p=sliceimage.git diff --git a/build.sh b/build.sh index 80b3400..4f1ed85 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ # Mark Huang # Copyright (C) 2004-2006 The Trustees of Princeton University # -# $Id: build.sh,v 1.5 2006/03/29 17:08:45 mlhuang Exp $ +# $Id: build.sh,v 1.8 2006/03/31 21:18:10 mlhuang Exp $ # PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -17,7 +17,7 @@ if [ -d ../build ] ; then PATH=$PATH:../build srcdir=.. else - echo "Error: Could not find sources in either . or .." + echo "Error: Could not find $(cd .. && pwd -P)/build/" exit 1 fi @@ -80,6 +80,9 @@ while getopts "r:a:h" opt ; do esac done +# Do not tolerate errors +set -e + # Make /vservers vroot=$PWD/vservers/vserver-reference install -d -m 755 $vroot @@ -90,6 +93,9 @@ for package in "${packagelist[@]}" ; do done mkfedora -v -r $releasever -a $basearch $packages $vroot +# Disable all services in reference image +chroot $vroot sh -c "/sbin/chkconfig --list | awk '{ print \$1 }' | xargs -i /sbin/chkconfig {} off" + # This tells the Boot Manager that it is okay to update # /etc/resolv.conf and /etc/hosts whenever the network configuration # changes. Users are free to delete this file.