From 9f0d2837edbea9453bbada16a5b0b0d24cd6ccb4 Mon Sep 17 00:00:00 2001 From: trytomakeyouprivate <113100745+trytomakeyouprivate@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:37:12 +0000 Subject: [PATCH] added opensuse microOS and Fedora Atomic Desktop commands Applying those works on Fedora Atomic! It should work the same on OpenSuse microOS as on regular OpenSuse too. --- install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index ebd7e80..8ce5bba 100755 --- a/install.sh +++ b/install.sh @@ -352,13 +352,17 @@ updating_grub() { update-grub elif has_command grub-mkconfig; then grub-mkconfig -o /boot/grub/grub.cfg - elif has_command zypper; then + # Check for OpenSuse (regular or microOS) + elif has_command zypper || has_command transactional-update; then grub2-mkconfig -o /boot/grub2/grub.cfg - elif has_command dnf; then - if [[ -f /boot/efi/EFI/fedora/grub.cfg ]] && (( $(cat /etc/fedora-release | awk '{print $3}') < 34 )); then + # Check for Fedora (regular or Atomic) + elif has_command dnf || has_command rpm-ostree; then + # check for UEFI + if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then prompt -s "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n" grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg fi + # Check for Bios if [[ -f /boot/grub2/grub.cfg ]]; then prompt -s "Find config file on /boot/grub2/grub.cfg ...\n" grub2-mkconfig -o /boot/grub2/grub.cfg