Module: Train::Extras::DetectOpenVMS
- Includes:
- Uname
- Included in:
- OSCommon
- Defined in:
- lib/train/extras/os_detect_openvms.rb
Instance Method Summary
collapse
Methods included from Uname
#uname_m, #uname_r, #uname_s
Instance Method Details
#detect_openvms ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/train/extras/os_detect_openvms.rb', line 14
def detect_openvms
cmd = @backend.run_command('show system/noprocess')
return false if cmd.exit_status != 0
return false if cmd.stdout.empty?
@platform[:name] = cmd.stdout.downcase.split(' ')[0]
cmd = @backend.run_command('write sys$output f$getsyi("VERSION")')
@platform[:release] = cmd.stdout.downcase.split("\n")[1][1..-1]
cmd = @backend.run_command('write sys$output f$getsyi("ARCH_NAME")')
@platform[:arch] = cmd.stdout.downcase.split("\n")[1]
true
end
|