Skip to content

Commit 4f445a8

Browse files
authored
feat: HP-UX support (#305)
* Fix for syntax of sed command on HP-UX. * Version bump * Version bump for 4.3.23
1 parent a885fb8 commit 4f445a8

File tree

6 files changed

+24
-8
lines changed

6 files changed

+24
-8
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.3.22
2+
current_version = 4.3.23
33
commit = False
44
tag = False
55

scripts/collector/mysql/collect-data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Setup directories needed for execution
1818
#############################################################################
19-
OpVersion="4.3.22"
19+
OpVersion="4.3.23"
2020

2121
LOCALE=$(echo $LANG | cut -d '.' -f 1)
2222
export LANG=C

scripts/collector/oracle/collect-data.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Setup directories needed for execution
1818
#############################################################################
19-
OpVersion="4.3.22"
19+
OpVersion="4.3.23"
2020
dbmajor=""
2121

2222
LOCALE=$(echo $LANG | cut -d '.' -f 1)
@@ -34,12 +34,22 @@ SQL_DIR=${SCRIPT_DIR}/sql
3434

3535
GREP=$(which grep)
3636
SED=$(which sed)
37-
if [ $(uname) = "SunOS" ]
37+
MD5SUM=$(which md5sum)
38+
MD5COL=1
39+
40+
if [ "$(uname)" = "SunOS" ]
3841
then
3942
GREP=/usr/xpg4/bin/grep
4043
SED=/usr/xpg4/bin/sed
4144
fi
4245

46+
if [ "$(uname)" = "HP-UX" ]; then
47+
if [ -f /usr/local/bin/md5 ]; then
48+
MD5SUM=/usr/local/bin/md5
49+
MD5COL=4
50+
fi
51+
fi
52+
4353
ZIP=$(which zip 2>/dev/null)
4454
if [ "${ZIP}" = "" ]
4555
then
@@ -143,6 +153,11 @@ do
143153
cp sed_${V_FILE_TAG}.tmp ${outfile}
144154
rm sed_${V_FILE_TAG}.tmp
145155
else if [ $(uname) = "AIX" ]
156+
then
157+
sed 's/ *\|/\|/g;s/\| */\|/g;/^$/d' ${outfile} > sed_${V_FILE_TAG}.tmp
158+
cp sed_${V_FILE_TAG}.tmp ${outfile}
159+
rm sed_${V_FILE_TAG}.tmp
160+
else if [ "$(uname)" = "HP-UX" ]
146161
then
147162
sed 's/ *\|/\|/g;s/\| */\|/g;/^$/d' ${outfile} > sed_${V_FILE_TAG}.tmp
148163
cp sed_${V_FILE_TAG}.tmp ${outfile}
@@ -153,6 +168,7 @@ do
153168
rm sed_${V_FILE_TAG}.tmp
154169
fi
155170
fi
171+
fi
156172
fi
157173
done
158174
}
@@ -196,7 +212,7 @@ fi
196212

197213
for file in $(ls -1 opdb*${V_FILE_TAG}.csv opdb*${V_FILE_TAG}*.log opdb*${V_FILE_TAG}*.txt)
198214
do
199-
MD5=$(md5sum $file | cut -d ' ' -f 1)
215+
MD5=$(${MD5SUM} $file | cut -d ' ' -f ${MD5COL})
200216
echo "${DBTYPE}|${MD5}|${file}" >> opdb__manifest__${V_FILE_TAG}.txt
201217
done
202218

scripts/collector/postgres/collect-data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Setup directories needed for execution
1818
#############################################################################
19-
OpVersion="4.3.22"
19+
OpVersion="4.3.23"
2020

2121
LOCALE=$(echo $LANG | cut -d '.' -f 1)
2222
export LANG=C

scripts/collector/sqlserver/instanceReview.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ $current_ts = $values[4]
129129
$pkey = $values[5]
130130
$dmaSourceId = $dmaSourceIdObj[0]
131131

132-
$op_version = "4.3.22"
132+
$op_version = "4.3.23"
133133

134134
if ($ignorePerfmon -eq "true") {
135135
$perfCounterLabel = "NoPerfCounter"

scripts/masker/dma-collection-masker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ __all__ = [
3333
"run_masker",
3434
]
3535

36-
__version__ = "4.3.22"
36+
__version__ = "4.3.23"
3737

3838
logger = logging.getLogger(__name__)
3939

0 commit comments

Comments
 (0)