USAGE for clear_depot_Map_fields.sh v1.1.1:
clear_depot_Map_fields.sh [-i <instance>] [-L <log>] [-v<n>] [-p|-n] [-D]
This script obsoletes the SetDefaultDepotSpecMapField.py trigger.
It does so by following a series of steps. First, it ensures that
the configurable server.depot.root is set correctly, setting it
is not set.
Next, the Triggers table is checked to ensure the call to the
SetDefaultDepotSpecMapField.py is not called; it is deleted from
the Triggers table if found.
Last, it resets the 'Map:' field of depot specs for depot
types where that is appropriate, setting it to the default value of
'<DepotName>/...', so that it honors the server.depot.root
configruable. This is done for depots of these types:
but not these:
If an unknown depot type is encountered, the Map field is reset
as well if it is set.
This script does a preflight check first, reporting any cases
where the starting conditions are not as expected, such as. These
are treated as Warnings:
* Configurable server.depot.root is already set
* SetDefaultDepotSpecMapField.py not found in triggers
* Depot already has Map field set to the default <DepotName>/...
These conditions are treated as Errors, and will abort processing:
* Depot Map field set to something other than the default.
* Configurable server.depot.root is set, but to something other
than what it should be.
-v<n> Set verbosity 1-5 (-v1 = quiet, -v5 = highest).
Specify the path to a log file, or the special value 'off' to disable
logging. By default, all output (stdout and stderr) goes to
NOTE: This script is self-logging. That is, output displayed on the screen
is simultaneously captured in the log file. Do not run this script with
redirection operators like '> log' or '2>&1', and do not use 'tee.'
-p Run preflight checks only, and then stop. By default, actual changes
occur if preflight checks find no issues.
-n No-Op. No actions are taken that would affect data significantly;
instead commands are displayed rather than executed.
-D Set extreme debugging verbosity.
-h Display short help message
-man Display man-style help message
-V Dispay version info for this script and its libraries.
A typical flow for this script is to do a preflight first, and then
a live run, for any given instance:
clear_depot_Map_fields.sh -i 1 -p
clear_depot_Map_fields.sh -i 1
Note that if using '-n', the '-v5' flag should also be used.