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

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