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

Solaris apachectl inconsistencies

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • httpd 2.4.29 ER1 Natives
    • httpd 2.4.23 GA, httpd 2.4.23 CR4, httpd 2.4.23 SP1 DR2, httpd 2.4.29 DR5
    • httpd
    • None
    • Documentation (Ref Guide, User Guide, etc.), Release Notes, User Experience
    • Workaround Exists
    • Hide

      One one is modifying apachectl script
      configtest
      option need
      Change

      configtest)
          $HTTPD -t
          ERROR=$?
          ;;
      
      configtest)
          $HTTPD $ROOTDIR -t
          ERROR=$?
          ;;
      

      or call -t to httpd binary, you need to specify installation via -d or -f

      Show
      One one is modifying apachectl script configtest option need Change configtest) $HTTPD -t ERROR=$? ;; configtest) $HTTPD $ROOTDIR -t ERROR=$? ;; or call -t to httpd binary, you need to specify installation via -d or -f

      There are few differences in Rhel and Solaris apachectl

      Specifying installation
      Rhel

      OPTIONS="-f /opt/jbcs-httpd24-2.4/httpd/conf/httpd.conf -E /opt/jbcs-httpd24-2.4/httpd/logs/httpd.log"
      $HTTPD $OPTIONS -k $ARGV
      

      Solaris

      ROOTDIR="-d /opt/jbcs2/jbcs-httpd24-2.4/etc/httpd"
      $HTTPD $ROOTDIR $OPTIONS -k $ARGV
      

      If one use apachectl as specified in apache documentation (./apachectl start/stop/restart/...) then he have no real problem, just curiosity

      ConfigTest

      configtest)
          testconfig
      ;;
      function testconfig() {
      # httpd is denied terminal access in SELinux, so run in the
      # current context to get stdout from $HTTPD -t.
      if test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled; then
        runcon -- `id -Z` $HTTPD $OPTIONS -t
      else
        $HTTPD $OPTIONS -t
      fi
      ERROR=$?
      }
      

      Solaris

      configtest)
          $HTTPD -t
          ERROR=$?
          ;;
      

      Issue If httpd is installed in non standard location ( != /opt) then config test will not work or will start at another installation (located in /opt)
      Rhel use $OPTIONS to specifying installation

      Other option
      Rhel

      *)
          $HTTPD $OPTIONS "$@"
          ERROR=$?
      

      Solaris

      *)
          $HTTPD "$@"
          ERROR=$?
      
      ./apachectl -V
      

      Will fail on solaris as one must specify location (-d, -f), Rhel works fine

      Rhel use $OPTION to specify installation location when starting with old (-k start), but solaris don't do it... Documentation isn't very specific about what is right.
      Issue

      ./apachectl -k start -d /opt/yolo
      

      should fail, but it starts as it starts with $OPTIONS that is probably more powerful than -d
      Solaris correctly fails

              huwang@redhat.com Hui Wang (Inactive)
              bsikora Bogdan Sikora (Inactive)
              Marek Czernek Marek Czernek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: