Hi all, While going through the fast track, I noticed the following output when stopping my local nodes via "dev?/bin/riak stop":
ps: illegal option -- f
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-u]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]
ok
It seems that ps -f is not supported (indeed illegal!) on OS X. The
following change works for me and I believe will work just as well on
Linux.
commit 82c6d30085ef38fcd97abc5e5293f9f4644f3092
Author: Seth Falcon <[email protected]>
Date: Thu Jul 1 20:09:57 2010 -0700
Fix ps command in riak stop for OS X
OS X's ps command does not support -f, might as well
pull out just the fields needed using -o
diff --git a/rel/files/riak b/rel/files/riak
index d425550..a4291fa 100755
--- a/rel/files/riak
+++ b/rel/files/riak
@@ -70,7 +70,7 @@ case "$1" in
stop)
# Wait for the node to completely stop...
- PID=`ps -ef|grep "$RUNNER_BASE_DIR/.*/[b]eam.smp|awk '{print $2}'"`
+ PID=`ps -Ao pid,comm|grep "$RUNNER_BASE_DIR/.*/[b]eam.smp|awk
'{print $1}'"`
$NODETOOL stop
while `kill -0 $PID 2>/dev/null`;
do
+ seth
I've also attempted to attach the patch in case whitespace is
destroyed via email.
--
Seth Falcon | @sfalcon | http://userprimary.net/
0001-Fix-ps-command-in-riak-stop-for-OS-X.patch
Description: Binary data
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
