it.
#
if [ -f $ORACLE_HOME/install/oratab -a $NEW = "true" ]
then
$CAT $ORACLE_HOME/install/oratab >> $ORATAB
fi
$ECHO "Finished running generic part of root script."
$ECHO "Now product-specific root actions will be performed."
第三个脚本
[oracle@rh64 ~]$ cat /u01/app/db11g/product/11.2.0/dbhome_1/install/unix/rootadd.sh
#!/bin/sh
#!/usr/bin/sh
ORACLE_HOME=/u01/app/db11g/product/11.2.0/dbhome_1
. $ORACLE_HOME/install/utl/rootmacro.sh
# the following commands need to run as root after installing
# the OEM Daemon
AWK=/usr/bin/awk
CAT=/usr/bin/cat
CHOWN="/usr/bin/chown"
CHMOD="/usr/bin/chmod"
CHMODR="/usr/bin/chmod -R"
CP=/usr/bin/cp
ECHO=/usr/bin/echo
MKDIR=/usr/bin/mkdir
TEE=/usr/bin/tee
RM=/bin/rm
MV=/bin/mv
GREP=/usr/bin/grep
CUT=/bin/cut
SED=/usr/bin/sed
PLATFORM=`uname`
if [ ${PLATFORM} = "Linux" ] ; then
CAT=/bin/cat
CHOWN=/bin/chown
CHMOD=/bin/chmod
CHMODR="/bin/chmod -R"
CP=/bin/cp
ECHO=/bin/echo
MKDIR=/bin/mkdir
GREP=/bin/grep
if [ ! -f $CUT ] ; then
CUT=/usr/bin/cut
fi
SED=/bin/sed
fi
if [ ${PLATFORM} = "SunOS" ] ; then
GREP=/usr/xpg4/bin/grep
fi
if [ ${PLATFORM} = "Darwin" ] ; then
CAT=/bin/cat
CHOWN="/usr/sbin/chown"
CHMOD="/bin/chmod"
CHMODR="/bin/chmod -R"
CP=/bin/cp
ECHO=/bin/echo
MKDIR=/bin/mkdir
CUT=/usr/bin/cut
fi
# change owner and permissions of the remote operations executible
if [ -f ${ORACLE_HOME}/bin/nmo.0 ];
then
$RM -f ${ORACLE_HOME}/bin/nmo
$CP -p ${ORACLE_HOME}/bin/nmo.0 ${ORACLE_HOME}/bin/nmo
fi
$CHOWN root $ORACLE_HOME/bin/nmo
$CHMOD 4710 $ORACLE_HOME/bin/nmo
# change owner and permissions of the program that does memory computations
if [ -f ${ORACLE_HOME}/bin/nmb.0 ];
then
$RM -f ${ORACLE_HOME}/bin/nmb
$CP -p ${ORACLE_HOME}/bin/nmb.0 ${ORACLE_HOME}/bin/nmb
fi
$CHOWN root $ORACLE_HOME/bin/nmb
$CHMOD 4710 $ORACLE_HOME/bin/nmb
# change owner and permissions of the storage metrics executible
if [ -f ${ORACLE_HOME}/bin/nmhs.0 ];
then
$RM -f ${ORACLE_HOME}/bin/nmhs
$CP -p ${ORACLE_HOME}/bin/nmhs.0 ${ORACLE_HOME}/bin/nmhs
fi
$CHOWN root $ORACLE_HOME/bin/nmhs
$CHMOD 4710 $ORACLE_HOME/bin/nmhs
#change permissions on emdctl and emagent
$CHMOD 700 $ORACLE_HOME/bin/emagent
$CHMOD 700 $ORACLE_HOME/bin/emdctl
# change permissions so they are accessible by users from groups
# other than the agent user group.
$CHMOD 755 $ORACLE_HOME/bin
$CHMODR a+rX $ORACLE_HOME/lib
$CHMODR a+rX $ORACLE_HOME/perl
#$CHMODR a+rX $ORACLE_HOME/sysman/admin/scripts
$CHMODR a+rX $ORACLE_HOME/jdk
$CHMOD 755 $ORACLE_HOME/bin/nmocat
#
# Following changes to system executables are needed for getting
# host inventory metrics on HP-UX
#
if [ ${PLATFORM} = "HP-UX" ] ; then
$CHMOD 555 /usr/sbin/swapinfo
#$CHMOD +r /dev/rdsk/*
fi
$ECHO "Finished product-specific root actions."| $TEE -a $LOG
[oracle@rh64 ~]$
第四个脚本:
[oracle@rh64 ~]$ cat /u01/app/db11g/product/11.2.0/dbhome_1/network/install/sqlnet/setowner.sh
#!/bin/sh
ORACLE_HOME=/u01/app/db11g/product/11.2.0/dbhome_1
. $ORACLE_HOME/install/utl/rootmacro.sh
:
if [ ! -d /var/tmp/.oracle ]
then
$MKDIR -p /var/tmp/.oracle;
fi
$CHMOD 01777 /var/tmp/.oracle
$CHOWN root /var/tmp/.oracle
if [ ! -d /tmp/.oracle ]
then
$MKDIR -p /tmp/.oracle;
fi
$CHMOD 01777 /tmp/.oracle
$CHOWN root /tmp/.oracle
------->>>这个地方要注意了,这个临时文件的.o |