From: Brian W. B. <bwb...@us...> - 2002-01-22 20:34:43
|
Update of /cvsroot/oscar/oscar/packages/lam/scripts In directory usw-pr-cvs1:/tmp/cvs-serv7279/lam/scripts Modified Files: post_buildimage Log Message: * hacked post_buildimage for LAM/MPI and MPIch so that they try to install the startup scripts in /etc/profile.d/ for the head node if they are not already there. This is an ugly hack that should be removed post-1.2 release. Index: post_buildimage =================================================================== RCS file: /cvsroot/oscar/oscar/packages/lam/scripts/post_buildimage,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** post_buildimage 2002/01/18 14:06:28 1.6 --- post_buildimage 2002/01/22 20:34:40 1.7 *************** *** 53,54 **** --- 53,115 ---- close(OUT); chmod 0755, "$imagedir/etc/profile.d/mpi-01lam.csh"; + + + # + # THIS IS AN UGLY HACK! We need to make sure that the head node has the + # /etc/profile.d scripts for LAM. This is the easiest place to do + # this for 1.2. For 1.3, this should be removed and made better + # somehow. + # + my $file = "/etc/profile.d/mpi-01lam.sh"; + + if (! -f $file) { + open(OUT,">$file") or croak("Couldn't open $file"); + + print OUT <<EOF; + # + # Set LAM/MPI at the end of the path + # Part of the OSCAR install + # + + if [ "\$LAMMPI" = "" ] ; then + export LAMMPI="$PREFIX" + export PATH="\${PATH}:\${LAMMPI}/bin" + if [[ -z \$MANPATH ]]; then + export MANPATH="\$LAMMPI/man" + else + export MANPATH="\${MANPATH}:\$LAMMPI/man" + fi + fi + + EOF + close(OUT); + chmod 0755, "$imagedir/etc/profile.d/mpi-01lam.sh"; + } + + + + $file = "/etc/profile.d/mpi-01lam.csh"; + if (! -f $file) { + + open(OUT,">$file") or croak("Couldn't open $file"); + print OUT <<EOF; + # + # Set LAM/MPI at the end of the path + # Part of the OSCAR install + # + + if (\$?LAMMPI == "0") then + set LAMMPI="$PREFIX" + set path = (\$path \$LAMMPI/bin) + if (\$?MANPATH == "0") then + set MANPATH="\$LAMMPI/man" + else + set MANPATH="\${MANPATH}:\$LAMMPI/man" + endif + endif + + EOF + close(OUT); + chmod 0755, "$imagedir/etc/profile.d/mpi-01lam.csh"; + } + |