From: Marc Fiuczynski Date: Thu, 25 Oct 2007 04:01:57 +0000 (+0000) Subject: Need to squash the error exit status of mktemp when testing whether X-Git-Tag: bootcd-3.4-2~34 X-Git-Url: http://git.onelab.eu/?p=bootcd.git;a=commitdiff_plain;h=8e605335bae0f5974581b1f4e2807cbb12549caf Need to squash the error exit status of mktemp when testing whether /data is a readonly filesystem. Instead need to check if the result of mktemp is an empty string or not. --- diff --git a/build.sh b/build.sh index c150605..1e6aa52 100755 --- a/build.sh +++ b/build.sh @@ -107,8 +107,8 @@ echo "* Building images for $FULL_VERSION_STRING" # is available. BUILDTMP=/usr/tmp if [ -d /data ] ; then - isreadonly=$(mktemp /data/isreadonly.XXXXXX) - if [ $? -eq 0 ] ; then + isreadonly=$(mktemp /data/isreadonly.XXXXXX || /bin/true) + if [ -n "$isreadonly" ] ; then rm -f "$isreadonly" BUILDTMP=/data fi