AMBARI-13627. Security can not be enabled on cluster with MOTD for "su" (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3bbecab Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3bbecab Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3bbecab Branch: refs/heads/branch-2.1.2 Commit: f3bbecabbea659731cc261bdb8191825b3f2aed6 Parents: 38f6b04 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Fri Oct 30 15:26:08 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Fri Oct 30 15:26:08 2015 +0200 ---------------------------------------------------------------------- .../common-services/STORM/0.9.1.2.1/package/scripts/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f3bbecab/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py index 3210d8a..256d7cd 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py @@ -76,7 +76,7 @@ def service(name, action = 'start'): elif action == "stop": process_dont_exist = format("! ({no_op_test})") - pid = get_user_call_output.get_user_call_output(format("cat {pid_file}"), user=params.storm_user)[1] + pid = get_user_call_output.get_user_call_output(format("! test -f {pid_file} || cat {pid_file}"), user=params.storm_user)[1] Execute(format("{sudo} kill {pid}"), not_if = process_dont_exist)