for backwards compatibilty, copy primary server cacert to old directory
[bootcd.git] / build.sh
index 03aaa18..409dda8 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -9,8 +9,9 @@ CONFIGURATIONS_DIR=configurations/
 BUILD_DIR=build/
 
 BOOTCD_VERSION="3.0-beta0.4"
-FULL_VERSION_STRING="PlanetLab BootCD $BOOTCD_VERSION"
-
+FULL_VERSION_STRING="PlanetLab BootCD"
+OUTPUT_IMAGE_NAME='PlanetLab-BootCD'
+    
 SYSLINUX_SRC=sources/syslinux-2.11.tar.bz2
 
 BOOTCD_YUM_GROUP=BootCD
@@ -175,6 +176,11 @@ function build_initrd()
     echo "$PRIMARY_SERVER" > $CD_ROOT/usr/bootme/BOOTSERVER_IP
     echo "$PRIMARY_SERVER_PORT" > $CD_ROOT/usr/bootme/BOOTPORT
 
+    echo "copying cacert to old boot cd directory bootme (TEMPORARY)"
+    mkdir -p $CD_ROOT/usr/bootme/cacert/$PRIMARY_SERVER/
+    cp -f $CURRENT_CONFIG_DIR/$PRIMARY_SERVER_CERT \
+       $CD_ROOT/usr/bootme/cacert/$PRIMARY_SERVER/cacert.pem
+
     echo "forcing lvm to make lvm1 partitions (TEMPORARY)"
     cp -f $CONF_FILES_DIR/lvm.conf $CD_ROOT/etc/lvm/
 
@@ -266,16 +272,24 @@ if [[ "$1" == "clean" || "$1" == "burn" || "$1" == "build" ]]; then
     . $CURRENT_CONFIG_DIR/configuration
 
     # setup vars for this configuration
+
+    # version string for this build
     if [[ ! -z "$EXTRA_VERSION" ]]; then
-       FULL_VERSION_STRING="$FULL_VERSION_STRING-$EXTRA_VERSION"
+       FULL_VERSION_STRING="$FULL_VERSION_STRING $EXTRA_VERSION"
     fi
+    FULL_VERSION_STRING="$FULL_VERSION_STRING $BOOTCD_VERSION"
 
     # destination image
+    if [[ ! -z "$EXTRA_VERSION" ]]; then
+       OUTPUT_IMAGE_NAME="$OUTPUT_IMAGE_NAME-$EXTRA_VERSION"
+    fi
+    OUTPUT_IMAGE_NAME="$OUTPUT_IMAGE_NAME-$BOOTCD_VERSION"
+
+    # setup build directories
     BUILD_DIR=build/$configuration
     mkdir -p $BUILD_DIR
     ISO=$BUILD_DIR/`echo $OUTPUT_IMAGE_NAME | sed -e "s/%version/$BOOTCD_VERSION/"`.iso
 
-    # built cd root
     CD_ROOT=`pwd`/$BUILD_DIR/cdroot
     mkdir -p $CD_ROOT