Grub 2.06 os-prober hook

Συνέχιση της συζήτησης από το How to enable os prober in garuda:

I would suggest a different approach on the hook.

  • Current
if grep -Fxq "GRUB_DISABLE_OS_PROBER=false" /etc/default/grub ; then
   echo "os-prober already enabled"
else echo "GRUB_DISABLE_OS_PROBER=false" >> /etc/default/grub
  • Proposed
if test ! `grep -q "^GRUB_DISABLE_OS_PROBER=" /etc/default/grub` ; then
   echo "
#Change this to GRUB_DISABLE_OS_PROBER=true to disable os-prober
GRUB_DISABLE_OS_PROBER=false" >> /etc/default/grub
   echo "os-prober was enabled by default"


  • We should not force a system change made by the user without reason.
  • If a user has disabled os-prober, the current hook changes this to enabled
  • A hook message for a useless info will eternally inform about it for a change that was not made
  • The proposed hook checks for the enabled parameter without the value. If it was set (by the user, since was not there by default), we let it unchanged. If it is not set (as from package default), we add the previous default, with a classic note for its usage.

And... this hook should be bound to os-prober package, not grub, because this way... it makes sense. :man_shrugging:


Thats actually a good point :eyes: I'll do the change later :+1:


Thanks for the hook. :slightly_smiling_face:


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.