# cat /oracle/oraInventory/orainstRoot.sh
#!/bin/sh
AWK=/bin/awk
CHMOD=/bin/chmod
CHGRP=/bin/chgrp
CP=/bin/cp
ECHO=/bin/echo
MKDIR=/bin/mkdir
RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}'`
if [ ${RUID} != "root" ];then
$ECHO "This script must be executed as root"
exit 1
fi
if [ -d "/etc" ]; then
$CHMOD 755 /etc;
else
$MKDIR -p /etc;
fi
if [ -f "/oracle/oraInventory/oraInst.loc" ]; then
$CP /oracle/oraInventory/oraInst.loc /etc/oraInst.loc;
$CHMOD 644 /etc/oraInst.loc
else
INVPTR=/etc/oraInst.loc
INVLOC=/oracle/oraInventory
GRP=oinstall
PTRDIR="`dirname $INVPTR`";
# Create the software inventory location pointer file
if [ ! -d "$PTRDIR" ]; then
$MKDIR -p $PTRDIR;
fi
$ECHO "Creating the Oracle inventory pointer file ($INVPTR)";
$ECHO inventory_loc=$INVLOC > $INVPTR
$ECHO inst_group
Oracle安装需要脚本orainstRoot.sh
最新推荐文章于 2021-04-06 05:46:51 发布