Update 2 files
- /home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_25-gnome-extension-settings.tmpl
This commit is contained in:
parent
c072b46911
commit
798e847c7e
2 changed files with 30 additions and 15 deletions
|
@ -6,6 +6,8 @@
|
|||
|
||||
# extension config hash: {{ include (joinPath .host.home ".config" "desktop" "gnome.yml") | sha256sum }}
|
||||
|
||||
set -x
|
||||
|
||||
### Ensure /tmp/install-gnome-extensions.txt is not present on the system
|
||||
if [ -f /tmp/install-gnome-extensions.txt ]; then
|
||||
rm -f /tmp/install-gnome-extensions.txt
|
||||
|
|
|
@ -116,26 +116,39 @@ else
|
|||
logg warn "/boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/$GRUB_ICON.png is missing"
|
||||
fi
|
||||
|
||||
### Ensure grub2-mkconfig is available
|
||||
if ! command -v grub2-mkconfig > /dev/null; then
|
||||
if command -v grub-mkconfig > /dev/null; then
|
||||
sudo ln -s "$(which grub-mkconfig)" /usr/bin/grub2-mkconfig
|
||||
else
|
||||
logg warn 'Neither grub2-mkconfig or grub-mkconfig are available
|
||||
fi
|
||||
fi
|
||||
|
||||
### Apply GRUB2 theme
|
||||
# Set `export DEBUG_MODE=true` to bypass GRUB2 / Plymouth application
|
||||
if [ -d /sys/firmware/efi ] && [ "$DEBUG_MODE" != 'true' ]; then
|
||||
logg info 'Assuming system is UEFI-enabled since /sys/firmware/efi is present'
|
||||
if [ -f /boot/efi/EFI/qubes/grub.cfg ]; then
|
||||
logg info 'Running `sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg`'
|
||||
sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
|
||||
logg success 'Applied GRUB2 theme'
|
||||
elif [ -f /boot/efi/EFI/grub.cfg ]; then
|
||||
logg info 'Running `sudo grub2-mkconfig -o /boot/efi/EFI/grub.cfg`'
|
||||
sudo grub2-mkconfig -o /boot/efi/EFI/grub.cfg
|
||||
logg success 'Applied GRUB2 theme'
|
||||
if [ "$DEBUG_MODE" != 'true' ]; then
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
logg info 'Assuming system is UEFI-enabled since /sys/firmware/efi is present'
|
||||
if [ -f /boot/efi/EFI/qubes/grub.cfg ]; then
|
||||
logg info 'Running `sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg`'
|
||||
sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
|
||||
logg success 'Applied GRUB2 theme'
|
||||
elif [ -f /boot/efi/EFI/grub.cfg ]; then
|
||||
logg info 'Running `sudo grub2-mkconfig -o /boot/efi/EFI/grub.cfg`'
|
||||
sudo grub2-mkconfig -o /boot/efi/EFI/grub.cfg
|
||||
logg success 'Applied GRUB2 theme'
|
||||
else
|
||||
logg warn 'Unknown GRUB2 configuration - not applying GRUB2 theme'
|
||||
fi
|
||||
else
|
||||
logg warn 'Unknown GRUB2 configuration - not applying GRUB2 theme'
|
||||
logg info 'Assuming system is non-UEFI since /sys/firmware/efi is not present'
|
||||
logg info 'Running `sudo grub2-mkconfig -o /boot/grub2/grub.cfg`'
|
||||
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
logg success 'Applied GRUB2 theme'
|
||||
fi
|
||||
else
|
||||
logg info 'Assuming system is non-UEFI since /sys/firmware/efi is not present'
|
||||
logg info 'Running `sudo grub2-mkconfig -o /boot/grub2/grub.cfg`'
|
||||
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
logg success 'Applied GRUB2 theme'
|
||||
logg info 'Skipping GRUB2 theme application because DEBUG_MODE is set to true'
|
||||
fi
|
||||
|
||||
{{ end -}}
|
||||
|
|
Loading…
Reference in a new issue