#!/bin/sh # Program: test_registry # Purpose: To test/report the value in the db.registry file # Author: Adam Backman # Date: 10/05/98 # # Function: display_registry display_registry() { clear echo "" echo "" echo "You are logged in as ------------------->: "$WHOAMI echo "You are on host------------------------->: "$HOSTNAME echo "PROGRESS is installed in---------------->: "$DLC echo "You are using this promsgs file--------->: "$PROMSGS echo "You are using this protermcap file------>: "$PROTERMCAP echo "You are using this configuration file--->: "$PROCFG echo "" echo "Database Name--------------------------->: "$DB echo "Database Host--------------------------->: "$HOST echo "Database directory---------------------->: "$DB_DIR echo "Where the AI file get backedup locally-->: "$BKAIDIR echo "The host where the swai backup db lives->: "$BKUPNODE echo "The remote AI file directory------------>: "$RMTAIDIR echo "Remote database directory--------------->: "$RMTDBDIR echo "Local database backup directory--------->: "$BKDBDIR echo "Number of APWs for the database--------->: "$APWS if [ x$1 = "xwait" ] then echo "" echo "" echo "" echo "Press return for next database \c" read x fi } SCRIPTS=${SCRIPTS-/u3/users/adamb/scripts} HOSTNAME=`hostname` export SCRIPTS HOSTNAME case $1 in all|ALL|All) for i in `grep $HOSTNAME $SCRIPTS/live/db.registry | cut -s -f 1 -d "|"` do if [ $i != "#DB" ] then . $SCRIPTS/live/read_registry $i if [ $? = "0" ] then display_registry wait fi fi done ;; *) . $SCRIPTS/live/read_registry $1 case $? in 2) echo "Database $1 is not in database registry" exit 1 ;; 3) echo "Database $1 is on $HOST not on this host" exit 1 ;; esac display_registry ;; esac