Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 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="/usr"
21
exec_prefix="/usr"
22
datarootdir="/usr/share"
23
 
24
export TEXTDOMAIN=grub
25
export TEXTDOMAINDIR="${datarootdir}/locale"
26
 
27
. "/usr/share/grub/grub-mkconfig_lib"
28
 
29
efi_vars_dir=/sys/firmware/efi/efivars
30
EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
31
OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE"
32
 
33
if [ -e "$OsIndications" ] && \
34
   [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b5)") & 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