Repository: nifi
Updated Branches:
  refs/heads/master eded0de15 -> 6938c3db5


NIFI-1817 Respecting when run.as is commented out by ensuring the chosen line 
starts with run.as optionally preceded by whitespace

This closes #383.


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

Branch: refs/heads/master
Commit: 6938c3db54401e46fd7fb5f61321e7683f5a276c
Parents: eded0de
Author: Aldrin Piri <[email protected]>
Authored: Wed Apr 27 11:18:32 2016 -0400
Committer: Aldrin Piri <[email protected]>
Committed: Wed Apr 27 15:22:19 2016 -0400

----------------------------------------------------------------------
 .../nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/6938c3db/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh
index 063065d..353ee13 100755
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh
@@ -164,7 +164,7 @@ run() {
     BOOTSTRAP_CONF="${BOOTSTRAP_CONF_DIR}/bootstrap.conf";
     BOOTSTRAP_LIBS="${NIFI_HOME}/lib/bootstrap/*"
 
-    run_as=$(grep run.as "${BOOTSTRAP_CONF}" | cut -d'=' -f2)
+    run_as=$(grep '^\s*run.as' "${BOOTSTRAP_CONF}" | cut -d'=' -f2)
     # If the run as user is the same as that starting the process, ignore this 
configuration
     if [ "$run_as" = "$(whoami)" ]; then
         unset run_as

Reply via email to