mirror of https://github.com/apache/nifi.git
NIFI-154 contributed via JIRA by Jake Visser jake at nightrise dot com dot au
This commit is contained in:
parent
51d177b242
commit
2735c6c253
|
@ -50,6 +50,11 @@ if [ "x$JAVA_MAX_PERMSIZE" = "x" ]; then
|
||||||
export JAVA_MAX_PERMSIZE
|
export JAVA_MAX_PERMSIZE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
#Readlink is not available on all systems. Change variable to appropriate alternative as part of OS detection
|
||||||
|
#
|
||||||
|
|
||||||
|
READLINK="readlink"
|
||||||
|
|
||||||
warn() {
|
warn() {
|
||||||
echo "${PROGNAME}: $*"
|
echo "${PROGNAME}: $*"
|
||||||
|
@ -65,6 +70,7 @@ detectOS() {
|
||||||
cygwin=false;
|
cygwin=false;
|
||||||
aix=false;
|
aix=false;
|
||||||
os400=false;
|
os400=false;
|
||||||
|
darwin=false;
|
||||||
case "`uname`" in
|
case "`uname`" in
|
||||||
CYGWIN*)
|
CYGWIN*)
|
||||||
cygwin=true
|
cygwin=true
|
||||||
|
@ -75,12 +81,18 @@ detectOS() {
|
||||||
OS400*)
|
OS400*)
|
||||||
os400=true
|
os400=true
|
||||||
;;
|
;;
|
||||||
|
Darwin)
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
# For AIX, set an environment variable
|
# For AIX, set an environment variable
|
||||||
if $aix; then
|
if $aix; then
|
||||||
export LDR_CNTRL=MAXDATA=0xB0000000@DSA
|
export LDR_CNTRL=MAXDATA=0xB0000000@DSA
|
||||||
echo $LDR_CNTRL
|
echo $LDR_CNTRL
|
||||||
fi
|
fi
|
||||||
|
if $darwin; then
|
||||||
|
READLINK="greadlink"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
unlimitFD() {
|
unlimitFD() {
|
||||||
|
@ -118,8 +130,8 @@ locateHome() {
|
||||||
|
|
||||||
# In POSIX shells, CDPATH may cause cd to write to stdout
|
# In POSIX shells, CDPATH may cause cd to write to stdout
|
||||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||||
NIFI_HOME=$(dirname $(readlink -f $0))/../
|
NIFI_HOME=$(dirname $($READLINK -f $0))/../
|
||||||
NIFI_HOME=$(readlink -f $NIFI_HOME)
|
NIFI_HOME=$($READLINK -f $NIFI_HOME)
|
||||||
cd $NIFI_HOME
|
cd $NIFI_HOME
|
||||||
echo "Directory changed to NIFI_HOME of '$NIFI_HOME'"
|
echo "Directory changed to NIFI_HOME of '$NIFI_HOME'"
|
||||||
if [ ! -d "$NIFI_HOME" ]; then
|
if [ ! -d "$NIFI_HOME" ]; then
|
||||||
|
|
Loading…
Reference in New Issue