nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon DeVries (JIRA)" <>
Subject [jira] [Commented] (NIFI-1786) Use "Unofficial Bash Strict Mode" in nifi,sh
Date Tue, 19 Apr 2016 19:26:25 GMT


Brandon DeVries commented on NIFI-1786:

So, realizing that what happened there was that strict mode was causing the check in the script
for the existence of $MAX_FD to fail.  However, it does not appear to be being done in the
best way.  Some guy named Greg on the internet says the way it is being done now is "Only
needed for ancient Bourne shells and not so ancient pdksh or ash versions. Don't use this
in modern scripts." \[1\].  Consulting StackOverflow \[2\] \[3\] gives us another option that
is compatible with set -u:

if [ -n "${foobar+1}" ]; then
  echo "foobar is defined"
  echo "foobar is not defined"


> Use "Unofficial Bash Strict Mode" in nifi,sh
> --------------------------------------------
>                 Key: NIFI-1786
>                 URL:
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Brandon DeVries
>            Priority: Minor
> We just had a user trying to do " start" on a new install get the cryptic error
> {code}
>  does not exist.  Exiting.
> {code}
> enabling "Unofficial Bash Strict Mode"\[1\] by adding 
> {code}
> set -euo pipefail
> {code}
> to the top of the script revealed that the problem was that $MAX_FD was unset.  While
we're still working through why that would be, its at least a bit more to go on.
> \[1\]

This message was sent by Atlassian JIRA

View raw message