From 6d9a9188de4c98185828e7f39edc1b3568e8440d Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Tue, 20 Nov 2007 16:39:50 +0000 Subject: [PATCH] Merge disconnected ops branch. --- build.sh | 25 +++++++++++-------------- cdcustom.sh | 2 +- conf_files/pl_boot | 18 +++++++++++++++++- conf_files/pl_sysinit | 2 ++ conf_files/pl_validateconf | 2 +- newbuild.sh | 2 +- planetlab-fc6-bootcd.lst | 1 + prep.sh | 2 +- 8 files changed, 35 insertions(+), 19 deletions(-) diff --git a/build.sh b/build.sh index 97e234c..a85a41e 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ # Mark Huang # Copyright (C) 2004-2006 The Trustees of Princeton University # -# $Id: build.sh,v 1.40 2006/07/25 23:51:39 mlhuang Exp $ +# $Id$ # PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -18,6 +18,8 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin CONFIGURATION=default NODE_CONFIGURATION_FILE= ALL=0 +# Leave 4 MB of free space +FREE_SPACE=4096 usage() { @@ -262,8 +264,7 @@ mkisofs -o "$iso" \ echo -n "* Creating USB image... " usb="$PLC_NAME-BootCD-$BOOTCD_VERSION.usb" -# Leave 1 MB of free space on the VFAT filesystem -mkfs.vfat -C "$usb" $(($(du -sk $isofs | awk '{ print $1; }') + 1024)) +mkfs.vfat -C "$usb" $(($(du -sk $isofs | awk '{ print $1; }') + $FREE_SPACE)) # Mount it tmp=$(mktemp -d ${BUILDTMP}/bootcd.XXXXXX) @@ -295,8 +296,7 @@ $srcdir/syslinux/unix/syslinux "$usb" echo -n "* Creating USB image... " usb="$PLC_NAME-BootCD-$BOOTCD_VERSION-serial.usb" -# Leave 1 MB of free space on the VFAT filesystem -mkfs.vfat -C "$usb" $(($(du -sk $isofs | awk '{ print $1; }') + 1024)) +mkfs.vfat -C "$usb" $(($(du -sk $isofs | awk '{ print $1; }') + $FREE_SPACE)) # Mount it tmp=$(mktemp -d ${BUILDTMP}/bootcd.XXXXXX) @@ -394,8 +394,8 @@ echo "ttyS0" >> etc/securetty #calculate the size of /tmp based on the size of /etc & /var + 8MB slack etcsize=$(du -s ./etc | awk '{ print $1 }') -varsize=$(du -s ./etc | awk '{ print $1 }') -let msize=($vsize+$esize+8192)/1024 +varsize=$(du -s ./var | awk '{ print $1 }') +let msize=($varsize+$etcsize+8192)/1024 # generate pl_rsysinit @@ -431,12 +431,11 @@ chmod +x etc/rc.d/init.d/pl_rsysinit popd -chown -R 0.0 $cramfs +chown -R 0.0 $tmp #create the cramfs image echo "* Creating cramfs image" mkfs.cramfs $tmp/ $cramfs -# Leave 1 MB of free space on the VFAT filesystem cramfs_size=$(($(du -sk $cramfs | awk '{ print $1; }'))) mv $cramfs ${BUILDTMP}/cramfs.img rm -rf $tmp @@ -447,7 +446,7 @@ echo "* Creating ISO CRAMFS-based image" iso="$PLC_NAME-BootCD-$BOOTCD_VERSION-cramfs.iso" tmp=$(mktemp -d ${BUILDTMP}/bootcd.XXXXXX) -trap "$tmp; rm -rf $tmp" ERR INT +trap "cd /; rm -rf $tmp" ERR INT (cd $isofs && find . | grep -v "\.img$" | cpio -p -d -u $tmp/) cat >$tmp/isolinux.cfg < # Copyright (C) 2004-2006 The Trustees of Princeton University # -# $Id: newbuild.sh,v 1.2 2006/12/04 20:07:18 mlhuang Exp $ +# $Id$ # PATH=/sbin:/bin:/usr/sbin:/usr/bin diff --git a/planetlab-fc6-bootcd.lst b/planetlab-fc6-bootcd.lst index 916a374..f1549de 100644 --- a/planetlab-fc6-bootcd.lst +++ b/planetlab-fc6-bootcd.lst @@ -42,3 +42,4 @@ package: dos2unix package: bind-utils package: sharutils package: vconfig +package: ntp diff --git a/prep.sh b/prep.sh index 0b7421d..0a10e9f 100755 --- a/prep.sh +++ b/prep.sh @@ -8,7 +8,7 @@ # Mark Huang # Copyright (C) 2004-2006 The Trustees of Princeton University # -# $Id: prep.sh,v 1.13.6.1 2007/08/30 16:38:59 mef Exp $ +# $Id$ # PATH=/sbin:/bin:/usr/sbin:/usr/bin -- 2.43.0