Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-4557

grouperScriptHooks_prepConfPost is unreachable code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 2.5.30, 2.6.0
    • container
    • None

    Description

      prep_conf() {
          ...    
          # if we are stopping and starting, we just read the env vars and we done
          if [ -f /opt/grouper/grouperEnv.sh ]
            then
              echo "grouperContainer; INFO: (libraryPrep.sh-prep_conf) Loading env vars from /opt/grouper/grouperEnv.sh"
              . /opt/grouper/grouperEnv.sh
              return
          fi
          
          prep_initDeprecatedEnvVars
          grouperScriptHooks_prepConfPost
       
      }
      

      Note that if /opt/grouper/grouperEnv.sh exists, the function returns early. However, even in the base image the file exists with zero bytes. Thus, grouperScriptHooks_prepConfPost is never called.

      The next opportunity to call a hook is setupFilesPost, which happens after file manipulation. So there is no way to add any hooks for setup that setupFiles can act on.

      The other opportunity to call a hook before Grouper does file configuration is prepComponentPost. The setupFilesPost hook happens after Grouper file manipulation.

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chad.redman.3@at.internet2.edu Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: