-# Install base system
-mkfedora -v -r $releasever -a $basearch -k $packages $root
-
-# Disable all services in reference image
-chroot $root sh -c "/sbin/chkconfig --list | awk '{ print \$1 }' | xargs -i /sbin/chkconfig {} off"
-
-# FC2 minilogd starts up during shutdown and makes unmounting
-# impossible. Just get rid of it.
-rm -f $root/sbin/minilogd
-ln -nsf /bin/true $root/sbin/minilogd
-
-# Build schema
-make -C $srcdir/pl_db
-
-#
-# Install
-#
-
-# Install configuration scripts
-echo "* Installing configuration scripts"
-install -D -m 755 plc_config.py $root/tmp/plc_config.py
-chroot $root sh -c 'cd /tmp; python plc_config.py build; python plc_config.py install'
-install -D -m 755 plc-config $root/usr/bin/plc-config
-install -D -m 755 api-config $root/usr/bin/api-config
-
-# Install initscripts
-echo "* Installing initscripts"
-find plc.d | cpio -p -d -u $root/etc/
-install -D -m 755 guest.init $root/etc/init.d/plc
-chroot $root sh -c 'chkconfig --add plc; chkconfig plc on'
-
-# Install DB schema and API code
-echo "* Installing DB schema and API code"
-mkdir -p $root/usr/share
-rsync -a $srcdir/pl_db $srcdir/plc_api $root/usr/share/
-
-# Install web scripts
-echo "* Installing web scripts"
-mkdir -p $root/usr/bin
-install -m 755 \
- $srcdir/plc/scripts/gen-sites-xml.py \
- $srcdir/plc/scripts/gen-slices-xml-05.py \
- $srcdir/plc/scripts/gen-static-content.py \
- $root/usr/bin/
-
-# Install web pages
-echo "* Installing web pages"
-mkdir -p $root/var/www/html
-# Exclude old cruft, unrelated GENI pages, and official documents
-rsync -a \
- --exclude='*2002' --exclude='*2003' \
- --exclude=geni --exclude=PDN --exclude=Talks \
- $srcdir/plc_www/ $root/var/www/html/
-
-# Install configuration file
-echo "* Installing configuration file"
-install -D -m 444 $config $data/etc/planetlab/default_config.xml
-
-# Move "data" directories out of the installation