Skip to content

Commit 446b2ac

Browse files
committed
Fix some more broken paths
1 parent 22ef3fd commit 446b2ac

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

hammerdb/install-script

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ install_mssql()
4141
systemctl stop mssql-server
4242
# shellcheck disable=SC2016
4343
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
44-
cd "$srcdir" || fatal "Cannot cd /usr/local/hammerdb"
45-
cp -R "${srcdir}"/hammerdb-tpcc/mssql/* .
44+
cd "$instdir" || fatal "Cannot cd /usr/local/hammerdb"
45+
cp -R "${srcdir}"/hammerdb-tpcc/mssql/* .
4646

4747
rm -rf "${mountpoint}"/mssql_data/
4848
mkdir -p "${mountpoint}"/mssql_data
@@ -98,13 +98,13 @@ install_mariadb()
9898
#
9999
# Configure things in and mount the appropriate item.
100100
#
101-
cd "$srcdir" || fatal "Cannot cd /usr/local/hammerdb"
102-
cp -R "${srcdir}"/tmp/hammerdb-tpcc/mariadb/* .
101+
cd "$instdir" || fatal "Cannot cd /usr/local/hammerdb"
102+
cp -R "${srcdir}"/hammerdb-tpcc/mariadb/* .
103103

104104
#
105105
# Clean up any residual stuff and set up the directories
106106
#
107-
rm -rf "${mountpoint}"/mysql/* "${log_mount_point}"/mysql/log
107+
rm -rf "${mountpoint}"/mysql "${log_mount_point}"/mysql/log
108108
mkdir -p "${mountpoint}"/mysql/data
109109
chown -R mysql:mysql "${mountpoint}"/mysql
110110
mkdir -p "${log_mount_point}"/mysql/log
@@ -156,7 +156,7 @@ install_postgres()
156156
libpq
157157
fi
158158
systemctl stop postgresql.service
159-
cd "$srcdir" || fatal "Cannot cd /usr/local/hammerdb"
159+
cd "$instdir" || fatal "Cannot cd /usr/local/hammerdb"
160160
cp -R "${srcdir}"/hammerdb-tpcc/postgres/* .
161161

162162
rm -rf /var/lib/pgsql/data

hammerdb/run_hammerdb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ install_it()
129129
# shellcheck disable=SC2086
130130
/var/tmp/hammerdb/install-script -i "$instdir" -d "$disklist" ${installp} -t "$test" ${log_mount_point}
131131
fi
132-
[[ -n "$service" ]] && systemctl restart "$service"
132+
if [[ -n "$service" ]] ; then systemctl restart "$service"; fi
133133
}
134134

135135
build_it() {
@@ -170,7 +170,7 @@ clean_it() {
170170
local test=${1:?Missing test name to uninstall}
171171

172172
[[ -n "$service" ]] && systemctl stop "$service"
173-
[[ -n "${mountpoint:-}" ]] && rm -rf "${mountpoint:?}/$test"
173+
rm -rf "${mountpoint:?}/$test"
174174
echo "$test cleaned up"
175175
# Runtime is not interesting for cleanup
176176
return 120
@@ -224,7 +224,7 @@ run_hammerdb_users()
224224
#
225225
run_hammerdb()
226226
{
227-
((do_run)) || return
227+
((do_run)) || return 120
228228
local uc
229229
for uc in "${usercount[@]}" ; do
230230
run_hammerdb_users "$uc" "$@" || return 1

0 commit comments

Comments
 (0)