Arun Singh created HADOOP-12986:
-----------------------------------

             Summary: Hortonworks Data Flow (aka, NiFi)
                 Key: HADOOP-12986
                 URL: https://issues.apache.org/jira/browse/HADOOP-12986
             Project: Hadoop Common
          Issue Type: Bug
         Environment: SLES11 SP4
            Reporter: Arun Singh


Issue 1: Hortonworks Data Flow (aka, NiFi). When running the command 
"bin/nifi.sh install", it will setup the correct service file for you so that 
nifi will start on boot. When you look at the file, especially the "install" 
section: 
 
install() {
    SVC_NAME=nifi
    if [ "x$2" != "x" ] ; then
        SVC_NAME=$2
    fi

    SVC_FILE="/etc/init.d/${SVC_NAME}"
    cp "$0" "${SVC_FILE}"
    sed -i s:NIFI_HOME=.*:NIFI_HOME="${NIFI_HOME}": "${SVC_FILE}"
    sed -i s:PROGNAME=.*:PROGNAME="${SCRIPT_NAME}": "${SVC_FILE}"
    rm -f "/etc/rc2.d/S65${SVC_NAME}"
    ln -s "/etc/init.d/${SVC_NAME}" "/etc/rc2.d/S65${SVC_NAME}"
    rm -f "/etc/rc2.d/K65${SVC_NAME}"
    ln -s "/etc/init.d/${SVC_NAME}" "/etc/rc2.d/K65${SVC_NAME}"
    echo "Service ${SVC_NAME} installed"
}
 
The problem above is that the startup and shutdown files (the "S" and "K" 
files) are created in a directory "/etc/rc2.d", however this directory exists 
only on RHEL. On SUSE this directory is slightly different, /etc/init.d/rc2.d
 
So when attempting to setup the services file (for bootup purposes), the above 
command fails on SUSE. Worse, no error checking is performed and it will 
actually print a successful message! 




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

Reply via email to