#!/bin/ksh # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # # # Licensed Materials - Property of IBM # # (C) COPYRIGHT International Business Machines Corp. 2000,2019 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # # sccsid = "@(#)13 1.5 src/rsct/cfg_access/scaffold/ct_refresh_node.sh, cfg.access, rsct_rady, rady2035a 11/12/15 16:43:58" # # Temporary command file to enable RSCT HA subsystems # with the manually edited 'subsys.conf' and 'topology.conf' # # Usage: ct_refresh_node topology.conf [subsys.conf] # PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin RSCTBIN=/opt/rsct/bin CTROOT=/var/ct # basecmd=$(basename $0) # function usage { cmdline="${basecmd} topology.conf [subsys.conf]" print -u2 "Usage: $cmdline" } # # if [[ -z $1 ]]; then usage exit 1; fi TOPOLOGYCONF=$1 SUBSYSCONF=$2 CLSTNAME=$(${RSCTBIN}/ct_clusterinfo -c) if [[ -z $CLSTNAME ]]; then print -u2 "Cluster name not found" usage exit 1; fi if [[ ! -a $TOPOLOGYCONF ]]; then print -u "File $TOPOLOGYCONF not found" usage exit 1; fi CLSTDIR=/var/ct/${CLSTNAME} if [[ ! -d ${CLSTDIR}/cfg ]]; then mkdir -p ${CLSTDIR}/cfg fi # copy SUBSYSCONF to /var/ct//cfg/subsys.conf if [[ -a $SUBSYSCONF ]]; then cp -f $SUBSYSCONF ${CLSTDIR}/cfg/subsys.conf fi # also copy topology.conf to /var/ct//cfg/topology.conf cp -f $TOPOLOGYCONF ${CLSTDIR}/cfg/topology.conf exec $RSCTBIN/cthactrl -r exit 1