Skip to contentSkip to conversation

grub-mkconfig: only use scripts that are executable

PATCH New Lars Wendler 1 participant 1 message Dec 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grub-mkconfig: only use scripts that are executable

commit ec824e0f2a399ce2ab3a2e3353d372a236595059 breaks grub-mkconfig if one of the pre-defined config files are not executable.

This patch fixes https://bugs.gentoo.org/494716

---
 util/grub-mkconfig.in | 2 ++
 1 file changed, 2 insertions(+)
util/grub-mkconfig.in +2 -0
index 0ca0db1..fe33092 100644
@@ -260,10 +260,12 @@ for i in "${grub_mkconfig_dir}"/* ; do
       | "${grub_mkconfig_dir}"/30_os-prober \
       | "${grub_mkconfig_dir}"/40_custom \
       | "${grub_mkconfig_dir}"/41_custom)
+          if test -x "$i" ; then
 	      echo
               echo "### BEGIN $i ###"
               "$i"
               echo "### END $i ###"
+          fi
       ;;
     # emacsen backup files. FIXME: support other editors
     *~) ;;
Signature · 1 line
1.8.5.2