aboutsummaryrefslogtreecommitdiffstats
path: root/grub/09_linux
blob: 0f7d83f4fe702797e1460ff4ad07f59165a2b437 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

prefix="/usr"
datarootdir="${prefix}/share"
sysconfdir="/etc"
grub_mkconfig_dir="${sysconfdir}/grub.d"

source "${datarootdir}/grub/grub-mkconfig_lib"

if grep -q 'GRUB_CUSTOM_INITRD' "${sysconfdir}/default/grub"; then
	echo "# Your GRUB installation supports loading custom initramfs images."
	echo "# Not adding extra boot entries for YKFDE."
	exit 0
fi

ykfde-cpio
YKFDE_CHALLENGES="$(make_system_path_relative_to_its_root /boot/ykfde-challenges.img)"

source "${grub_mkconfig_dir}/10_linux" | sed \
	-e "/\\s*initrd/s|$| ${YKFDE_CHALLENGES}|" \
	-e "/\\s*menuentry/s|menuentry '\\(.*\\)' --|menuentry '\\1 for YKFDE' --|"