Skip to content

Commit

Permalink
Update repos/system_upgrade/el8toel9/actors/fixgrubefiwrapper/actor.py
Browse files Browse the repository at this point in the history
Co-authored-by: Petr Stodůlka <[email protected]>
  • Loading branch information
rmetrich and pirat89 authored May 13, 2024
1 parent 7b0f73d commit 610285d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@ def process(self):

if ff.firmware == 'efi' and os.path.ismount('/boot/efi') and os.path.isfile('/boot/efi/EFI/redhat/grub.cfg'):
api.current_logger().info('Removing --root-dev-only if present.')
run(['/usr/bin/sed', '-i', r's/--root-dev-only\s*//', '/boot/efi/EFI/redhat/grub.cfg'])
try:
run(['/usr/bin/sed', '-i', r's/--root-dev-only\s*//', '/boot/efi/EFI/redhat/grub.cfg'])
except (OSError, CalledProcessError):
api.current_logger().warning('Cannot apply the fix of /boot/efi/EFI/redhat/grub.cfg.')
return
api.current_logger().info('Removed --root-dev-only if present.')

0 comments on commit 610285d

Please sign in to comment.