This file is indexed.

/usr/share/modules/init/sh is in environment-modules 4.1.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
unset _mlre _mlIFS _mlshdbg;
# disable shell debugging for the run of this init file
if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
   # immediately disable debugging to echo the less number of line possible
   case "$-" in
      *v*x*) set +vx; _mlshdbg='vx' ;;
      *v*) set +v; _mlshdbg='v' ;;
      *x*) set +x; _mlshdbg='x' ;;
      *) _mlshdbg='' ;;
   esac;
fi;

# define modules runtine quarantine configuration
#export MODULES_RUN_QUARANTINE='ENVVARNAME'

# setup quarantine if defined
if [ -n "${IFS+x}" ]; then
   _mlIFS=$IFS;
fi;
IFS=' ';
for _mlv in ${MODULES_RUN_QUARANTINE:-}; do
   if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; then
      if [ -n "`eval 'echo ${'$_mlv'+x}'`" ]; then
         _mlre="${_mlre:-}${_mlv}_modquar='`eval 'echo ${'$_mlv'}'`' ";
      fi;
      _mlrv="MODULES_RUNENV_${_mlv}";
      _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' ";
   fi;
done;
if [ -n "${_mlre:-}" ]; then
   _mlre="eval ${_mlre}";
fi;

# define module command and surrounding initial environment (default value
# for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init/.modulespath)
eval `${_mlre:-}/usr/bin/tclsh /usr/lib/x86_64-linux-gnu/modulecmd.tcl sh autoinit`

# clean temp variables used to setup quarantine
if [ -n "${_mlIFS+x}" ]; then
   IFS=$_mlIFS; unset _mlIFS;
else
   unset IFS;
fi;
unset _mlre _mlv _mlrv

# redefine module command if compat version has been activated
if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then
   MODULES_CMD=/usr/lib/x86_64-linux-gnu/modulecmd-compat; export MODULES_CMD
   if [ -t 1 ]; then
      _moduleraw() { eval `/usr/lib/x86_64-linux-gnu/modulecmd-compat sh $*`; }
   else
      module() { eval `/usr/lib/x86_64-linux-gnu/modulecmd-compat sh $*`; }
   fi
fi

# if sh is bash, export functions to get them defined in sub-shells
if [ "${BASH:-}" != '' ]; then
   if [ -t 1 ]; then
      export -f _moduleraw
   fi
   export -f module
fi

# define function to switch between C and Tcl versions of Modules
switchml() {
   swfound=1
   if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then
      swname='main'
      if [ -e /usr/lib/x86_64-linux-gnu/modulecmd.tcl ]; then
         swfound=0
         unset MODULES_USE_COMPAT_VERSION
      fi
   else
      swname='compatibility'
      if [ -e /usr/lib/x86_64-linux-gnu/modulecmd-compat ]; then
         swfound=0
         MODULES_USE_COMPAT_VERSION=1; export MODULES_USE_COMPAT_VERSION
      fi
   fi

   # switch version only if command found
   if [ $swfound -eq 0 ]; then
      echo "Switching to Modules $swname version"
      . /usr/share/modules/init/sh
   else
      echo "Cannot switch to Modules $swname version, command not found"
      return 1
   fi
}
if [ "${BASH:-}" != '' ]; then
   export -f switchml
fi

# setup ENV variables to get module defined in sub-shells (works for 'sh'
# and 'ksh' in interactive mode and 'sh' (zsh-compat), 'bash' and 'ksh'
# (zsh-compat) in non-interactive mode.
ENV=/usr/share/modules/init/profile.sh; export ENV
BASH_ENV=/usr/share/modules/init/bash; export BASH_ENV

case ":$PATH:" in
   *:/usr/bin:*) ;;
   *) PATH=/usr/bin${PATH:+:}$PATH; export PATH
esac

manpath=`manpath 2>/dev/null`
case ":$manpath:" in
   *:/usr/share/man:*) ;;
   *) MANPATH=/usr/share/man${manpath:+:}$manpath; export MANPATH
esac

# restore shell debugging options if disabled
if [ -n "${_mlshdbg:-}" ]; then
   set -$_mlshdbg;
   unset _mlshdbg;
fi;