| Server IP : 103.48.194.25 / Your IP : 216.73.217.33 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/Modules/init/ |
Upload File : |
if !ENV.has_key?('MODULEPATH') then
ENV['MODULEPATH'] = File.open("#{ENV['MODULESHOME']}/init/.modulespath","r").readlines.reject {|e| e =~ /^(\s*#|$)/}.join(":")
end
if !ENV.has_key?('LOADEDMODULES') then
ENV['LOADEDMODULES'] = ''
end
class ENVModule
def ENVModule.module(*args)
if args[0].kind_of?(Array) then
args = args[0].join(" ")
else
args = args.join(" ")
end
exec_prefix = "/usr/bin"
eval `#{exec_prefix}/modulecmd ruby #{args}`
end
def ENVModule.load(args)
ENVModule.module "load #{self.get_args(args)}"
end
def ENVModule.unload(args)
ENVModule.module "unload #{self.get_args(args)}"
end
def ENVModule.list
ENVModule.module 'list'
end
private
def ENVModule.get_args(args)
if args.kind_of?(Array) then
arg = args.join(" ")
else
arg = args
end
return arg
end
end