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

dea3a0
From 5dfa99291d5702abf1a00aa7c396295e019ca5f2 Mon Sep 17 00:00:00 2001
dea3a0
From: Honggang Li <honli@redhat.com>
dea3a0
Date: Thu, 19 Oct 2017 14:47:19 +0800
dea3a0
Subject: [PATCH] Fix well-known tempfile issue in script
dea3a0
dea3a0
---
dea3a0
 Esm/ib/src/linux/startup/sm_capture.sh | 6 ++++--
dea3a0
 1 file changed, 4 insertions(+), 2 deletions(-)
dea3a0
dea3a0
diff --git a/Esm/ib/src/linux/startup/sm_capture.sh b/Esm/ib/src/linux/startup/sm_capture.sh
dea3a0
index fda2e1f..a284486 100755
dea3a0
--- a/Esm/ib/src/linux/startup/sm_capture.sh
dea3a0
+++ b/Esm/ib/src/linux/startup/sm_capture.sh
dea3a0
@@ -38,8 +38,10 @@ SM_EXEC=/usr/lib/opa-fm/runtime/sm
dea3a0
 IFS_FM_BASE=/usr/lib/opa-fm
dea3a0
 
dea3a0
 PROGNAME="$0"
dea3a0
-dirName="smdump-"`date '+%d%b%y%H%M%S'`
dea3a0
-dumpLocation="/tmp/$dirName"
dea3a0
+# Hedge against bash vs. sh
dea3a0
+dateStr=`date '+%d%b%y%H%M%S'`
dea3a0
+dumpLocation="`mktemp -d /tmp/smdump-${dateStr}-XXXXXX`"
dea3a0
+dirName=`basename $dumpLocation`
dea3a0
 
dea3a0
 usage() {
dea3a0
 	echo "Usage:"
dea3a0
-- 
dea3a0
2.14.0
dea3a0