Uploaded image for project: 'JBoss Core Services'
  1. JBoss Core Services
  2. JBCS-1640

.postinstall duplicates modifications to apachectl for each run

    XMLWordPrintable

Details

    • False
    • None
    • False

    Description

      If .postinstall is run more than once, then this block duplicates its modifications to apachectl:

      cat >.tmppostinstallfile <<EOF
      # the options for httpd command
      OPTIONS="-f $HTTPD_HOME/conf/httpd.conf -E $HTTPD_HOME/logs/httpd.log"
      # the library path
      export LD_LIBRARY_PATH="$HTTPD_HOME/lib:\$LD_LIBRARY_PATH"
      #JBCS-239
      export OPENSSL_ENGINES="$HTTPD_HOME/lib/engines-1.1"
      EOF
      sed -i -e "s:HTTPD='./httpd':HTTPD='$HTTPD_HOME/sbin/httpd':g" -e "/HTTPD=/r .tmppostinstallfile" sbin/apachectl
      rm -f .tmppostinstallfile
      #Ensure OPTIONS are passed to httpd command
      sed -i -e 's|\$HTTPD |\$HTTPD \$OPTIONS |g' sbin/apachectl
      

      So then there are multiple lines repeating the same exports:

      # the options for httpd command
      OPTIONS="-f /opt/jbcs-httpd24-2.4.57/httpd/conf/httpd.conf -E /opt/jbcs-httpd24-2.4.57/httpd/logs/httpd.log"
      # the library path
      export LD_LIBRARY_PATH="/opt/jbcs-httpd24-2.4.57/httpd/lib:$LD_LIBRARY_PATH"
      #JBCS-239
      export OPENSSL_ENGINES="/opt/jbcs-httpd24-2.4.57/httpd/lib/engines-1.1"
      # the options for httpd command
      OPTIONS="-f /opt/jbcs-httpd24-2.4.57/httpd/conf/httpd.conf -E /opt/jbcs-httpd24-2.4.57/httpd/logs/httpd.log"
      # the library path
      export LD_LIBRARY_PATH="/opt/jbcs-httpd24-2.4.57/httpd/lib:$LD_LIBRARY_PATH"
      #JBCS-239
      export OPENSSL_ENGINES="/opt/jbcs-httpd24-2.4.57/httpd/lib/engines-1.1"
      

      And worse, options are applied multiple times to the process:

      start|stop|restart|graceful|graceful-stop)
          $HTTPD $OPTIONS $OPTIONS -k $ARGV
      

      Attachments

        Activity

          People

            dsoumis Dimitris Soumis
            rhn-support-aogburn Aaron Ogburn
            Santiago Gala Santiago Gala
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: