Update of /cvsroot/env-switcher/modules-oscar/dist
In directory sc8-pr-cvs1:/tmp/cvs-serv19583/dist
Modified Files:
VERSION modules-oscar.spec
Log Message:
Updates for SuSE 8.1 and 8.2
Index: VERSION
===================================================================
RCS file: /cvsroot/env-switcher/modules-oscar/dist/VERSION,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** VERSION 27 Oct 2002 13:23:06 -0000 1.5
--- VERSION 21 Jul 2003 10:44:38 -0000 1.6
***************
*** 1,5 ****
major=1
minor=0
! release=4
alpha=0
beta=0
--- 1,5 ----
major=1
minor=0
! release=5
alpha=0
beta=0
Index: modules-oscar.spec
===================================================================
RCS file: /cvsroot/env-switcher/modules-oscar/dist/modules-oscar.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** modules-oscar.spec 17 Jul 2003 13:51:51 -0000 1.14
--- modules-oscar.spec 21 Jul 2003 10:44:38 -0000 1.15
***************
*** 255,264 ****
%post
! # Now make /etc/bashrc source the %{_profiledir}/00-modules.sh files.
! # Blech. We have to do this because some distros (e.g., RH 7.1) have
! # a /etc/bashrc that doesn't run the scrips in /etc/profile.d for
! # non-interactive shells (e.g., rsh somehost who). Sucks!!
! # Summation of cases:
# - bash user logs in: /etc/profile is run, all /etc/profile.d/*.sh
# scripts are run
--- 255,269 ----
%post
! # Now make the bash system startup file source the
! # %{_profiledir}/00-modules.sh files. Blech. We have to do this
! # because some distros (e.g., RH 7.1) have a /etc/bashrc that doesn't
! # run the scrips in /etc/profile.d for non-interactive shells (e.g.,
! # rsh somehost who). Sucks!!
! special_string="MODULES-%{version}-%{release}-RPM-ADDITION"
!
! # NOTE: This acts different on different Linux distros. :-(
!
! # Summation of cases (RH 7.x/8.0/9.x, MDK 8.x/9.x)
# - bash user logs in: /etc/profile is run, all /etc/profile.d/*.sh
# scripts are run
***************
*** 270,277 ****
# /etc/bashrc is run, and all /etc/profile.d/*.sh scripts are run
! special_string="MODULES-%{version}-%{release}-RPM-ADDITION"
! %__cp /etc/bashrc /etc/bashrc.rpmsave
! %__cat >> /etc/bashrc <<EOF
if test "\$MODULE_OSCAR" = "" -a -f %{_profiledir}/00-modules.sh; then # $special_string
. %{_profiledir}/00-modules.sh # $special_string
--- 275,310 ----
# /etc/bashrc is run, and all /etc/profile.d/*.sh scripts are run
! # Strategy for modifying the top-level bash startup file:
! # 1a. If /etc/bashrc exists, use that
! # 1b. If not, if /etc/bash.bashrc exists, use that
! # 1c. If not, abort
! # 2. If "/etc/bash.bashrc.local" exists in the file, use
! # /etc/bash.bashrc.local
!
! # For SuSE 8.1 and 8.2, we can simply put things in
! # /etc/bash.bashrc.local and /etc/csh.cshrc.local -- no need to modify
! # the system-level files.
!
! bashfile="/etc/bashrc";
! if test ! -f $bashfile; then
! bashfile=/etc/bash.bashrc
! if test ! -f $bashfile; then
! echo "Can't find bash startup file to edit. :-("
! echo "Aborting in despair!"
! exit 1
! fi
! fi
!
! localfile="/etc/bash.bashrc.local"
! grep $localfile $bashfile 2>&1 > /dev/null
! if test "$?" = "0"; then
! bashfile=$"localfile"
! fi
!
! if test -f "$bashfile"; then
! %__cp $bashfile $bashfile.rpmsave
! fi
! %__cat >> $bashfile <<EOF
if test "\$MODULE_OSCAR" = "" -a -f %{_profiledir}/00-modules.sh; then # $special_string
. %{_profiledir}/00-modules.sh # $special_string
***************
*** 282,287 ****
# essentially the same reasons. Sucks!!
! %__cp /etc/csh.cshrc /etc/csh.cshrc.rpmsave
! %__cat >> /etc/csh.cshrc <<EOF
if ("\$?MODULE_OSCAR" == "0" && -f %{_profiledir}/00-modules.csh) then # $special_string
source %{_profiledir}/00-modules.csh # $special_string
--- 315,335 ----
# essentially the same reasons. Sucks!!
! cshfile="/etc/cshrc";
! if test ! -f $cshfile; then
! echo "Can't find csh startup file to edit. :-("
! echo "Aborting in despair!"
! exit 1
! fi
!
! localfile="/etc/csh.cshrc.local"
! grep $localfile $cshfile 2>&1 > /dev/null
! if test "$?" = "0"; then
! cshfile=$"localfile"
! fi
!
! if test -f "$bashfile"; then
! %__cp $cshfile $cshfile.rpmsave
! fi
! %__cat >> $cshfile <<EOF
if ("\$?MODULE_OSCAR" == "0" && -f %{_profiledir}/00-modules.csh) then # $special_string
source %{_profiledir}/00-modules.csh # $special_string
***************
*** 362,365 ****
--- 410,417 ----
#############################################################################
%changelog
+ * Sun Jul 20 2003 Jeff Squyres <jsq...@la...>
+ - Updates for SuSE 8.1 and 8.2; be a little smarter about bash and csh
+ startup files
+
* Wed Jul 16 2003 21:02:42PM Thomas Naughton <nau...@or...>
- Release 3.1.6-3
|