diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/sample/consoleredirect b/confluent_osdeploy/el9-diskless/profiles/default/scripts/sample/consoleredirect new file mode 100644 index 00000000..60143ae5 --- /dev/null +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/sample/consoleredirect @@ -0,0 +1,15 @@ +is_rhel=false + +if test -f /boot/efi/EFI/redhat/grub.cfg; then + grubcfg="/etc/default/grub" + is_rhel=true +else + echo "Expected File missing: Check if os redhat" + exit +fi + +# Working on Redhat +if $is_rhel; then + sed -i '/^GRUB_TERMINAL/s/serial //' $grubcfg + grub2-mkconfig -o /boot/grub2/grub.cfg +fi \ No newline at end of file diff --git a/confluent_osdeploy/common/profile/scripts/sample/consoleredirect b/confluent_osdeploy/suse15/profiles/hpc/scripts/sample/consoleredirect similarity index 69% rename from confluent_osdeploy/common/profile/scripts/sample/consoleredirect rename to confluent_osdeploy/suse15/profiles/hpc/scripts/sample/consoleredirect index d761817e..270d24b7 100644 --- a/confluent_osdeploy/common/profile/scripts/sample/consoleredirect +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/sample/consoleredirect @@ -1,15 +1,11 @@ is_suse=false -is_rhel=false -if test -f /boot/efi/EFI/redhat/grub.cfg; then - grubcfg="/etc/default/grub" - is_rhel=true -elif test -f /boot/efi/EFI/sle_hpc/grub.cfg; then +if test -f /boot/efi/EFI/sle_hpc/grub.cfg; then grubcfg="/boot/efi/EFI/sle_hpc/grub.cfg" grub2-mkconfig -o $grubcfg is_suse=true else - echo "Expected File missing: Check if os sle_hpc or redhat" + echo "Expected File missing: Check if os sle_hpc" exit fi @@ -41,9 +37,3 @@ if $is_suse; then done sed -i 's,^terminal,#terminal,' $grubcfg fi - -# Working on Redhat -if $is_rhel; then - sed -i '/^GRUB_TERMINAL/s/serial //' $grubcfg - grub2-mkconfig -o /boot/grub2/grub.cfg -fi \ No newline at end of file