diff --git a/pandora_agents/unix/ChangeLog b/pandora_agents/unix/ChangeLog index 28414141d0..527fa37fd0 100644 --- a/pandora_agents/unix/ChangeLog +++ b/pandora_agents/unix/ChangeLog @@ -1,3 +1,7 @@ +2010-11-22 Ramon Novoa + + * pandora_agent_daemon: Solaris specific fixes. + 2010-11-22 Ramon Novoa * Linux/pandora_agent.conf: Set root as the default pandora_user. diff --git a/pandora_agents/unix/pandora_agent_daemon b/pandora_agents/unix/pandora_agent_daemon index 70b01c9b06..9a1045cdd4 100755 --- a/pandora_agents/unix/pandora_agent_daemon +++ b/pandora_agents/unix/pandora_agent_daemon @@ -37,6 +37,7 @@ pidof_pandora () { if [ "$OS_NAME" = "SunOS" ] then ZONENAME_CMD="/bin/zonename" + TRUNCATED_DAEMON=`echo "$DAEMON $PANDORA_PATH" | cut -c1-40` if [ -x $ZONENAME_CMD ] then ZONE=`$ZONENAME_CMD` @@ -45,9 +46,9 @@ pidof_pandora () { fi if [ "$ZONE" = "global" ] then - PANDORA_PID=`ps -f -z global | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'` + PANDORA_PID=`ps -f -z global | grep "$TRUNCATED_DAEMON" | grep -v grep | head -1 | awk '{ print $2 }'` else - PANDORA_PID=`ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'` + PANDORA_PID=`ps -Af | grep "$TRUNCATED_DAEMON" | grep -v grep | head -1 | awk '{ print $2 }'` fi else PANDORA_PID=`ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'` @@ -72,7 +73,7 @@ case "$1" in echo "Cannot launch again. Aborting." exit 1 fi - nohup $DAEMON $PANDORA_PATH 2> $LOGFILE & + PATH=$PATH nohup $DAEMON $PANDORA_PATH 2> $LOGFILE & rm nohup.out 2> /dev/null sleep 2 PANDORA_PID=`pidof_pandora`