diff --git a/confluent_osdeploy/common/profile/scripts/sample/consoleredirect b/confluent_osdeploy/common/profile/scripts/sample/consoleredirect index 4ebc3a8f..d761817e 100644 --- a/confluent_osdeploy/common/profile/scripts/sample/consoleredirect +++ b/confluent_osdeploy/common/profile/scripts/sample/consoleredirect @@ -2,8 +2,7 @@ is_suse=false is_rhel=false if test -f /boot/efi/EFI/redhat/grub.cfg; then - grubcfg="/boot/efi/EFI/redhat/grub.cfg" - grub2-mkconfig -o $grubcfg + grubcfg="/etc/default/grub" is_rhel=true elif test -f /boot/efi/EFI/sle_hpc/grub.cfg; then grubcfg="/boot/efi/EFI/sle_hpc/grub.cfg" @@ -45,5 +44,6 @@ fi # Working on Redhat if $is_rhel; then - sed -i 's,^serial,#serial, ; s,^terminal,#terminal,' $grubcfg + sed -i '/^GRUB_TERMINAL/s/serial //' $grubcfg + grub2-mkconfig -o /boot/grub2/grub.cfg fi \ No newline at end of file