]> git.pld-linux.org Git - packages/efi-boot-update.git/blame - grub.conf
Version: 0.2
[packages/efi-boot-update.git] / grub.conf
CommitLineData
7a63766a
JK
1#
2# This is disabled by default, as GRUB does good job by itself
3#
4# This is rather a proof-of-concept example how such things can be implemented
5# here.
6#
7
8ENABLED=no
9LABEL=GRUB
10ARCH=x86_64
11BINARY=grub.efi
12
13GRUB_EXTRA_MODULES=""
14
15install_files() {
16 local target
17 local module
18 local modules
19 local final_modules
20 local drive
21 local prefix
22
23 modules=""
24 modules="$modules $(/sbin/grub-probe --target=fs /boot)"
25 modules="$modules $(/sbin/grub-probe --target=abstraction /boot)"
26 modules="$modules part_$(/sbin/grub-probe --target=partmap /boot)"
27 modules="$modules search_fs_file search_fs_uuid"
28 modules="$modules $GRUB_EXTRA_MODULES"
29 drive="$(/sbin/grub-probe --target=drive /boot)"
30
31 if [ "$ARCH" = "x86_64" ] ; then
32 target="x86_64-efi"
33 else
34 target="i386-efi"
35 fi
36
37 if /bin/mountpoint -q /boot ; then
38 prefix="$drive/grub"
39 else
40 prefix="$drive/boot/grub"
41 fi
42
43 final_modules=""
44 for module in $modules ; do
45 [ -e "/lib/grub/$target/$module.mod" ] && final_modules="$final_modules $module"
46 done
47
48 is_yes $VERBOSE && set -x
49 /sbin/grub-mkimage -O "$target" -d /lib/grub/$target \
50 --output=$DESTDIR/grub.efi \
51 --prefix="$prefix" $final_modules
52}
53
54# vi: ft=sh
This page took 0.084625 seconds and 4 git commands to generate.