From 5bc53f2fe429683c0b97b707a785b9357cfff605 Mon Sep 17 00:00:00 2001 From: phamt Date: Thu, 19 Aug 2010 01:29:28 +0000 Subject: [PATCH] Fixed error in rc.statelite: /sysroot/etc/init.d/statelite: line 326: [!: command not found git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7133 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../netboot/add-on/statelite/rc.statelite | 2 +- xCAT-server/share/xcat/netboot/sles/genimage | 24 ++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite index 4034f1d67..7ffc270cc 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -323,7 +323,7 @@ ProcessType () { fi done else - if [ ! -d ${PERSISTENT}${PPATH} ] && [! -d `readlink -m ${PERSISTENT}${PPERS}`]; then + if [[ ! -d ${PERSISTENT}${PPATH} && ! -d `readlink -m ${PERSISTENT}${PPERS}` ]]; then # unless the entry is one directory or one link to the directory rm -rf ${PERSISTENT}${PPERS} mkdir -p ${PERSISTENT}${PPERS} diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index 226500e87..405024181 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -203,7 +203,12 @@ foreach (split /,/,$netdriver) { if (/^$/) { next; } - push @ndrivers,$_; + + # Do not include qeth module here + # This module is included later on + if (!($_ =~ m/qeth/i)) { + push @ndrivers, $_; + } } unless (grep /af_packet/,@ndrivers) { unshift(@ndrivers,"af_packet.ko"); @@ -223,7 +228,10 @@ if($mode eq "statelite") { if ($arch eq "s390x") { push @ndrivers, "qdio.ko"; push @ndrivers, "ccwgroup.ko"; - push @ndrivers, "af_packet.ko"; + + # af_packet is already included above + # push @ndrivers, "af_packet.ko"; + push @ndrivers, "qeth.ko"; push @ndrivers, "qeth_l2.ko"; push @ndrivers, "qeth_l3.ko"; @@ -1052,7 +1060,7 @@ END # 'sbin/udevd' and 'sbin/udevadm' needed on s390x if ($arch eq "s390x") { - foreach ("sbin/udevd", "sbin/udevadm") { + foreach ("sbin/udevd", "sbin/udevadm", "usr/bin/readlink") { getlibs($_); push @filestoadd,$_; } @@ -1118,6 +1126,16 @@ END if ($arch eq "s390x") { system("mkdir -p /tmp/xcatinitrd.$$/etc/udev"); system("cp -r $rootimg_dir/etc/udev/* /tmp/xcatinitrd.$$/etc/udev"); + + # Copy rules for network adapter + my $name = `cat /etc/sysconfig/network/ifcfg-$prinic | grep NAME`; + my $nic = ''; + if ($name =~ m/(\d+\.\d+\.\d+)/g) { + $nic = $&; + } + system("cp -r /etc/udev/rules.d/*$nic.rules /tmp/xcatinitrd.$$/etc/udev/rules.d"); + system("cp -r /etc/udev/rules.d/*persistent-net.rules /tmp/xcatinitrd.$$/etc/udev/rules.d"); + system("mkdir -p /tmp/xcatinitrd.$$/lib/udev"); system("cp -r $rootimg_dir/lib/udev/* /tmp/xcatinitrd.$$/lib/udev"); }