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-13029. when ambari-agent has 'run_as_user' as a comment in ambari-agent.ini, wrong user to run ambari as can be picked up (aonishuk)
Date Tue, 08 Sep 2015 08:36:49 GMT
AMBARI-13029. when ambari-agent has 'run_as_user' as a comment in ambari-agent.ini, wrong user
to run ambari as can be picked up (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 0cbe4da800555d440933cb6eabedd5628c222a0a
Parents: 6176199
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Tue Sep 8 11:36:39 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Tue Sep 8 11:36:39 2015 +0300

----------------------------------------------------------------------
 ambari-agent/etc/init.d/ambari-agent | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0cbe4da8/ambari-agent/etc/init.d/ambari-agent
----------------------------------------------------------------------
diff --git a/ambari-agent/etc/init.d/ambari-agent b/ambari-agent/etc/init.d/ambari-agent
index 01fc45c..b2c3109 100644
--- a/ambari-agent/etc/init.d/ambari-agent
+++ b/ambari-agent/etc/init.d/ambari-agent
@@ -19,7 +19,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-run_as_user=`cat /etc/ambari-agent/conf/ambari-agent.ini | grep run_as_user | tr -d ' ' |
awk -F '=' '{ print $2}'`
+run_as_user=`cat /etc/ambari-agent/conf/ambari-agent.ini | grep run_as_user | tr -d ' ' |
grep -v '^;\|^#' | awk -F '=' '{ print $2}'`
 
 if [ "$EUID" != `id -u $run_as_user` ] ; then
   command_prefx="su - $run_as_user -c"


Mime
View raw message