From d7011e64bbcffde74cff20ee27fc4e470cf70850 Mon Sep 17 00:00:00 2001 From: jjhua Date: Sun, 1 Apr 2012 06:36:03 +0000 Subject: [PATCH] fixed the point 2 of defect 3513208, when run genimage with mlnxofed_ib_install twice for sles11sp1, the genimage will fail. A special case for sles11sp1 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12086 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../xcat/ib/scripts/Mellanox/mlnxofed_ib_install | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install index 9542bb6cf..963522dcd 100755 --- a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install +++ b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install @@ -53,13 +53,22 @@ if [ $OS != "AIX" ]; then if [ $NODESETSTATE == "genimage" ]; then # Being called from .postinstall script # Assume we are on the same machine - #if [[ $OS = sles* ]] || [[ $OS = suse* ]] || [[ -f /etc/SuSE-release ]]; then - # For SLES, assume zypper is available on the system running genimage + if [[ $OS = sles* ]] || [[ $OS = suse* ]] || [[ -f /etc/SuSE-release ]]; then + mkdir $installroot/tmp/ofed_install + cp -r $OFED_DIR $installroot/tmp/ofed_install/ + mount -t devtmpfs /dev $installroot/dev/ + mount -t sysfs /dev $installroot/sys + #chroot $installroot rpm -e --noscripts --allmatches mlnx-ofa_kernel-kmp-default + chroot $installroot perl -x /tmp/ofed_install/ofed/mlnxofedinstall --without-32bit --force + rm -rf $installroot/tmp/ofed_install + umount $installroot/dev/ + umount $installroot/sys + else mkdir $installroot/tmp/ofed_install cp -r $OFED_DIR $installroot/tmp/ofed_install/ chroot $installroot perl -x /tmp/ofed_install/ofed/mlnxofedinstall --without-32bit --force rm -rf $installroot/tmp/ofed_install - #fi + fi fi fi