diff --git a/environment-modules.spec b/environment-modules.spec index 6fc11e7..4615ccd 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -1,6 +1,6 @@ Name: environment-modules Version: 3.2.7b -Release: 4%{?dist} +Release: 5%{?dist} Summary: Provides dynamic modification of a user's environment Group: System Environment/Base @@ -78,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Oct 26 2009 Orion Poplawski - 3.2.7b-5 +- Don't assume different shell init scripts exist (bug #530770) + * Fri Oct 23 2009 Orion Poplawski - 3.2.7b-4 - Don't load bash init script when bash is running as "sh" (bug #529745) diff --git a/modules.sh b/modules.sh index fd98eaf..48cc324 100644 --- a/modules.sh +++ b/modules.sh @@ -1 +1,7 @@ -. /usr/share/Modules/init/`basename \`ps -p $$ -ocomm=\`` +shell=`/bin/basename \`/bin/ps -p $$ -ocomm=\`` +if [ -f /usr/share/Modules/init/$shell ] +then + . /usr/share/Modules/init/$shell +else + . /usr/share/Modules/init/sh +fi