summaryrefslogtreecommitdiffstats
path: root/sanity/system_light/scripts/compile_kernel/kernel_compile.sh
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-03-28 19:59:51 +0530
committerRaghavendra Bhat <raghavendrabhat@gluster.com>2012-03-28 20:00:29 +0530
commit24c257c608bcfbfe981548fef14ec42579bb1130 (patch)
tree0021c64afacaa431c86c06e3af379058148c053d /sanity/system_light/scripts/compile_kernel/kernel_compile.sh
parent4293282fd507e6165916632b9ed2d3789d0f31bf (diff)
sanity: add kernel compile script and make changes to the nightly sanity kernel_compile
Change-Id: I1f84a1fed05c15c5258e66d39d87fb59e952a111 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Diffstat (limited to 'sanity/system_light/scripts/compile_kernel/kernel_compile.sh')
-rwxr-xr-xsanity/system_light/scripts/compile_kernel/kernel_compile.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/sanity/system_light/scripts/compile_kernel/kernel_compile.sh b/sanity/system_light/scripts/compile_kernel/kernel_compile.sh
index 646d639..03f8dab 100755
--- a/sanity/system_light/scripts/compile_kernel/kernel_compile.sh
+++ b/sanity/system_light/scripts/compile_kernel/kernel_compile.sh
@@ -138,9 +138,11 @@ function parseargs () {
}
function make_tmp_dir () {
- local dirname="$ENV_me.$RANDOM.$RANDOM.$RANDOM.$$";
- ENV_tmpdir="$((umask 077 && \
- mktemp -d -q ${tmpdir:-/tmp}/$dirname) 2>/dev/null)";
+ local dirname="$ENV_me.$RANDOM.$RANDOM.$RANDOM.$$.XXXX";
+
+ umask 077;
+ ENV_tmpdir="$(mktemp -d ${tmpdir:-/tmp}/$dirname)";
+
[ -z "$ENV_tmpdir" ] || [ ! -d "$ENV_tmpdir" ] && {
warn "Unable to create temporary directory. Exiting ..";
return 1;