2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-04-15 17:49:34 +00:00

seperate into oses

This commit is contained in:
Tinashe 2025-03-27 11:09:25 -04:00
parent ce5c1c925e
commit b596de93a0
2 changed files with 17 additions and 12 deletions

View File

@ -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

View File

@ -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