-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 30/07/13 23:39, Xiao Peng Wang wrote:

> Chirs,

Hiya!

> I'll try to make the mpss kit package to be work for stateless. 
> Thanks for your patch.

My pleasure, is it best to do this via the mailing list or via
SourceForge bugs?

> And what do you mean of 'there are no RPMs in the defined RPM
> dir'?

I meant that I'd not realised it was also relative to $installroot. :-)

I've attached my latest patch which fixes that and does a depmod -ae
as it appeared the kernel module wasn't being found by modprobe on the
booted statelite nodes (I could insmod it OK).   That second bit is
untested yet, I'm about to rebuild the osimage for those nodes.

cheers,
Chris
- -- 
 Christopher Samuel        Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: [email protected] Phone: +61 (0)3 903 55545
 http://www.vlsci.org.au/      http://twitter.com/vlsci

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlH4UXQACgkQO2KABBYQAh/9OwCfYN3mZOM5hFRtIDvMRStPDEpP
RssAnjD+N8MdXFKLQez6ZfqOo9gZj1h2
=3y1W
-----END PGP SIGNATURE-----
diff --git a/postscripts/KIT_mpss_compute-2.1.6720-15-rhels-6-x86_64_mpsscfg.sh b/postscripts/KIT_mpss_compute-2.1.6720-15-rhels-6-x86_64_mpsscfg.sh
index 402bfa5..4a1b61f 100755
--- a/postscripts/KIT_mpss_compute-2.1.6720-15-rhels-6-x86_64_mpsscfg.sh
+++ b/postscripts/KIT_mpss_compute-2.1.6720-15-rhels-6-x86_64_mpsscfg.sh
@@ -1,6 +1,18 @@
 #! /bin/sh
 
-rpmdir="/opt/xcat/kits/mpss/mpss_compute-2.1.6720-15-rhels-6-x86_64"
+if [ -n "${installroot}" ]; then
+	if [ \! -d ${installroot} ]; then
+		echo "Install root defined to be ${installroot} but does not exist"
+		exit 1
+	fi
+fi
+
+rpmdir="${installroot}/opt/xcat/kits/mpss/mpss_compute-2.1.6720-15-rhels-6-x86_64"
+
+if [ \! -d ${rpmdir} ]; then
+	echo "Cannot find rpmdir ${rpmdir}, exiting"
+	exit 1
+fi
 
 # if existing, first install
 OT=`ls $rpmdir/intel-mic*`
@@ -8,23 +20,36 @@ if [ $? -ne 0 ]; then
     exit 0
 fi
 
-if [ -x "/etc/init.d/mpss" ]; then
-    # stop the mpss service first
-    /etc/init.d/mpss unload
+if [ -z "${installroot}" ]; then
+	if [ -x "/etc/init.d/mpss" ]; then
+	    # stop the mpss service first
+	    /etc/init.d/mpss unload
 
-    # remove the pkgs
-    yum -y remove --noplugins --disablerepo=* intel-mic*    
+	    # remove the pkgs
+	    yum -y remove --noplugins --disablerepo=* intel-mic*
+	fi
 fi
 
 # install the new packages
-yum -y install --nogpgcheck --noplugins --disablerepo=* $rpmdir/intel-mic*.rpm
+if [ ${installroot} ]; then
+	yum -y install --installroot=${installroot} --nogpgcheck --noplugins --disablerepo=* $rpmdir/intel-mic*.rpm
+	chroot ${installroot} depmod -ae
+else
+	yum -y install --nogpgcheck --noplugins --disablerepo=* $rpmdir/intel-mic*.rpm
+fi
 
 # enable the mpss service
-chkconfig mpss on
-/etc/init.d/mpss start >/dev/null  2>&1 </dev/null
+if [ ${installroot} ]; then
+	chroot ${installroot} chkconfig mpss on
+else
+	chkconfig mpss on
+	/etc/init.d/mpss start >/dev/null  2>&1 </dev/null
+fi
 
-# remove the rpm files to prevent the repeat installation by updatenode
-rm -rf $rpmdir/*
+if [ -z "${installroot}" ]; then
+	# remove the rpm files to prevent the repeat installation by updatenode
+	rm -rf $rpmdir/*
+fi
 
 echo "finished the mpss installation."
 exit 0
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to