2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

Merge pull request #188 from tkucherera-lenovo/console-redirect

remove-consoleredirect
This commit is contained in:
Jarrod Johnson
2025-04-28 10:59:18 -04:00
committed by GitHub
2 changed files with 0 additions and 54 deletions

View File

@@ -1,15 +0,0 @@
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

View File

@@ -1,39 +0,0 @@
is_suse=false
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"
exit
fi
# working on SUSE
if $is_suse; then
start=false
num_line=0
lines_to_edit=()
while read line; do
((num_line++))
if [[ $line == *"grub_platform"* ]]; then
start=true
fi
if $start; then
if [[ $line != "#"* ]];then
lines_to_edit+=($num_line)
fi
fi
if [[ ${#line} -eq 2 && $line == *"fi" ]]; then
if $start; then
start=false
fi
fi
done < grub_cnf.cfg
for line_num in "${lines_to_edit[@]}"; do
line_num+="s"
sed -i "${line_num},^,#," $grubcfg
done
sed -i 's,^terminal,#terminal,' $grubcfg
fi