Skip to content

Commit f654be9

Browse files
authored
Merge pull request #53 from shubhamshinde360/PA-5959
(PA-5959) Add support for Amazon linux
2 parents d2b1026 + 08a65af commit f654be9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/acceptance/lib/mount_utils.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def filesystem_file(host)
88
case host['platform']
99
when %r{aix}
1010
'/etc/filesystems'
11-
when %r{el-|centos|fedora|sles|debian|ubuntu}
11+
when %r{el-|centos|fedora|sles|debian|ubuntu|amazon}
1212
'/etc/fstab'
1313
else
1414
# TODO: Add Solaris and OSX support, as per PUP-5201 and PUP-4823
@@ -23,7 +23,7 @@ def filesystem_type(host)
2323
case host['platform']
2424
when %r{aix}
2525
'jfs2'
26-
when %r{el-|centos|fedora|sles|debian|ubuntu}
26+
when %r{el-|centos|fedora|sles|debian|ubuntu|amazon}
2727
'ext3'
2828
else
2929
# TODO: Add Solaris and OSX support, as per PUP-5201 and PUP-4823
@@ -43,7 +43,7 @@ def add_entry_to_filesystem_table(host, mount_name)
4343
when %r{aix}
4444
# NOTE: /dev/hd8 is the default jfs logging device on AIX.
4545
on(host, "echo '/#{mount_name}:\n dev = /dev/#{mount_name}\n vfs = #{fs_type}\n log = /dev/hd8' >> #{fs_file}")
46-
when %r{el-|centos|fedora|sles|debian|ubuntu}
46+
when %r{el-|centos|fedora|sles|debian|ubuntu|amazon}
4747
# Correctly munge whitespaces in mountpoints
4848
munged_mount_name = mount_name.gsub(' ', '\\\040')
4949
on(host, "echo '/tmp/#{munged_mount_name} /#{munged_mount_name} #{fs_type} loop 0 0' >> #{fs_file}")
@@ -64,7 +64,7 @@ def create_filesystem(host, mount_name)
6464
volume_group = on(host, 'lsvg').stdout.split("\n")[0]
6565
on(host, "mklv -y #{mount_name} #{volume_group} 1M")
6666
on(host, "mkfs -V #{fs_type} -l #{mount_name} /dev/#{mount_name}")
67-
when %r{el-|centos|fedora|sles|debian|ubuntu}
67+
when %r{el-|centos|fedora|sles|debian|ubuntu|amazon}
6868
on(host, "dd if=/dev/zero of='/tmp/#{mount_name}' count=16384", acceptable_exit_codes: [0, 1])
6969
on(host, "yes | mkfs -t #{fs_type} -q '/tmp/#{mount_name}'", acceptable_exit_codes: (0..254))
7070
else

0 commit comments

Comments
 (0)