Skip to content

Commit

Permalink
Merge pull request #2734 from tvpartytonight/FACT-3463
Browse files Browse the repository at this point in the history
(FACT-3463) Add server to mountpoint device for AIX
  • Loading branch information
tvpartytonight authored Jun 18, 2024
2 parents 43111c9 + 5b711a6 commit ccd3d6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lib/facter/resolvers/aix/mountpoints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ def read_mount(fact_name)
def add_mount_points_fact(line)
elem = line.split("\s")

elem.shift unless line[0] == ' '
if line[0] != ' '
server = elem.shift
device = "#{server}:#{elem[0]}"
else
device = elem[0]
end

@fact_list[:mountpoints][elem[1]] = { device: elem[0], filesystem: elem[2],
@fact_list[:mountpoints][elem[1]] = { device: device, filesystem: elem[2],
options: elem.last.include?(':') ? [] : elem.last.split(',') }
end

Expand Down
2 changes: 1 addition & 1 deletion spec/facter/resolvers/aix/mountpoints_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
filesystem: 'x', options: ['rw', 'nodev', 'log=/dev/hd3'], size: '206.64 MiB',
size_bytes: 216_678_912, used: '1.58 MiB', used_bytes: 1_655_296 },
'/tmp/salam' => { available: '63.57 GiB', available_bytes: 68_253_413_376, capacity: '7.20%',
device: '/var/share', filesystem: 'nfs3', options: [], size: '68.50 GiB',
device: 'joe:/var/share', filesystem: 'nfs3', options: [], size: '68.50 GiB',
size_bytes: 73_549_217_792, used: '4.93 GiB', used_bytes: 5_295_804_416 } }
end

Expand Down

0 comments on commit ccd3d6d

Please sign in to comment.