ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] ambari git commit: AMBARI-12386. After running as root, ambari-agent won't start or stop as non-root (aonishuk)
Date Tue, 14 Jul 2015 16:55:43 GMT
AMBARI-12386. After running as root, ambari-agent won't start or stop as non-root (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5b15cbd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5b15cbd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5b15cbd

Branch: refs/heads/branch-2.1
Commit: d5b15cbd8cdc295352250fc93717fdf08c826e79
Parents: 3ff9d52
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Tue Jul 14 19:55:33 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Tue Jul 14 19:55:33 2015 +0300

----------------------------------------------------------------------
 ambari-agent/conf/unix/ambari-agent | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d5b15cbd/ambari-agent/conf/unix/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent
index 9a57554..f665934 100755
--- a/ambari-agent/conf/unix/ambari-agent
+++ b/ambari-agent/conf/unix/ambari-agent
@@ -132,7 +132,7 @@ case "$1" in
           PID=`cat $PIDFILE`
           if ! (ps -p $PID >/dev/null 2>/dev/null); then
             echo "$PIDFILE found with no process. Removing $PID..."
-            rm -f $PIDFILE
+            ambari-sudo.sh rm -f $PIDFILE
           else
             tput bold
             echo "ERROR: $AMBARI_AGENT already running"
@@ -208,7 +208,7 @@ case "$1" in
             $PYTHON $AGENT_SCRIPT stop
           fi
           echo "Removing PID file at $PIDFILE"
-          rm -f $PIDFILE
+          ambari-sudo.sh rm -f $PIDFILE
           tput bold
           echo "$AMBARI_AGENT successfully stopped"
           tput sgr0


Mime
View raw message