# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2005-2006 The Trustees of Princeton University
#
-# $Id: buildnode.sh,v 1.5 2006/03/21 14:57:29 mlhuang Exp $
+# $Id: buildnode.sh,v 1.11 2006/05/18 18:42:33 mlhuang Exp $
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
# Release and architecture to install
-releasever=2
+releasever=4
basearch=i386
usage()
# Install the "PlanetLab" group. This requires that the PlanetLab
# build system install the appropriate yumgroups.xml file (currently
# build/groups/v3_yumgroups.xml) in $RPM_BUILD_DIR/../RPMS/ and that
-# mkfedora runs either yum-arch or createrepo on that directory.
-mkfedora -v -r $releasever -a $basearch -g PlanetLab $VROOT
+# mkfedora runs either yum-arch or createrepo on that directory. dev
+# is specified explicitly because of a stupid bug in its %post script
+# that causes its installation to fail; see the mkfedora script for a
+# full explanation. coreutils and python are specified explicitly
+# because groupinstall does not honor Requires(pre) dependencies
+# properly, most %pre scripts require coreutils to be installed first,
+# and some of our %post scripts require python.
+mkfedora -v -r $releasever -a $basearch -k -p udev -p coreutils -p python -g PlanetLab $VROOT
# Disable unnecessary services
echo "* Disabling unnecessary services"
for service in netfs rawdevices cpuspeed smartd ; do
- /usr/sbin/chroot $VROOT /sbin/chkconfig $service off
+ if [ -x $VROOT/etc/init.d/$service ] ; then
+ /usr/sbin/chroot $VROOT /sbin/chkconfig $service off
+ fi
done
# Build tarball
echo "* Building bootstrap tarball"
tar -cpjf PlanetLab-Bootstrap.tar.bz2 -C $VROOT .
-rm -rf $VROOT
exit 0