grouperScriptHooks_prepConfPost is unreachable code

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: 2.5.30, 2.6.0
    • Component/s: container
    • None

      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.

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: