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.
This commit is contained in:
trytomakeyouprivate 2023-12-19 15:37:12 +00:00 committed by GitHub
parent 000171da27
commit 9f0d2837ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,13 +352,17 @@ updating_grub() {
update-grub update-grub
elif has_command grub-mkconfig; then elif has_command grub-mkconfig; then
grub-mkconfig -o /boot/grub/grub.cfg 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 grub2-mkconfig -o /boot/grub2/grub.cfg
elif has_command dnf; then # Check for Fedora (regular or Atomic)
if [[ -f /boot/efi/EFI/fedora/grub.cfg ]] && (( $(cat /etc/fedora-release | awk '{print $3}') < 34 )); then 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" prompt -s "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n"
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
fi fi
# Check for Bios
if [[ -f /boot/grub2/grub.cfg ]]; then if [[ -f /boot/grub2/grub.cfg ]]; then
prompt -s "Find config file on /boot/grub2/grub.cfg ...\n" prompt -s "Find config file on /boot/grub2/grub.cfg ...\n"
grub2-mkconfig -o /boot/grub2/grub.cfg grub2-mkconfig -o /boot/grub2/grub.cfg