# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
-# $Id: build.sh,v 1.34 2006/04/07 03:50:08 mlhuang Exp $
+# $Id$
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ -f /etc/planetlab/plc_config ] ; then
# Source PLC configuration
. /etc/planetlab/plc_config
-elif [ -d configurations/$CONFIGURATION ] ; then
+fi
+
+# If PLC configuration is not valid, try a static configuration
+if [ -z "$PLC_BOOT_CA_SSL_CRT" -a -d configurations/$CONFIGURATION ] ; then
# (Deprecated) Source static configuration
. configurations/$CONFIGURATION/configuration
PLC_NAME="PlanetLab"
fi
PLC_BOOT_HOST=$PRIMARY_SERVER
PLC_BOOT_SSL_PORT=$PRIMARY_SERVER_PORT
- PLC_BOOT_SSL_CRT=configurations/$CONFIGURATION/$PRIMARY_SERVER_CERT
+ PLC_BOOT_CA_SSL_CRT=configurations/$CONFIGURATION/$PRIMARY_SERVER_CERT
PLC_ROOT_GPG_KEY_PUB=configurations/$CONFIGURATION/$PRIMARY_SERVER_GPG
fi
# but never got around to it. Just install the same parameters for
# both for now.
for dir in $overlay/usr/boot $overlay/usr/boot/backup ; do
- install -D -m 644 $PLC_BOOT_SSL_CRT $dir/cacert.pem
+ install -D -m 644 $PLC_BOOT_CA_SSL_CRT $dir/cacert.pem
install -D -m 644 $PLC_ROOT_GPG_KEY_PUB $dir/pubring.gpg
echo "$PLC_BOOT_HOST" >$dir/boot_server
echo "$PLC_BOOT_SSL_PORT" >$dir/boot_server_port
done
# (Deprecated) Install old-style boot server configuration files
-install -D -m 644 $PLC_BOOT_SSL_CRT $overlay/usr/bootme/cacert/$PLC_BOOT_HOST/cacert.pem
+install -D -m 644 $PLC_BOOT_CA_SSL_CRT $overlay/usr/bootme/cacert/$PLC_BOOT_HOST/cacert.pem
echo "$FULL_VERSION_STRING" >$overlay/usr/bootme/ID
echo "$PLC_BOOT_HOST" >$overlay/usr/bootme/BOOTSERVER
echo "$PLC_BOOT_HOST" >$overlay/usr/bootme/BOOTSERVER_IP
Console login at this point is restricted to root. Provide the root
password of the default $PLC_NAME Central administrator account at the
time that this CD was created.
+
EOF
# Set root password