The hostname command "one of the most basic of the network administrative utilities" according to linfo.org. I use the command to check whether I am in the TEST or DEV environment to use the FNDLOAD function for copying customizations to the PROD environment. Basically I use a shell script to create the LDT files used for the FNDLOAD to copy paste from TEST to PROD. This ensures no user errors and is much faster using this script. I will go into the FNDLOAD in a future post.
So after playing around and googling I found the solution:#!/bin/sh
#Creating concurrent and XML Pub reports LDT files
APPS_PWD=$1
APPL_NAME=$2
if [ "$APPS_PWD" = "" ]
then
echo "Usage: make_ldt_files.sh
exit
fi;
hostname
if [ `hostname` = "TEST.ORG.COM" ]
then
echo "Downloading concurrent definition..."
FNDLOAD apps/$APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct ./APPL_CONC.ldt PROGRAM APPLICATION_SHORT_NAME=PLSO CONCURRENT_PROGRAM_NAME=$APPL_NAME
echo "Downloading xml data definitions ..."
FNDLOAD apps/$APPS_PWD 0 Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct ./APPL_XML.ldt XDO_DS_DEFINITIONS DATA_SOURCE_CODE=$APPL_NAME APPLICATION_SHORT_NAME=PLSO
echo "Done ..."
else
echo "Not TEST or DEV environment!!!!"
fi;
exit
This now checks that the environment is the TEST environment. If not it will not create the LDT files. This is basically because it happened that the DBS ran this script in PROD without the check and this then creates a LDT of all the customizations for the Application (APPLICATION_SHORT_NAME).
Comments
Post a Comment