[2/2] ambari git commit: AMBARI-12386. After running as root, ambari-agent won't start or stop as non-root (aonishuk)
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 aonis...@hortonworks.com Authored: Tue Jul 14 19:55:33 2015 +0300 Committer: Andrew Onishuk aonis...@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
[2/2] ambari git commit: AMBARI-12386. After running as root, ambari-agent won't start or stop as non-root (aonishuk)
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/0bd575b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0bd575b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0bd575b8 Branch: refs/heads/branch-2.1 Commit: 0bd575b8ae7d35ef821e547dc30ed9acc19ab920 Parents: 85c6880 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Sat Jul 11 10:21:28 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Sat Jul 11 10:21:28 2015 +0300 -- ambari-agent/conf/unix/ambari-agent | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0bd575b8/ambari-agent/conf/unix/ambari-agent -- diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent index 2d38067..9a57554 100755 --- a/ambari-agent/conf/unix/ambari-agent +++ b/ambari-agent/conf/unix/ambari-agent @@ -56,11 +56,11 @@ if [ $? != 0 ] [ $EUID -ne 0 ] ; then fi change_files_permissions() { - ambari-sudo.sh chown -R $current_user /var/run/ambari-agent - ambari-sudo.sh chown -R $current_user /var/log/ambari-agent - ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/data - ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/cache - ambari-sudo.sh chown $current_user /usr/lib/ambari-agent + ambari-sudo.sh chown -R $current_user /var/run/ambari-agent/ + ambari-sudo.sh chown -R $current_user /var/log/ambari-agent/ + ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/data/ + ambari-sudo.sh chown -R $current_user /var/lib/ambari-agent/cache/ + ambari-sudo.sh chown$current_user /usr/lib/ambari-agent/ } if [ -a /usr/bin/python2.7 ] [ -z $PYTHON ]; then