Permalink
Browse files

Dev: oracle: improve and fix commit ed16db

  • Loading branch information...
1 parent ed16db9 commit d8a2fc81c8562af661e863816d57297fa26136e5 @dmuhamedagic dmuhamedagic committed Apr 17, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 heartbeat/oracle
View
@@ -393,10 +393,10 @@ dumpinstipc() {
ocf_log warn "$dumpdest is not a directory"
return 1
fi
- local fcount=`ls -rt $dumpdest/*.trc | wc -l`
+ local fcount=`ls -rt $dumpdest | grep '\.trc$' | wc -l`
output=`dbasql getipc`
- local lastf=`ls -rt $dumpdest/*.trc | tail -1`
- local fcount2=`ls -rt $dumpdest/*.trc | wc -l`
+ local lastf=`ls -rt $dumpdest | grep '\.trc$' | tail -1`
+ local fcount2=`ls -rt $dumpdest | grep '\.trc$' | wc -l`
if [ $((fcount+1)) -eq $fcount2 ]; then
echo $dumpdest/$lastf
else
@@ -406,7 +406,10 @@ dumpinstipc() {
}
parseipc() {
local inf=$1
- test -f "$1" || return 1
+ if [ ! -f "$1" ]; then
+ ocf_log warn "$1: no such ipc trace file"
+ return 1
+ fi
awk '
$3 == "Shmid" {n=1;next}
n {

0 comments on commit d8a2fc8

Please sign in to comment.