Skip to content

Commit

Permalink
Update 3.3 IPv6 to support Amazon Linux 2 (dev-sec#74)
Browse files Browse the repository at this point in the history
Amazon Linux 2 uses /boot/grub2/grub.cfg (see also pull dev-sec#17).

Signed-off-by: Mark Churchill <[email protected]>
  • Loading branch information
markdchurchill committed Apr 1, 2020
1 parent 10946ce commit b18191f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controls/3_3_ipv6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
only_if do
ipv6_enabled = true

%w(/boot/grub/grub.conf /boot/grub/grub.cfg /boot/grub/menu.lst /boot/boot/grub/grub.conf /boot/boot/grub/grub.cfg /boot/boot/grub/menu.lst).each do |f|
%w(/boot/grub/grub.conf /boot/grub/grub.cfg /boot/grub/menu.lst /boot/boot/grub/grub.conf /boot/boot/grub/grub.cfg /boot/boot/grub/menu.lst /boot/grub2/grub.cfg).each do |f|
grub_file = file(f)
if !grub_file.content.nil? && grub_file.content.match(/ipv6\.disable=1/)
ipv6_enabled = false
Expand Down Expand Up @@ -58,7 +58,7 @@
only_if do
ipv6_enabled = true

%w(/boot/grub/grub.conf /boot/grub/grub.cfg /boot/grub/menu.lst /boot/boot/grub/grub.conf /boot/boot/grub/grub.cfg /boot/boot/grub/menu.lst).each do |f|
%w(/boot/grub/grub.conf /boot/grub/grub.cfg /boot/grub/menu.lst /boot/boot/grub/grub.conf /boot/boot/grub/grub.cfg /boot/boot/grub/menu.lst /boot/grub2/grub.cfg).each do |f|
grub_file = file(f)
if !grub_file.content.nil? && grub_file.content.match(/ipv6\.disable=1/)
ipv6_enabled = false
Expand Down Expand Up @@ -86,7 +86,7 @@
tag level: 1

describe.one do
%w(/boot/grub/grub.conf /boot/grub/grub.cfg /boot/grub/menu.lst /boot/boot/grub/grub.conf /boot/boot/grub/grub.cfg /boot/boot/grub/menu.lst).each do |f|
%w(/boot/grub/grub.conf /boot/grub/grub.cfg /boot/grub/menu.lst /boot/boot/grub/grub.conf /boot/boot/grub/grub.cfg /boot/boot/grub/menu.lst /boot/grub2/grub.cfg).each do |f|
describe file(f) do
its(:content) { should match(/ipv6\.disable=1/) }
end
Expand Down

0 comments on commit b18191f

Please sign in to comment.