run_if_edge.sh #3

  • //
  • p4-sdp/
  • dev_rebrand/
  • Server/
  • Unix/
  • p4/
  • common/
  • bin/
  • run_if_edge.sh
  • View
  • Commits
  • Open Download .zip Download (998 B)
#!/usr/bin/env bash
#==============================================================================
# Copyright and license info is available in the LICENSE file included with
# the Server Deployment Package (SDP), and also available online:
# https://workshop.perforce.com/view/p4-sdp/main/LICENSE
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Version ID Block. Relies on +k filetype modifier.
# VersionID='$Id: //p4-sdp/dev_rebrand/Server/Unix/p4/common/bin/run_if_edge.sh#3 $ $Change: 31617 $'

instance=${1:-${SDP_INSTANCE:-UnsetSDPInstance}}
[[ "$instance" == UnsetSDPInstance ]] && \
   { echo "Instance parameter required unless SDP_INSTANCE is defined."; exit 1; }

shift
# shellcheck disable=SC1091
source /p4/common/bin/p4_vars "$instance"
# shellcheck disable=SC1091
source /p4/common/bin/backup_functions.sh
set_vars

if [[ "$EDGESERVER" -eq 1 ]]; then
   exec "$@"
fi
# Change User Description Committed
#3 31617 C. Thomas Tyler Merged work from dev_c2s (development) stream to sibling dev_rebrand (sparsedev) stream.
#2 31615 C. Thomas Tyler First pass at rebranding changes, including:
* Changes to remove 'swarm.' from Workshop URLS, so swarm.workshop -> workshop.
* Changed URL for Copyright.
* Renamed get_helix_binaries.sh -> get_p4_binaries.sh, with associated directory and doc changes.
* Accounted for rename of HAS -> P4AS.
* Changed HMS references to P4MS.
* Replaced "Helix" and "Helix Core" references.
* Renamed variables to reduce tech debt buildup induced by rebranding.
* Changed default mount points:
/hxdepots[-1,N] -> /p4depots[-1,N]
/hxmetadata[1,2] -> /p4db[-1,2]
/hxlogs -> /p4logs

Also made some changes related to rebranding going out with r25.1.
#1 31591 C. Thomas Tyler Populate stream //p4-sdp/dev_rebrand from //p4-sdp/dev.
//p4-sdp/dev/Server/Unix/p4/common/bin/run_if_edge.sh
#1 31397 C. Thomas Tyler Populate -b SDP_Classic_to_Streams -s //guest/perforce_software/sdp/...@31368.
//guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/run_if_edge.sh
#4 31311 C. Thomas Tyler Updated run_if_*.sh scripts:
* Fixed bug in run_if_broker.sh.
* Normalized command line verification.
* Removed 'set -e' from run_if_*.sh scripts to improve reliability.
* Made ShellCheck compliant.

#review-31312
#3 22800 Russell C. Jackson (Rusty) Correct the logic on checking for an edge server.
Removed () from the set_vars call that got in via a cut and paste.
#2 22751 Russell C. Jackson (Rusty) Updated edge_dump with fixes in my branch and updated run_if* scripts in perforce sdp in case review for common crontab is approved.
#1 22687 Russell C. Jackson (Rusty) Updated master to check for edge, and added script for the edge server.