Skip to content

Commit d667ac5

Browse files
committed
src/pmlogctl/pmlogctl.sh: fix variable renaming fallout
qa/1215 was failing because $host is no longer globally defined to have a value.
1 parent ea173df commit d667ac5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/pmlogctl/pmlogctl.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -777,15 +777,17 @@ _check_started()
777777

778778
# check ${IAM} really stopped
779779
#
780-
# $1 = dir as it appears on the $PCP_TMP_DIR/${IAM} files (so a real path,
780+
# $1 = host
781+
# $2 = dir as it appears on the $PCP_TMP_DIR/${IAM} files (so a real path,
781782
# not a possibly symbolic path from a control file)
782-
# $2 = args from control file
783+
# $3 = args from control file
783784
#
784785
_check_stopped()
785786
{
786787
$SHOWME && return 0
787-
dir="$1"
788-
args="$2"
788+
host="$1"
789+
dir="$2"
790+
args="$3"
789791
max=50 # 1/10 of a second, so 5 secs max
790792
i=0
791793
$VERY_VERBOSE && $PCP_ECHO_PROG >&2 $PCP_ECHO_N "Stopped? ""$PCP_ECHO_C"
@@ -1849,7 +1851,7 @@ _do_stop()
18491851
#
18501852
$VERBOSE && echo >&2 "Found PID $__pid to stop using signal ${PCPQA_KILL_SIGNAL-TERM}"
18511853
$KILL ${PCPQA_KILL_SIGNAL-TERM} $__pid
1852-
if _check_stopped "$__args_dir" "$__args"
1854+
if _check_stopped "$__host" "$__args_dir" "$__args"
18531855
then
18541856
:
18551857
elif [ -z "$PCPQA_KILL_SIGNAL" ]
@@ -1858,7 +1860,7 @@ _do_stop()
18581860
#
18591861
$VERBOSE && echo >&2 "That didn't work, try using signal KILL"
18601862
$KILL KILL $__pid
1861-
if _check_stopped "$__args_dir" "$__args"
1863+
if _check_stopped "$__host" "$__args_dir" "$__args"
18621864
then
18631865
:
18641866
else

0 commit comments

Comments
 (0)