Add a build_usb_partition function to create a partitioned usb image that will
[bootcd.git] / newbuild.sh
index 033d56e..66b5010 100755 (executable)
@@ -6,7 +6,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2004-2006 The Trustees of Princeton University
 #
-# $Id: build.sh,v 1.42 2006/11/22 20:40:48 mef Exp $
+# $Id$
 #
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@ -22,6 +22,15 @@ else
     exit 1
 fi
 
+# This support for backwards compatibility can be taken out in the
+# future. RC1 based MyPLCs set $PLC_BOOT_SSL_CRT in the plc_config
+# file, but >=RC2 based bootcd assumes that $PLC_BOOT_CA_SSL_CRT is
+# set.
+if [ -z "$PLC_BOOT_CA_SSL_CRT" -a ! -z "$PLC_BOOT_SSL_CRT" ] ; then
+    PLC_BOOT_CA_SSL_CRT=$PLC_BOOT_SSL_CRT
+    PLC_API_CA_SSL_CRT=$PLC_API_SSL_CRT
+fi
+
 output="$PLC_NAME-BootCD-$BOOTCD_VERSION.iso"
 
 usage()
@@ -117,7 +126,7 @@ EOF
 
 # Pack miscellaneous files into a compressed archive
 echo "* Compressing miscellaneous files image"
-(cd $misc && find . | cpio --quiet -c -o) | \
+(cd $misc && find . | cpio --quiet -H newc -o) | \
     python ../filesystem/cpiochown.py --owner root:root - | \
     gzip -9 >$isofs/misc.img