grub/util/grub.d
Eli Schwartz 28a7e597de grub-mkconfig: Use portable "command -v" to detect installed programs
The "which" utility is not guaranteed to be installed either, and if it
is, its behavior is not portable either.

Conversely, the "command -v" shell builtin is required to exist in all
POSIX 2008 compliant shells, and is thus guaranteed to work everywhere.

Examples of open-source shells likely to be installed as /bin/sh on
Linux, which implement the 11-year-old standard: ash, bash, busybox,
dash, ksh, mksh and zsh.

A side benefit of using the POSIX portable option is that it requires
neither an external disk executable, nor (because unlike "which", the
exit code is reliable) a subshell fork. This therefore represents a mild
speedup.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-10-28 15:38:48 +01:00
..
00_header.in Revert "Keep the native terminal active when enabling gfxterm" 2018-03-05 15:26:42 +01:00
10_hurd.in templates: Fix bad test on GRUB_DISABLE_SUBMENU 2019-10-21 14:05:02 +02:00
10_illumos.in grub-mkconfig: use $pkgdatadir in scripts 2015-04-29 19:18:54 +03:00
10_kfreebsd.in templates: Fix bad test on GRUB_DISABLE_SUBMENU 2019-10-21 14:05:02 +02:00
10_linux.in templates: Fix bad test on GRUB_DISABLE_SUBMENU 2019-10-21 14:05:02 +02:00
10_netbsd.in templates: Fix bad test on GRUB_DISABLE_SUBMENU 2019-10-21 14:05:02 +02:00
10_windows.in grub-mkconfig: use $pkgdatadir in scripts 2015-04-29 19:18:54 +03:00
10_xnu.in xnu: Add new kernel path to autoconfig. 2016-02-12 15:42:26 +01:00
20_linux_xen.in templates: Fix bad test on GRUB_DISABLE_SUBMENU 2019-10-21 14:05:02 +02:00
30_os-prober.in grub-mkconfig: Use portable "command -v" to detect installed programs 2019-10-28 15:38:48 +01:00
40_custom.in 2009-09-10 Robert Millan <rmh.grub@aybabtu.com> 2009-09-10 12:53:25 +00:00
41_custom.in * grub-core/normal/main.c (read_config_file): Provide config_file and 2012-05-27 15:34:41 +02:00
README 2007-05-04 Robert Millan <rmh@aybabtu.com> 2007-05-04 07:11:44 +00:00

All executable files in this directory are processed in shell expansion order.

  00_*: Reserved for 00_header.
  10_*: Native boot entries.
  20_*: Third party apps (e.g. memtest86+).

The number namespace in-between is configurable by system installer and/or
administrator.  For example, you can add an entry to boot another OS as
01_otheros, 11_otheros, etc, depending on the position you want it to occupy in
the menu; and then adjust the default setting via /etc/default/grub.