2 ################################################################################
5 # Description: A script to switch the registry region from one region to
7 # Author: Andrew DeFaria, California Language Labs
8 # Created: Wed Jan 15 16:52:22 PST 1997
9 # Modified: Wed Jan 15 16:52:22 PST 1997 (Andrew DeFaria) defaria@cup.hp.com
10 # Language: Korn Shell
12 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
14 ################################################################################
18 print "Usage: $me: <new ClearCase Region>"
22 if [ $(id -u) -ne 0 ]; then
23 print -u2 "$me: Error: Must be root to execute this command!"
31 new_registry_region="$1"
34 registry_region_file=/usr/adm/atria/rgy/rgy_region.conf
36 if [ -f $registry_region_file ]; then
37 old_registry_region=$(cat $registry_region_file)
38 if [ "$old_registry_region" = "$new_registry_region" ]; then
39 print -u2 "$me: The registry region is already $new_registry_region"
40 print -u2 "$me: Nothing changed!"
43 cp $registry_region_file $registry_region_file.old
44 print $new_registry_region > $registry_region_file
45 print "$me: Switched registry region from $old_registry_region \c"
46 print "to $new_registry_region."
47 print "$me: Saved old registry setting in $registry_region_file.old"