Neill's suggested fix so that the simpleCA is explicitly put in /root/.globus instead of /Users/cue/.globus

GRID_CA_DIR=${dot_globus}/simpleCA

----------------------------------------------
From Neill's email on today:
----------------------------------------------
Good call.  I just verified that no matter what user the CA setup
script is run as, we can override where the CA will be installed using
the GRID_CA_DIR environment variable.  I believe the esg-globus script
could be modified as follows if this is the route we'd like to go:

Original:
${globus_location}/setup/globus/setup-simple-ca | tee /tmp/globus_simpleca.log #> output

Modified (untested)
GRID_CA_DIR=${dot_globus}/simpleCA ${globus_location}/setup/globus/setup-simple-ca | tee /tmp/globus_simpleca.log #> output

The only potential issue is the write access/permission.  Can we
guarantee that the user will be able to store the simpleCA in the
dot_globus directory (which is /root/.globus, btw)?

-Neill.
----------------------------------------------

okay then....
Code to migrate/transfer simpleCA installation location appropriately - update on HOWTO
dot_globus set to $HOME/.globus - DONE
mod check_shmmax function - Setting kernel.shmmax value to be a min of 48MB and checking at each startup of postgres and reading from esgf.properties if present and writing new kernel.shmmax value to esgf.properties if needed.
Enforce schema nameing convention with "esgf_" prefix

In order to adhere to esgf schema naming conventions I have set it up
so that esgf schemas may be indicated with or without the "esgf_"
prefix.

Run this to see what I mean:

f=esgf_node_manager
[ "esgf" = "${f%%_*}" ] && echo "name = ${f#*_}" || echo "name = $f (clean)"

f=node_manager
[ "esgf" = "${f%%_*}" ] && echo "name = ${f#*_}" || echo "name = $f (clean)"

Both are accepted now.  The eases the burden on the caller, now no
longer having to remember if the schema argument took the prefix or not.
cosmetic - output more accurate verbiage on schema name
Added Test IDP entry...
cosmetic - removed confusing parenthetical verbiage
Enforcing that for globus HOME = /root - subshelling all calls to esg-globus functions to scope the HOME value to that script only
setup --test-globus directive to directly test globus install. Also sub-shelled globus setup calls
No longer changing permisisons en masse below thredds' content

By resetting the unix user and group attributes recursively below the
thredds content directory I was locking out publishers from having
access to the files they were attempting to publish.

The best thing is to not touch the permission values on that directory
(namely /esg/content/thredds/esgcet [default location] if it is
already there)

-gavin
Adding to previous commit - allowing recasting perms to below thredds content under force

If the installer selects to install thredds under a --force context,
perhaps that also indicates a full reset of the installation and thus
pushing the default installation permissions down the tree.

I made this a separate commit so that it can be easily reverted if
this use case interpretation is undesireable

-gavin
Hard setting of HOME to /root to satisfy new globus installation assertion

It has been asserted that the home for the simpleCA installation must
be in the root user's home directory specifically /root/.globus.  The
globus programs use $HOME to determine where to perform installations.

To accommodate this we are setting the HOME var explicitly to /root.
To aide in the migration of older installs that used $HOME in the same
way, but whose value was set to the home directory of the created
installation user - there is the _mv_simpleca_to_root() function.
This function effectively moves the simpleCA installation from the original
location (if found) to the new location and archives the original.

NOTE this entire script is run from esg-node in a sub-shell.
Because of the screwing around with the $HOME var (unfortunate) we
want to isolate this script from poluting the environment of the
calling environment.  ALWAYS CALL THIS PROGRAM IN A SUBSHELL!!!

See commit: af677c14587e33fb8952b4baa023cb94fcac0e54 -- esg-node

-gavin
small edit to shmmax regex to allow prefixed white space before "kernel.shmmax" token
Along with simpleCA migration be sure to reconfigure mapapp...

When a simpleCA migration is performed it also requires a modification
in the myproxy-certificate-mapapp script used in the generation of
ephemeral myproxy certificates.  The modification points the mapapp
file to the now migrated (moved) simpleCA installation.

A migration is noted by a "boolean" value of 1 (true) given to
"private" variable: _performed_simpleCA_migration.

When this, _performed_simpleCA_migration value, is passed to the
fetch_myproxy_certificate_mapapp function - as true - it forces a
re-fetch of the template and thus a re-edit of the template file to
have the new path to the migrated (moved) simpleCA, now in
/root/.globus

While I was at it I made all the edit and fetch functions take a
"boolean" argument indicated if it should be "forced" or not.

-gavin
Properly showing installed version at end of installation