[ 
https://issues.apache.org/jira/browse/NIFI-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260312#comment-15260312
 ] 

ASF GitHub Bot commented on NIFI-1817:
--------------------------------------

GitHub user apiri opened a pull request:

    https://github.com/apache/nifi/pull/383

    NIFI-1817 Respecting when run.as is commented out

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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apiri/incubator-nifi NIFI-1817

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/383.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #383
    
----
commit c5d454abdf0bd55283be328fa69f28ad5b4076f7
Author: Aldrin Piri <[email protected]>
Date:   2016-04-27T15:18:32Z

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

----


> nifi.sh doesn't respect comments when setting run_as user
> ---------------------------------------------------------
>
>                 Key: NIFI-1817
>                 URL: https://issues.apache.org/jira/browse/NIFI-1817
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Brandon DeVries
>            Priority: Minor
>
> In nifi.sh\[1\], the run_as user is set using the following line:
> {code}
> run_as=$(grep run.as "${BOOTSTRAP_CONF}" | cut -d'=' -f2)
> {code}
> However, this does not respect a commented out "run.as" line in 
> bootstrap.conf.  To fix, we need to do something like:
> {code}
> run_as=$(grep run.as "${BOOTSTRAP_CONF}" | grep -v '^#' | cut -d'=' -f2)
> {code}
> That will disallow any lines that start with a "#".
> \[1\] 
> https://github.com/apache/nifi/blob/e4b7e47836edf47042973e604005058c28eed23b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh#L167



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to