Blame SOURCES/0001-Fix-well-known-tempfile-issue-in-script.patch

86e033
From 5c42875b9e217127bc6fb537e258f386aed2a23a Mon Sep 17 00:00:00 2001
86e033
From: Brendan Cunningham <brendan.cunningham@intel.com>
86e033
Date: Thu, 24 Sep 2015 11:10:45 -0400
86e033
Subject: [PATCH 1/2] Fix well-known tempfile issue in script.
86e033
86e033
---
86e033
 Esm/ib/src/linux/startup/sm_capture.sh | 6 ++++--
86e033
 1 file changed, 4 insertions(+), 2 deletions(-)
86e033
86e033
diff --git a/Esm/ib/src/linux/startup/sm_capture.sh b/Esm/ib/src/linux/startup/sm_capture.sh
86e033
index cf1e133..e3fbf4b 100755
86e033
--- a/Esm/ib/src/linux/startup/sm_capture.sh
86e033
+++ b/Esm/ib/src/linux/startup/sm_capture.sh
86e033
@@ -46,8 +46,10 @@ fi
86e033
 
86e033
 
86e033
 PROGNAME="$0"
86e033
-dirName="smdump-"`date '+%d%b%y%H%M%S'`
86e033
-dumpLocation="/tmp/$dirName"
86e033
+# Hedge against bash vs. sh
86e033
+dateStr=`date '+%d%b%y%H%M%S'`
86e033
+dumpLocation="`mktemp -d /tmp/smdump-${dateStr}-XXXXXX`"
86e033
+dirName=`basename $dumpLocation`
86e033
 
86e033
 usage() {
86e033
 	echo "Usage:"
86e033
-- 
86e033
1.8.3.1
86e033