View | Details | Raw Unified | Return to bug 34467
Collapse All | Expand All

(-)a/Makefile.util.def (+6 lines)
Lines 508-513 script = { Link Here
508
};
508
};
509
509
510
script = {
510
script = {
511
  name = '30_uefi-firmware';
512
  common = util/grub.d/30_uefi-firmware.in;
513
  installdir = grubconf;
514
};
515
516
script = {
511
  name = '40_custom';
517
  name = '40_custom';
512
  common = util/grub.d/40_custom.in;
518
  common = util/grub.d/40_custom.in;
513
  installdir = grubconf;
519
  installdir = grubconf;
(-)a/util/grub.d/30_uefi-firmware.in (+46 lines)
Line 0 Link Here
1
#! /bin/sh
2
set -e
3
4
# grub-mkconfig helper script.
5
# Copyright (C) 2012  Free Software Foundation, Inc.
6
#
7
# GRUB is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# GRUB is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
19
20
prefix="@prefix@"
21
exec_prefix="@exec_prefix@"
22
datarootdir="@datarootdir@"
23
24
export TEXTDOMAIN=@PACKAGE@
25
export TEXTDOMAINDIR="@localedir@"
26
27
. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
28
29
efi_vars_dir=/sys/firmware/efi/vars
30
EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
31
OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
32
33
if [ -e "$OsIndications" ] && \
34
   [ "$(( $(printf %x \'"$(cat $OsIndications | cut -b1)") & 1 ))" = 1 ]; then
35
  LABEL="System setup"
36
37
  gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2
38
39
  onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
40
41
  cat << EOF
42
menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
43
	fwsetup
44
}
45
EOF
46
fi

Return to bug 34467