p3006854_9204_LINUX 补丁:

本文介绍了p3006854_9204_LINUX补丁,该补丁用于修复RHEL3.0系统中Oracle Universal Installer的互操作性问题。详细说明了安装步骤,包括解压文件、以root用户登录、设置目录和运行脚本等,还给出了脚本代码及相关检查逻辑。

p3006854_9204_LINUX 补丁:
包含两个文件
README
--------------------------------------------------------------------------
#-------------------------------------------------------------------------
#  Patch for Bug 3006854
#-------------------------------------------------------------------------
#
#  DATE:  October 22, 2003
#  -----------------------
#  Platform Patch for : LINUX Intel
#
#  Bugs Fixed by this patch:
#  -------------------------
#  3006854, INSTALLER INTEROPERABILITY PATCH FOR RHEL3.0
#
#  This patch must be installed on systems running Red Hat Enterprise Linux 3.0
#  before running the Oracle Universal Installer (for any Oracle product).
#
#  This patch is not specific to a particular Oracle version.
#
#  Patch Installation Instructions:
#  --------------------------------
#  [1] To apply the patch, unzip the PSE container file:
#        % unzip p3006854_9204_LINUX.zip
#
#  [2] Login as the root user,
#
#  [3] Set your current directory to the directory where the patch
#      is located, eg:
#
#        # cd 3006854
#
#  [4] Run the script supplied by this patch
#
#        # sh rhel3_pre_install.sh
#
#  The installation of the patch is now complete. You can now run
#  the Oracle Universal Installer as normal.
#

-----------------------------------------------------------------------------------------------------
rhel3_pre_install.sh
-----------------------------------------------------------------------------------------------------
#!/bin/bash

USER=`whoami`
if [ $USER != root ]; then
  echo "Must be root to run this script, please login as root and re-try"
  exit
fi

# see if libcwait.so is already being loaded
if [ -f "/etc/ld.so.preload" ] && [ -n "`grep libcwait /etc/ld.so.preload`" ]; then
  echo "Patch has already been applied"
  exit
else
  echo "Applying patch..."
fi

cat << EOF |
#include <errno.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
pid_t
__libc_wait (int *status)
{
  int res;
  asm volatile ("pushl %%ebx/n/t"
                "movl %2, %%ebx/n/t"
                "movl %1, %%eax/n/t"
                "int /$0x80/n/t"
                "popl %%ebx"
                : "=a" (res)
                : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0), "S" (0));
  return res;
}
EOF
gcc -O2 -shared -fpic -xc - -o /etc/libcwait.so
echo "/etc/libcwait.so" >>/etc/ld.so.preload

echo "Patch successfully applied"

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值