X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=c15060556ec0e01acea2030e07fbcb15be20f810;hb=1c8da6a7748891ede862feb32ac98080f65ea19c;hp=0e1f598eeba380d60e115fc868d95a5bcec1ac5c;hpb=fd01ac135d4660001dd8801e59db6b02c0826546;p=bootcd.git diff --git a/build.sh b/build.sh index 0e1f598..c150605 100755 --- a/build.sh +++ b/build.sh @@ -100,12 +100,19 @@ FULL_VERSION_STRING="$PLC_NAME BootCD $BOOTCD_VERSION" echo "* Building images for $FULL_VERSION_STRING" -# From within a myplc chroot /tmp is too small to build -# all possible images, whereas /data is part of the host +# From within a myplc chroot /usr/tmp is too small +# to build all possible images, whereas /data is part of the host # filesystem and usually has sufficient space. What we # should do is check whether the expected amount of space # is available. -[ -d /data ] && BUILDTMP=/data || BUILDTMP=/tmp +BUILDTMP=/usr/tmp +if [ -d /data ] ; then + isreadonly=$(mktemp /data/isreadonly.XXXXXX) + if [ $? -eq 0 ] ; then + rm -f "$isreadonly" + BUILDTMP=/data + fi +fi # Root of the ISO and USB images echo "* Populating root filesystem..."