Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-1715

NiFi install script does not support SUSE for service definitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • SLES11 SP4

    Description

      Issue 1: 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!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aksingh Arun Singh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: