#!/bin/sh
# The environment variable $SRCHOME cannot be set during the installation
unset SRCHOME
# The environment variable $LD_LIBRARY_PATH should be cleared initially
unset LD_LIBRARY_PATH
AWK=/bin/awk
SED=/bin/sed
UNAME=/bin/uname
GETCONF=/usr/bin/getconf
PSE='/bin/ps -e'
ISAINFO='/usr/bin/isainfo -k'
SUCCESS=0
ERROR=1
NULL='/dev/null'
ECHO=echo
GREP=grep
_bootClassPath=""
BUNDLE=db
CMDDIR=`dirname $0`
if [ "$CMDDIR" = "." ]; then
CMDDIR=`pwd`;
fi
# Replace relative path with fully qualified path.
if [ ! "`echo $CMDDIR|grep '^/'`" ]; then
CMDDIR=`pwd`/$CMDDIR;
fi
#
# Check if SunCluster is running
#
isSunClusterRunning()
{
if `$PSE -u 0 | $GREP 'ucm[m]d' 1>$NULL 2>$NULL`
then
$ECHO $SUCCESS
else
$ECHO $ERROR
fi
}
#
# Prompt for rootpre.sh For AIX
#
rootpreForAIX()
{
if [ "$BUNDLE" = "crs" -o "$BUNDLE" = "db" ]; then
# For AIX, we require rootpre.sh be run before installation
# The environment variable $SKIP_ROOTPRE is not set!.
if [ ! "$SKIP_ROOTPRE" ]; then
echo "******************************************************************************* *"
echo ""
echo "Your platform requires the root user to perform certain pre-installation"
echo "OS preparation. The root user should run the shell script 'rootpre.sh' before"
echo "you proceed with Oracle installation. rootpre.sh can be found at the top level "
echo "of the CD or the stage area."
echo ""
echo "Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle "
echo "installation."
echo "Answer 'n' to abort installation and then ask root to run 'rootpre.sh'."
echo ""
echo "******************************************************************************* *"
echo ""
echo "Has 'rootpre.sh' been run by root? [y/n] (n)"
read ans
if [ $ans = 'y' -o $ans = "Y" ]; then
echo ""
else
echo "Installation stopped to run 'rootpre.sh' by root."
exit 0
fi
#else SKIP_ROOTPRE set!.
else
if [ "$SKIP_ROOTPRE" = "TRUE" ]; then
echo "SKIP_ROOTPRE environment variable is set, which means "
echo "rootpre.sh was already run as root."
else
echo "SKIP_ROOTPRE not set to true."
exit 0;
fi
fi
fi
}
#
# Prompt for rootpre.sh For Solarisamd64
#
rootpreForSolarisamd64()
{
if [ "$BUNDLE" = "crs" ]; then
# For SOLARISAMD64, we require rootpre.sh for Vendor Cluster be run before installation
# The environment variable $SKIP_ROOTPRE is not set!.
if [ ! "$SKIP_ROOTPRE" ]; then
echo "******************************************************************************* *"
echo ""
echo "Your platform requires the root user to perform certain pre-installation"
echo "OS preparation. The root user should run the shell script 'rootpre.sh' before"
echo "you proceed with Oracle installation. rootpre.sh can be found at the top level "
echo "of the CD or the stage area."
echo ""
echo "Answer 'y' if root has run 'rootpre.sh' so you can proceed with Oracle "
echo "installation."
echo "Answer 'n' to abort installation and then ask root to run 'rootpre.sh'."
echo ""
echo "******************************************************************************* *"
echo ""
echo "Has 'rootpre.sh' been run by root? [y/n] (n)"
read ans
if [ $ans = 'y' -o $ans = "Y" ]; then
echo ""
else
echo "Installation stopped to run 'rootpre.sh' by root."
exit 0
fi
#else SKIP_ROOTPRE set!.
else
if [ "$SKIP_ROOTPRE" = "TRUE" ]; then
echo "SKIP_ROOTPRE environment variable is set, which means "
echo "rootpre.sh was already run as root."
else
echo "SKIP_ROOTPRE not set to true."
exit 0;
fi
fi
fi
}
if [ `$UNAME` = "AIX" ]; then
OSLEVEL=/bin/oslevel
UNAME=/bin/uname
CUT=/bin/cut
_bootClassPath="-J-Xbootclasspath/a:$CMDDIR/stage/ext/jlib/emocmutl.jar"
if [ "ORCL$IGNOREOSLEVEL" = "ORCL" ]; then
MAIN_VERSION=`$OSLEVEL -r | $CUT -d"-" -f1`;
MinorVersion1=`$OSLEVEL -r | $CUT -d"-" -f2`;
if [ $MAIN_VERSION -lt "5300" ]; then
echo "\nrunInstaller needs minimum oslevel : "5300-05-06"\n";
exit 0;
fi
if [ $MAIN_VERSION -eq "5300" ]; then
if [ MinorVersion1 -lt "05" ]; then
echo "\nrunInstaller needs minimum oslevel : "5300-05-06"\n";
exit 0;
else
if [ $MinorVersion1 -eq "05" ]; then
MinorVersion2=`$OSLEVEL -s | $CUT -d"-" -f3`;
if [ $MinorVersion2 != "CSP" ]; then
if [ $MinorVersion2 -lt "06" ]; then
echo "\nrunInstaller needs minimum oslevel : "5300-05- 06"\n";
exit 0;
fi
fi
fi
fi
fi
fi
rootpreForAIX
fi
if [ `$UNAME` = "SunOS" ];then
if [ `$ISAINFO` = "amd64" -a `isSunClusterRunning` = "${SUCCESS}" ];then
rootpreForSolarisamd64
fi
fi
case `$UNAME` in
SunOS | HP-UX)
OCR_LOC=/var/opt/oracle/ocr.loc
;;
*)
OCR_LOC=/etc/oracle/ocr.loc
;;
esac
LOCALONLY=local_only
LOCAL=TRUE
SILENT=FALSE
if [ x${PATH} != x ]; then
PATH=/usr/bin:/usr/ccs/bin:$PATH:$CMDDIR/install
export PATH
else
PATH=/usr/bin:/usr/ccs/bin:$CMDDIR/install
export PATH
fi
# Determine whether there is an existing CRS or not.
# Local is value of local_only in ocr.loc.
# False means there is an existing CRS installation on the system.
if [ -r $OCR_LOC ]; then
LOCAL=`$AWK -F= /$LOCALONLY/'{print $2}' $OCR_LOC |\
$SED 'y/aeflrstu/AEFLRSTU/'`
fi
case "$BUNDLE" in
db)
# One-click: only if there is no cmd line argument and it's not on CRS node
if [ $# -gt 0 -o "$LOCAL" = "FALSE" -o \
! -r $CMDDIR/install/oneclick.properties ]; then
$CMDDIR/install/.oui $* $_bootClassPath
else
$CMDDIR/install/.oui $_bootClassPath
fi
;;
client)
$CMDDIR/install/.oui $* CLUSTER_NODES={}
;;
crs)
$CMDDIR/install/.oui $* -formCluster
;;
dv)
$CMDDIR/install/.oui $*
;;
*)
$CMDDIR/install/.oui $*
;;
esac
$
Moderator's Comments:
Please use CODE tags when posting CODE.
Last edited by Don Cragun; 04-14-2014 at 02:46 PM..
Reason: Add CODE tags.
I downloaded and installed "Cygwin yesterday onto my PC running Windows XP. When I tried to type "vi" in Cygwin's window, I got the following message bash: vi: Command not found
What shud i do inorder to get into vi editor
Thanks (10 Replies)
# check host value regex='^(||1|2|25)(\.(||1|2|25)){3}$' if ')" != "" ]; then if ]; then echo host $host not found exit 4 fi elif ]; then echo $host is an invalid host address exit 5 fi
espeacailly the top regex part?
---------- Post updated at 06:58 PM ---------- Previous update was... (1 Reply)
Hi
I'm new to scripting - please help me...
I'm trying to run a script written by a friend:
#!/bin/bash
for aStat in ....
do
....
done
when coping the script to the terminal I get:
/bin/bash: Event not found.
for: Command not found. (7 Replies)
I'm facing issues in executing the bash script of mine. This script will pick the latest file received and connects SFTP server and files is placed on this remote server.
Error message
Enter password:
"File movement"
sftp> cd Test
sftp> put Test_File_201309.txt
File "Test_File_201309.txt"... (6 Replies)
That's what appears at the beginning of my bash history (when you type "open .bash_history" in terminal)
sudo -k
export PS1="";sudo echo AUTHENTICATED;echo RETRY
exit
export PS1=""
sudo echo AUTHENTICATED ; sudo -k ; echo AUTHENTIKILL ; echo PROCESSEDAUTHENTICATION
sudo ls;sudo -k;exit;echo... (1 Reply)
In the bash below, if the answer is "y" then goto function remove. If the answer is "n" then goto the id variable line (where the date is inputted). However, I am getting command remove not found, but remove is a function not an command. I must have the syntax incorrect? Thank you :).
... (3 Replies)
Hello Experts,
I have been trying to send a test mail in our linux server with sendmail command.But I am getting command not found error message.
-->when I tried whether sendmail installed or not with the command
rpm -qa sendmail* I got the below,
sendmail-cf-8.14.4-8.el6.noarch... (26 Replies)
Using AudioScope.sh on Ubuntu 17.04 from a live DVD disc I came across an error.
Consider the code below it is a MUCH shortened version of the KEYBOARD input in AudioScope.
#!/bin/bash
bash --version
uname -a
status=0
KEYBOARD()
{
read -r -p "Enter QUIT or EXIT to quit:- " kbinput
if ||... (11 Replies)
Hello,
I have a question regarding while loop and existence of files.
I am running under ubuntu 18.04 bionic, have around fifty video files inside the directory.
script:
for file in *.mp4
do
/root/bin/ffmpeg -i $file \
-i $(basename "${file/.mp4}").bs.srt \
-i $(basename... (12 Replies)