mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 01:53:08 +02:00
Merge pull request #1341 from Pmodules/1340-modulecmd-check-whether-a-module-is-loaded-or-not-is-buggy
modulecmd: bugfix in unloading modules.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
## Version 2.0.3
|
||||
|
||||
### modulecmd
|
||||
* Bugfix in unloading modules. Under certain conditions unloading a module
|
||||
failed due to a wrong check in the test whether a module is loaded or not.
|
||||
(#1340)
|
||||
* Misleading error message fixed if system configuration file is not readable.
|
||||
(#1316, #1331)
|
||||
|
||||
|
||||
@@ -1073,13 +1073,10 @@ subcommand_unload() {
|
||||
for arg in "${args[@]}"; do
|
||||
# is the module loaded?
|
||||
for lmfile in "${_lmfiles_[@]}" '_zzzz_'; do
|
||||
if [[ $lmfile =~ ${arg} ]]; then
|
||||
break
|
||||
fi
|
||||
[[ /${lmfile} =~ /${arg}$ ]] && break
|
||||
done
|
||||
if [[ "${lmfile}" == '_zzzz_' ]]; then
|
||||
continue
|
||||
fi
|
||||
[[ "${lmfile}" == '_zzzz_' ]] && continue
|
||||
|
||||
# yes, module has been loaded
|
||||
is_modulefile modulecmd "${lmfile}" || die_module_not_a_modulefile "${arg}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user