Updated Branches: refs/heads/trunk 94c579bad -> 700f82561
AMBARI-3631. traceback when attempting to stop ambari-agent as non-root (Dmytro Shkvyra via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/700f8256 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/700f8256 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/700f8256 Branch: refs/heads/trunk Commit: 700f82561375da08a9e6ca7e71d734e08e62c19e Parents: 94c579b Author: Lisnichenko Dmitro <[email protected]> Authored: Wed Oct 30 20:56:15 2013 +0200 Committer: Lisnichenko Dmitro <[email protected]> Committed: Wed Oct 30 20:56:15 2013 +0200 ---------------------------------------------------------------------- ambari-agent/conf/unix/ambari-agent | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/700f8256/ambari-agent/conf/unix/ambari-agent ---------------------------------------------------------------------- diff --git a/ambari-agent/conf/unix/ambari-agent b/ambari-agent/conf/unix/ambari-agent index 579bac6..f141d18 100644 --- a/ambari-agent/conf/unix/ambari-agent +++ b/ambari-agent/conf/unix/ambari-agent @@ -99,6 +99,11 @@ check_python_version () retcode=0 +if [ "$(id -u)" != "0" ]; then + echo "You can't perform this operation as non-root user. Please, re-login as root user" + exit 0 +fi + case "$1" in start) check_python_version
