From d467fcc7fe90f7690cb6c301eb85a9123619d06b Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Sat, 4 Feb 2023 09:19:31 +0000 Subject: [PATCH] Update 4 files - /home/dot_local/bin/executable_install-program - /home/.chezmoitemplates/centos/common-dependencies - /home/.chezmoitemplates/fedora/common-dependencies - /home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl --- .../universal/run_onchange_after_64-grub-settings.tmpl | 7 ++++--- home/.chezmoitemplates/centos/common-dependencies | 1 + home/.chezmoitemplates/fedora/common-dependencies | 1 + home/dot_local/bin/executable_install-program | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl index c0e05b7f..6bcef63c 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_64-grub-settings.tmpl @@ -102,16 +102,17 @@ fi ### Determine platform-specific icon to use if command -v qubesctl > /dev/null; then GRUB_ICON='qubes' -elif [ -f "/boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/{{ .host.distro.id }}.png" ]; then +elif [ -f "/usr/local/share/grub/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/{{ .host.distro.id }}.png" ]; then GRUB_ICON='{{ .host.distro.id }}' -elif [ -f "/boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/{{ .host.distro.family }}.png" ]; then +elif [ -f "/usr/local/share/grub/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/{{ .host.distro.family }}.png" ]; then GRUB_ICON='{{ .host.distro.family }}' else GRUB_ICON='linux' fi ### Copy icon to GRUB2 theme folder -if [ -f "/boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/$GRUB_ICON.png" ]; then +# Check looks in /usr/local/share/grub because on some systems the /boot folder is behind permissions for non-root users +if [ -f "/usr/local/share/grub/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/$GRUB_ICON.png" ]; then sudo cp -f /boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icons/$GRUB_ICON.png /boot/grub2/themes/{{ .theme }}-$GRUB_RESOLUTION_TYPE/icon.png logg success 'Copied platform-specific icon to GRUB2 theme folder' else diff --git a/home/.chezmoitemplates/centos/common-dependencies b/home/.chezmoitemplates/centos/common-dependencies index 34a1e514..d635e327 100644 --- a/home/.chezmoitemplates/centos/common-dependencies +++ b/home/.chezmoitemplates/centos/common-dependencies @@ -15,5 +15,6 @@ "ruby-devel" "xorg-x11-fonts-Type1" "xorg-x11-xauth" + "xrandr" -}} {{- $packages | join " " -}} diff --git a/home/.chezmoitemplates/fedora/common-dependencies b/home/.chezmoitemplates/fedora/common-dependencies index 78f09a7c..8874a8bb 100644 --- a/home/.chezmoitemplates/fedora/common-dependencies +++ b/home/.chezmoitemplates/fedora/common-dependencies @@ -20,6 +20,7 @@ "ruby-devel" "xorg-x11-fonts-Type1" "xorg-x11-xauth" + "xrandr" "yubikey-personalization-gui" -}} {{- $packages | join " " -}} diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index 72942f00..b793edcf 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1756,16 +1756,16 @@ async function installSoftware(pkgsToInstall) { for (const script of installOrdersPre) { await $`${script}` } + installOrdersGroups.length && log('info', 'Users / Groups', `Adding groups / users`) + for (const group of installOrdersGroups) { + await addUserGroup(group) + } packageManagers.length && log('info', 'Install', `Installing the packages`) for (const packageManager of packageManagers) { const asyncOrders = [] asyncOrders.push(installPackageList(packageManager, installOrders[packageManager])) await Promise.all(asyncOrders) } - installOrdersGroups.length && log('info', 'Users / Groups', `Adding groups / users`) - for (const group of installOrdersGroups) { - await addUserGroup(group) - } installOrdersService.length && log('info', 'Post-Install', `Running package-specific post-installation steps`) for (const service of installOrdersService) { await updateService(service)